Skip to main content
Manage test datasets, test cases and personas, run them against an agent and read the results through the Public API v1. The same operations are available as MCP tools. See Simulation Testing for the concepts and the screens.

Authentication

Reading requires an API key with agents_config:read. Creating, updating, deleting and running requires agents_config:write, which includes read access.

Quick Test

Ask an agent one question and get its answer in the response. Expect 10 to 30 seconds.
Optional client_context uses the client context entries format. It is also accepted when creating or updating a test case, returned with test cases, and supported by JSON import. Omit it on update to keep the saved context, or send null to clear it. Dataset runs inject the saved context on every turn. Response:
Scope: agents_config:write

Datasets

Datasets group related test cases for batch simulation runs.

List Datasets

Response:
Scope: agents_config:read

Create Dataset

Scope: agents_config:write

Get, Update, Delete Dataset

To set a default persona, update the dataset with {"default_persona_id": "persona-uuid"}. This field is not accepted when creating a dataset. Deleting a dataset removes all its test cases and runs.

Test Cases

Each test case defines a question and the expected agent behavior.

Expected Types

Create Test Case

Answer test:
Tool call test:
Multi-turn test (conversation with multiple exchanges):
Steps run in order in the same conversation, so the agent keeps the context of earlier steps. Scope: agents_config:write

List Test Cases

Scope: agents_config:read

Bulk Create

Import from Conversation

Extract a test case from an existing conversation thread:
Uses the last user message and assistant response from the thread. Scope: agents_config:write

Personas

Personas simulate different user profiles during testing. A persona can run the tests with another agent and with different user attributes.

Create Persona

Scope: agents_config:write

List, Get, Update, Delete Personas


Simulation Runs

Start a Run

The run starts in the background: the response returns at once with status: "pending". Scope: agents_config:write

Poll Run Status

Poll this endpoint until status is "completed" or "failed". Scope: agents_config:read

Get Run Details

Get Run Results

List Runs, Delete Run


MCP Tools

All simulation endpoints are available as MCP tools. Connect to the MCP server at /api/v1/mcp with an API key that has agents_config scopes.

Workflow: Run a Simulation via MCP

  1. Start the run: Call start_simulation_run with dataset_id and agent_id
  2. Poll for completion: Call get_simulation_run_status with run_id until status is "completed" or "failed"
  3. Get results: Call get_simulation_run_results with run_id to see individual test results

Available MCP Tools


Error Responses

Errors follow the standard API v1 format: