https://example.org/tutor/chat.
How the connection works
Calibrate needs one web address on your server that follows these rules:- Request: Calibrate sends a
POSTrequest with the conversation so far as amessageslist, in the OpenAI chat message format. - Response: your agent sends back JSON with its reply as a
responsetext, its tool calls as atool_callslist, or both.
Request format
Calibrate sends aPOST request to your agent’s URL. The body holds the whole conversation, oldest message first:
model field. Calibrate adds it only when you turn on benchmarking across models, so your agent knows which model to use for that request. If your agent cannot switch models, ignore it.
Any Custom fields you add on the Connection tab are also sent in the body on every request, next to messages.
Request format for a Basic agent
If you chose Basic when you created the agent, Calibrate sends only the student’s latest message, as aninput field:
Response format
Your agent returns aresponse field with its text reply:
tool_calls list. Each item has a tool name and an arguments object:
output field. This is what the tool gave back when your agent ran it, and it can be any JSON value. Calibrate shows it next to the tool call in the test results. It does not change whether a test passes or fails:
Report cost, speed and tokens
Your agent can also send ametrics object with each reply. Calibrate then shows the cost, speed and tokens for each test, and uses them when you compare models.
metrics is optional, and so is the whole object. For tokens, send total_tokens, or send prompt_tokens and completion_tokens and Calibrate adds them up. latency_ms is how long your agent took to reply. Calibrate shows latency only when you send it.
Add a route for Calibrate
Most agents already call a model somewhere inside their own code. Move that model call into its own function. Then add a route that Calibrate calls, which uses the same function. Before: the model call sits inside your request handler.POST /calibrate/test route in the next steps.
Create the agent
- From the sidebar, click Agents → New agent.
- Under Agent name, type a name.
- Under Setup, select Connect your existing agent.

- Click Next.
- Select Conversation, then click Create.
Fill in the connection details
On the agent page, click the Connection tab.
- Agent URL (required): the web address of your agent’s route, for example
https://example.org/tutor/chat. Calibrate sends aPOSTrequest here. - Headers (optional): headers your agent needs, such as a key it checks before it answers. Click Add header for each one.
- Custom fields (optional): extra fields Calibrate sends with every request. Click Add field for each one.
- Support benchmarking different models (optional): turn this on if your agent can switch models. See Enable benchmarking across models.
Verify your connection
Calibrate checks that it can reach your agent and that the reply has the right format. You must do this before you run tests or text simulations.- In the Connection check panel, click Verify.
- A dialog opens. Under Messages, edit the sample conversation Calibrate sends. The Request body preview shows the exact JSON.

- Click Send & Verify.
Enable benchmarking across models
Calibrate can run the same tests on several models so you can compare them. For a connected agent, your agent must read amodel field from the request and use that model.
- On the Connection tab, turn on Support benchmarking different models.
- Under Model provider, pick the provider your agent uses to call models.
model field to each request:
model depends on the provider you pick. For OpenRouter it includes the company name, such as openai/gpt-4.1. For OpenAI it is only the model name, such as gpt-4.1.
When you click Start the comparison in the Compare models dialog, Calibrate first checks the connection for each model you picked that it has not checked before. The comparison starts once those checks pass.
Next steps
Evaluate your agent with unit tests
Write tests for your connected agent
Compare models on your tests
See which model does best on your tests
Run a text or voice simulation
Have simulated students talk to your agent. Connected agents run text simulations only.