Skip to content

Save an evaluation case for an agent

POST
/voice/agents/{agent_id}/test-cases

SPENDS NOTHING. Saves a named case: the user turn, its context, and the assertion the agent’s resolved behaviour must satisfy.

created_by defaults to the key’s identity, since a server-to-server call carries no request-context user for voice to fall back on.

Authorizations

Parameters

Path Parameters

agent_id
required

Voice agent id.

string

Voice agent id.

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

A saved evaluation case: the user turn under test and what must hold.

llm_judge may be SAVED but is skipped by dry runs - a judge needs a real completion, and a dry run never calls a model.

object
assertion_config
Any of:
object
key
additional properties
any
assertion_type
string
default: contains
Allowed values: exact contains not_contains expects_tool refuses cites_collection llm_judge
channel

Selects the per-channel instructions.

string
default: chat
Allowed values: chat inbound outbound
created_by
Any of:
string
expected_output
Any of:
input_context
Any of:
object
key
additional properties
any
input_message
required

The user turn under test.

string
>= 1 characters
name
required
string
>= 1 characters <= 200 characters

Responses

201

Successful Response

object
data
required

One voice object - a collection, an agent, a route, a chat.

Open-shaped: voice adds fields to these bodies on its own release cadence and a dropped-or-added key must not be a 500 in this service.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string