Skip to main content
Define success criteria for AI agent conversations and track resolution rates. Related: Agents API | End Call Tool | Conversations

Types


Constraints


Inline Criteria via Agent Create/Update

Resolution criteria can be managed inline when creating or updating an agent. See agents.md for full agent payload docs.
Behavior: Important: On update, this is a declarative replace — existing criterion UUIDs are soft-deleted and new ones are created. This counts as a “significant change” and increments the agent version.

List all active resolution criteria for an agent, ordered…

Status Codes:
Response:

Add a resolution criterion to an agent

Status Codes:
Response:

Update a resolution criterion’s label and/or description

Status Codes:
Response:

Soft-delete a resolution criterion

Status Codes:

Get resolution metrics for an agent

Status Codes:
Response:

How Resolution Evaluation Works

1

When a call connects to an agent, the criteria are loaded from the database and frozen into the conversation handle. Changes to criteria mid-conversation have no effect.

2

If the agent has criteria, the end_conversation tool is dynamically extended with a resolution field. The criteria descriptions are injected into the tool schema so the LLM knows exactly what to evaluate.
See end-call-tool.md for the full tool schema.

3

When the LLM calls end_conversation, it must evaluate every criterion with a boolean judgment and brief evidence. The schema enforces resolution.length === criteria.length.

4

  • Each criterion evaluation is stored as a row in conversation_resolutions
  • The denormalized resolved boolean is set on agent_conversations:
    • true — all criteria met
    • false — any criterion not met
    • null — not evaluated (non-tool exit: hangup, timeout, max_turns, error)

5

GET /agents/:id/resolution-metrics uses COUNT(*) FILTER (WHERE ...) for efficient single-pass aggregation. No materialized views or caching — computed on each request.

Frontend Integration Notes

Resolution Criteria Management

  1. Agent settings page — Add a “Resolution Criteria” section where users can add/edit/remove criteria (max 5). Use the inline resolutionCriteria field on agent update for atomic saves.
  2. Criteria form — Each criterion needs:
    • label input (required, max 255 chars) — short name shown in metrics
    • description textarea (required) — detailed description the LLM uses for evaluation
  3. Max limit UX — Disable “Add criterion” button when 5 criteria exist. Show remaining count.

Resolution Metrics Dashboard

Display for each agent:
Key metrics to surface:
  • Resolution rateresolvedConversations / evaluatedConversations — higher is better
  • Evaluation rateevaluatedConversations / totalConversations — low values indicate many non-tool exits (hangups, timeouts)
  • Per-criterion met rate — identifies which criteria agents struggle with most