Developers / Agents
List an agent's latest test runs
https://api.echonova.ai/v1/agents/{agentId}/test-runsLists the latest playground test runs of the agent, newest first. Needs the agents:read scope on the key.
Headers
Bearer, a space, then your API key, which starts with ek_. Create keys in the portal under Developers, API Keys.
Path parameters
The agent id, as GET /v1/agents returned it.
Query parameters
How many of the latest test runs to return.
Response
200 application/json Every response uses this envelope.
The result.
The test run id.
A chat or a voice test.
running, passed, failed, or incomplete: the run stopped before every message was answered, or nobody spoke.
When it started, as an ISO 8601 date-time.
When it ended; absent while running.
The average reply time in milliseconds; absent until the first reply.
The median reply time in milliseconds.
The 95th percentile reply time in milliseconds.
How many turns it took.
How many tool calls the agent made.
How many tools the agent had on.
How many messages a scripted test run was asked to send; absent for other test runs.
true for a successful call.
Repeats the HTTP status.
null on success.
Errors
Same envelope, with success false and data null. All errors
When. agentId or sessionId is not a 24-character hexadecimal id.
Fix. Use the id exactly as GET /v1/agents or the conversations list returned it.
When. limit is below 1.
Fix. Send 1 or more.
When. limit on the test runs list is above 10.
Fix. Send 1 to 10.
When. limit on the test runs list is not a number at all.
Fix. Send an integer from 1 to 10.
When. The body or query carries a field the endpoint does not define.
Fix. Remove the field.
When. The Authorization header is missing or is not Bearer ek_..., no key matches the token, or the key is deleted, disabled, expired or its account is closed.
Fix. Send Authorization: Bearer ek_... with an enabled key from this environment.
When. The workspace that owns the key has no subscription.
Fix. Check the workspace's plan in the portal.
When. The subscription is in a state other than active or trial.
Fix. Renew the subscription.
When. The key does not have the agents:read scope. Speech and widget ticket access do not give it.
Fix. Edit the key and give it the agents:read scope, or use another key.
When. The member who created the key has left the workspace, or no longer has both the View agents and Manage developer API permissions. It is checked on every call.
Fix. Give that member both permissions again, or create a key as a member who has them.
When. The agent id is unknown, or the agent belongs to another workspace.
Fix. Use an id from GET /v1/agents with a key of the agent's workspace.
When. The key made more than 100 requests to one endpoint in 60 seconds, or one IP address made more than 100 requests to one endpoint in 60 seconds (the IP limit is counted before the key is checked, so it can answer with no key at all); a Retry-After header carries the seconds to wait.
Fix. Wait Retry-After seconds, then retry.
When. An error the API did not classify.
Fix. Check the request, then retry after a short wait; contact support if it persists.
When. A transient outage inside the API.
Fix. Retry after a short wait.
When. A transient timeout inside the API.
Fix. Retry after a short wait.
curl "https://api.echonova.ai/v1/agents/{agentId}/test-runs" \
-H "Authorization: Bearer YOUR_API_KEY"{
"data": [
{
"id": "6655a1b2c3d4e5f6a7b8c9d0",
"kind": "chat",
"status": "passed",
"startedAt": "2026-11-03T10:00:00.000Z",
"endedAt": "2026-11-03T10:01:00.000Z",
"latencyMs": 800,
"replyP50Ms": 700,
"replyP95Ms": 1200,
"turns": 4,
"toolsTriggered": 1,
"toolsTotal": 2,
"plannedTurns": 2
}
],
"success": true,
"statusCode": 200,
"errorMessage": null
}