Agent Tests

Create a test: next_reply judges the agent's next reply against an expectation, tool checks the tool the agent calls next, and simulation lets a simulated user hold a whole conversation that is scored against success conditions. Pass agent_ids to attach the test right away.

The body of GET /v1/agent/tests/{test_id} posts back as is, so tests can be exported and imported. Tool references use your workspace's tool ids (list them with GET /v1/agent/agents/{agent_id}/test-tools), so an export imports cleanly within the same team and needs its tool ids remapped elsewhere.

post/v1/agent/tests

Request

  • Base URL
    https://api.fish.audio
  • URL
    https://api.fish.audio/v1/agent/tests
  • Auth
    HTTP bearer

Request body

namestring required
test_type'next_reply' | 'tool' | 'simulation'
expectationstring
success_examplesstring[]
failure_examplesstring[]
verify_absenceboolean
dynamic_variablesobject
agent_idsstring[]

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.

Response

Document created, URL follows

test_idstring required
workspace_idstring required
namestring required
test_type'next_reply' | 'tool' | 'simulation' required
agent_idsstring[]

Agents this test is attached to.

created_atstring date-time required
updated_atstring date-time required
expectationstring
success_examplesstring[]
failure_examplesstring[]
verify_absenceboolean
dynamic_variablesobject

Changes