How the connection works
Calibrate does not need to understand your whole agent. It needs a single HTTP endpoint that follows one contract:- Request — Calibrate sends a
POSTrequest with the conversation history as amessagesarray in the OpenAI chat message format. - Response — your endpoint returns a JSON object with the agent’s reply as a
responsestring, and/or its tool calls as atool_callsarray.
Request format
Calibrate sends aPOST request to your endpoint. The body carries the full
conversation history in chronological order, using the OpenAI chat message
format:
model field. Calibrate adds it only when you benchmark across models, so your endpoint knows which model to run for that request. Handle it only if your agent is set up to switch models from that input; otherwise ignore it.
Response format
By default, your endpoint returns aresponse field containing the agent’s text
reply:
tool_calls
array — each item has a tool name and an arguments object:
output field — the result the tool
returned when your agent ran it. It can be any JSON value, is shown in the
results view for review only, and never affects whether a test passes or fails:
Add a Calibrate endpoint
The change to your codebase: pull the model call out of your agent handler into a reusable function, then expose a new route that calls it directly. Before — the LLM call is buried inside your request handler:POST /calibrate/test, add any auth headers your agent needs, and verify the connection as shown below.
Create an agent connection
From the sidebar, click Agents → New agent. Select Connect your existing agent, give it a name, and click Create.
Configure your connection
The Connection tab lets you set up everything Calibrate needs to communicate with your agent:
-
Agent URL (required) — The HTTPS endpoint where your agent is deployed (e.g.
https://your-agent.example.com/chat). Calibrate will send aPOSTrequest to this URL with conversation messages. -
Headers (optional) — Add any headers your agent needs for authentication or custom metadata (e.g.
Authorization: Bearer YOUR_API_KEY). Click + Add header to add multiple headers. -
Support benchmarking different models (optional) — Turn this on if your agent can switch LLMs from the request
modelfield, then pick your Model provider. The provider sets the format Calibrate sends inmodel: for OpenRouter it’s provider-prefixed (e.g.openai/gpt-4.1), for OpenAI it’s bare (e.g.gpt-4.1). In the API/SDK this is thebenchmark_providerfield on the agent config. See Enable benchmarking across models for the full flow.
Verify your connection
Before running any tests, we need to verify we can connect to your agent and that it returns the output in the correct format. Click the Verify button in the Connection check panel. A dialog will open where you can customize the sample request that will be sent to your agent:
- Edit the Messages to set the conversation history for the test request.
- The Request body preview on the right updates live so you can see the exact JSON that will be sent.
- Click Send & Verify to send the request to your agent.
- ✅ Verified — Your agent is reachable and returns the correct format
- ❌ Failed — The panel will show the error along with the actual output received from your agent so you can debug and try again.
Connection verification is required before running LLM tests, benchmarks or
simulations
Enable benchmarking across models
Calibrate supports benchmarking different LLMs on your dataset to find the best model for your agent. For this, you need to instrument your agent API to support amodel field in the request body that Calibrate will send along with the conversation history.
To get started, turn on Support benchmarking different models from the Connection tab.

- Select your Model provider from the dropdown (OpenRouter, OpenAI, Anthropic, Google, etc.). This represents the provider you have configured for your agent on your system.
- Calibrate will include a
modelfield in the request body:
model field will be different. For example, if you have selected OpenRouter, the model field is provider-prefixed (e.g. openai/gpt-4.1). If you have selected OpenAI, the model field will just be gpt-4.1.
- When running a benchmark via Compare models, Calibrate will verify the connection for each selected model before starting the evaluation. See this for details.
Next steps
Run LLM Tests
Create and run test cases against your agent
Find the best LLM
Compare the performance of different LLMs on your agent
Run Simulations
Simulate conversations with realistic personas