v2

latestOpenAPI 3.1.02026-07-26937792.5 KB

Run Call Unit Tests Endpoint

Run call unit tests for a specific agent.

This endpoint:

  1. Fetches the agent's current configuration
  2. Retrieves test cases from db-svc (conversation contexts marked as unit tests)
  3. Runs each test case against the agent's current settings
  4. Calculates similarity scores using LLM-as-judge
  5. Saves results to db-svc
  6. Returns the test results

Args: request: RunCallUnitTestsRequest with agent_id, optional test_ids, and similarity_threshold

Returns: RunCallUnitTestsResponse with all test run results

post/testing/call-unit/run

Headers

authorizationstring required

Request body

agent_idstring required

Agent ID to run tests for

test_idsstring[] nullable

Specific test IDs to run, None = run all

similarity_thresholdinteger

Percentage needed to pass (0-100)

Response

Successful Response

result_idstring required

ID of the saved test result

passed_testsinteger required

Number of tests that passed

total_testsinteger required

Total number of tests run

status'in_progress' | 'completed' | 'failed' required

Status of a call unit test result batch