Skip to main content
POST
Create Simulation Test

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
name
string
required
Required string length: 1 - 200
test_type
enum<string>
default:next_reply
Available options:
next_reply,
tool,
simulation
conversation
AgentTestMessagePayload · object[]
expectation
string
default:""
Maximum string length: 400
success_examples
string[]
failure_examples
string[]
referenced_tool
AgentTestReferencedTool · object | null

Tool the runner should (or should not) observe on the next turn. A webhook or client tool is referenced by its library id, an integration tool by "<provider_key>:<tool_name>" (for example "google_calendar:create_event"), a system tool by its tool name (for example "_end_call"). name may be left out for a system tool.

tool_parameters
AgentTestToolParameter · object[]
verify_absence
boolean
default:false
simulation
AgentTestSimulationConfig · object | null
channel
enum<string> | null

The channel a next_reply or tool test plays, web_voice when left out. The agent speaks and has the tools as on that channel: client tools on web_voice only, _transfer_call on the two phone channels, _press_keys and _skip_turn on phone_outbound. A tool test cannot reference a tool its channel lacks. A simulation test has its own in simulation.channel.

Available options:
web_voice,
phone_inbound,
phone_outbound
dynamic_variables
Dynamic Variables · object
judge
AgentTestJudge · object | null

The judge of a next_reply or simulation test. Null follows the workspace's Tests settings (GET /v1/agent/test-settings). A tool test has no judge, it is null there.

agent_ids
string[]

Agents to attach the test to. They must all be in one workspace, and the test is created there. Without agents the test goes into the API key owner's default workspace.

Maximum array length: 100

Response

Document created, URL follows

test_id
string
required
workspace_id
string
required
name
string
required
test_type
enum<string>
required
Available options:
next_reply,
tool,
simulation
created_at
string<date-time>
required
updated_at
string<date-time>
required
agent_ids
string[]

Agents this test is attached to.

conversation
PublicAgentTestMessage · object[]
expectation
string
default:""
success_examples
string[]
failure_examples
string[]
referenced_tool
AgentTestReferencedTool · object | null

Tool the runner should (or should not) observe on the next turn. A webhook or client tool is referenced by its library id, an integration tool by "<provider_key>:<tool_name>" (for example "google_calendar:create_event"), a system tool by its tool name (for example "_end_call"). name may be left out for a system tool.

tool_parameters
AgentTestToolParameter · object[]
verify_absence
boolean
default:false
simulation
AgentTestSimulationConfig · object | null
channel
enum<string> | null

The channel a Single Turn or Tool test plays. null is web_voice. A Simulation test has its own in simulation.channel.

Available options:
web_voice,
phone_inbound,
phone_outbound
dynamic_variables
Dynamic Variables · object
judge
AgentTestJudge · object | null

The judge of a next_reply or simulation test. Null follows the workspace's Tests settings (GET /v1/agent/test-settings). A tool test has no judge, it is null there.