Agents API
The HTTP runtime every Cencori agent runs on: sessions, turns, tool calls, approvals, widgets and traces.
The Agents API is the runtime under everything agent-shaped in Cencori. The Agents SDK, Agent UI, Arcie, Embedded Agents and WhatsApp agents all run on it. Use it directly from any language.
A run, end to end
POST /v1/sessions
CENCORI_API_KEY: csk_...
Content-Type: application/json
{
"metadata": { "agent": "Support" },
"turn": {
"input": "Where is order 1042?",
"model": "gpt-oss-120b",
"instructions": "Help customers with their orders.",
"tools": [{ "type": "function", "function": { "name": "get_order", "description": "Look up an order", "parameters": { "type": "object", "properties": { "id": { "type": "string" } }, "required": ["id"] } } }],
"pause_on_tool_calls": true
}
}Creating the session with its first turn saves a round trip: the reply streams back straight away, with the session id in the X-Cencori-Session-Id header.
event: turn.started
event: tool_call.started data: {"tool":"get_order","arguments":{"id":"1042"},"action_id":"call_1"}
event: turn.paused data: {"reason":"tool_results_required","action_id":"call_1","actions":[...]}
Run the tool yourself and send the result:
POST /v1/sessions/ses_.../approve
{ "action_id": "call_1", "tool_results": [{ "action_id": "call_1", "output": "{\"status\":\"shipped\"}" }] }The turn resumes and streams the answer. If the model calls another tool, it pauses again.
See Tool calls and approvals for the full loop and Events for every event.
Endpoints
Request and response details: Sessions API reference.
Turn options
Who can call it
- Secret keys (
csk_) from your server: everything. - Publishable keys (
cpk_) from a browser, locked to your domains: run a stored agent, nothing else. See Stored agents. - Client tokens (
ect_) from a browser: turns in their own sessions, and approvals if granted. See Browser access.

