Types
Type Definitions
Type Definitions
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.List all active resolution criteria for an agent, ordered…
Status Codes:| Code | Description |
|---|---|
200 | List of criteria (may be empty) |
404 | Agent not found |
Add a resolution criterion to an agent
Status Codes:| Code | Description |
|---|---|
201 | Criterion created |
404 | Agent not found |
409 | Maximum criteria reached (5) or duplicate label |
Update a resolution criterion’s label and/or description
Status Codes:| Code | Description |
|---|---|
200 | Criterion updated |
404 | Criterion not found |
Soft-delete a resolution criterion
Status Codes:| Code | Description |
|---|---|
200 | Criterion soft-deleted |
404 | Criterion not found |
Get resolution metrics for an agent
Status Codes:| Code | Description |
|---|---|
200 | Metrics returned |
404 | Agent not found |
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, theend_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.
3
When the LLM callsend_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
resolvedboolean is set onagent_conversations:true— all criteria metfalse— any criterion not metnull— 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
-
Agent settings page — Add a “Resolution Criteria” section where users can add/edit/remove criteria (max 5). Use the inline
resolutionCriteriafield on agent update for atomic saves. -
Criteria form — Each criterion needs:
labelinput (required, max 255 chars) — short name shown in metricsdescriptiontextarea (required) — detailed description the LLM uses for evaluation
- Max limit UX — Disable “Add criterion” button when 5 criteria exist. Show remaining count.
Resolution Metrics Dashboard
Display for each agent:- Resolution rate —
resolvedConversations / evaluatedConversations— higher is better - Evaluation rate —
evaluatedConversations / totalConversations— low values indicate many non-tool exits (hangups, timeouts) - Per-criterion met rate — identifies which criteria agents struggle with most