Starts a batch test and returns at once. Each test case becomes a test run. The runs execute one after another in the background: a simulated caller talks to the agent through the same engine as the Test LLM playground, then a judge decides pass or fail against the test case's success_criteria. Poll Get batch test for results.
The simulated caller is played by the test case's llm_model and the judge is gpt-5.6-terra.
Request#
| Field | Type | Required | Description |
|---|---|---|---|
agent_id |
string | Yes | Agent to test. Must exist in the workspace. |
test_case_definition_ids |
array of strings | Yes | 1 to 50 test case IDs. Each must belong to agent_id. Runs execute in this order. |
Example request#
curl -X POST https://api.tried.com.au/create-batch-test \
-H "Authorization: Bearer $TRIED_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"agent_id": "agent_3e4f5a6b7c8d9e0f1a2b3c4d",
"test_case_definition_ids": ["test_case_8f7e6d5c4b3a29180f1e2d3c", "test_case_1a2b3c4d5e6f708192a3b4c5"]
}'const res = await fetch("https://api.tried.com.au/create-batch-test", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.TRIED_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
agent_id: "agent_3e4f5a6b7c8d9e0f1a2b3c4d",
test_case_definition_ids: ["test_case_8f7e6d5c4b3a29180f1e2d3c", "test_case_1a2b3c4d5e6f708192a3b4c5"],
}),
});
const batchTest = await res.json();import os, requests
res = requests.post(
"https://api.tried.com.au/create-batch-test",
headers={"Authorization": f"Bearer {os.environ['TRIED_API_KEY']}"},
json={
"agent_id": "agent_3e4f5a6b7c8d9e0f1a2b3c4d",
"test_case_definition_ids": ["test_case_8f7e6d5c4b3a29180f1e2d3c", "test_case_1a2b3c4d5e6f708192a3b4c5"],
},
)
batch_test = res.json()Response#
201 Created
{
"batch_test_id": "batch_test_2c3d4e5f6a7b8c9d0e1f2a3b",
"agent_id": "agent_3e4f5a6b7c8d9e0f1a2b3c4d",
"status": "in_progress",
"total_count": 2,
"pass_count": 0,
"fail_count": 0,
"error_count": 0,
"created_timestamp": 1760850000000,
"completed_timestamp": null
}| Field | Type | Description |
|---|---|---|
batch_test_id |
string | Batch test ID, prefix batch_test_. |
status |
string | in_progress, then complete when every run has finished. |
total_count |
integer | Number of runs. |
pass_count, fail_count, error_count |
integer | Runs that passed, failed, or errored. |
completed_timestamp |
integer or null | Unix ms when the last run finished. |
How a run ends#
A conversation stops when the simulated caller ends it, the agent ends the call, it reaches 400 utterances (agent and user turns), or it runs for 10 minutes. The judge then grades the transcript. A run that throws (for example, the agent fails to respond) gets status error with an error message. Tool calls are answered from the test case's tool_mocks.
Errors#
| Status | When |
|---|---|
400 |
Body fails validation, for example test_case_definition_ids: Array must contain at most 50 element(s). |
401 |
Missing or invalid API key. |
403 |
The key's IP allowlist or scopes reject the request, or the caller has the read-only member role. This route needs the agents scope. |
404 |
Agent <agent_id> not found, or Test case <id> not found for agent <agent_id>. |
429 |
Rate limit exceeded. See Rate limits. |
See Errors for the body format.