summary, an outcome judged against your definition of success, and the fields you ask it to extract. Configure it under config.analysis; it is on by default with the summary on. Chats are analysed the same way when they end (end_call or POST /v1/chats/{chat_id}/end); a chat nobody ends is never analysed.
Configure it
PATCH /v1/agents/{agent_id} (fields is a list, so send it whole), then publish: analysis runs from the published version.
Each entry in
fields:
Every field is nullable: a value the call never established, or one returned in the wrong type, comes back
null.
Cost and timing
- Runs once per session, after the caller has hung up, on your provider key. Budget about 5% on top of the call’s provider cost; it is billed in the same pass as the call.
- Hard 30-second timeout. A failure never affects the call.
Read the result
session.analysis on GET /v1/calls/{session_id} (analysis on GET /v1/chats/{chat_id}), and the same object in the session.completed webhook.
Compute success rates over judged calls only:
GET /v1/calls/stats returns judged_calls and successful_calls.
Preview a definition
POST /v1/calls/{session_id}/analysis/preview runs an analysis definition against one finished call and returns {analysis, provider, model}. It writes nothing, but it is a real model call on your key. It runs even when the definition has enabled: false. Pass agent_id to judge against another agent’s prompt; omit it to use the prompt the call ran. Chats: POST /v1/chats/{chat_id}/analysis/preview.
Re-run on past calls
POST /v1/calls/analysis/backfill with {"call_ids": [...]} (1 to 100) re-analyses each call with its agent’s saved definition, one at a time, and returns {analysed, skipped, failed}. It is also the retry path for failed and stuck pending. A call still running is a 409; a chat or unknown id is a 404. For one chat, use POST /v1/chats/{chat_id}/analysis.
Analysis is not userdata
session.userdata is what the agent’s tools established during the call; analysis.fields is what a model inferred afterwards. They are never merged, so a guess cannot overwrite a confirmed value. See userdata.
Teams, resumed calls and memory
- Analysis uses the configuration of the agent that answered. The transcript it reads marks every handoff (
[Handed off to Billing],[Started …],[Back to …]). - A resumed web call is analysed as one call: the newest call reads every call’s transcript in the chain. Earlier calls keep their own analysis.
conversation.context: "summary"(conversation memory) feeds these summaries into later calls, so publishing it with analysis or its summary off is refused.
Publish refusals
In the dashboard
The call page’s Call analysis panel shows the outcome badge, summary, rationale and fields, or why there is none. Its reload control offers Re-run (saved definition, writes the result) and Try current draft (preview, writes nothing); both are hidden on a running or erased call.Calls
The record analysis is written onto.
Webhooks
Push results to your systems.