Skip to navigation

Count runs

Totals, failures, latency percentiles and cost over exactly the runs GET /v1/runs lists for the same filters and window, grouped by flow, agent and surface. failed uses the list’s own status=failed predicate, so a count and the rows it describes cannot disagree. traffic narrows to live, test or eval runs; byTraffic reports all three before that filter. Cost never counts an unknown run as zero: cost.unpricedRuns says how many settled runs have no known cost.

Authentication

AuthorizationBearer
API key or Clerk session token

Query parameters

agentIdstring or list of stringsOptional

Filter by agent id; repeat for a set.

flowIdstring or list of stringsOptional

Filter by flow id; repeat for a set.

conversationIdstringOptional
Filter by conversation id.
surfaceIdstringOptional
Filter by surface id.
surfaceTypestringOptional
Filter by surface family.
recordIdstringOptional
Filter by record id.
batchExecutionIdstring or list of stringsOptional

Filter by batch id; repeat for a set.

includeChildrenenumOptional

true restores the flat enumeration on the UNSCOPED feed, in which a subagent run and a nested-flow run list beside their parent. The unscoped feed is roots only by default: a row whose parentExecutionId is set folds under its parent and is read with parentExecutionId=<executionId>. Any filter that scopes to a resource — agentId, flowId, conversationId, surfaceId, recordId, batchExecutionId, parentExecutionId, rootExecutionId or executionId — is already an explicit selection and never folds, so an agent that only ever runs as a subagent still lists under agentId. This parameter changes nothing on a scoped request.

Allowed values:
sourceenumOptional
Filter by producing lane.
Allowed values:
statusenumOptional
status accepts only running, completed or failed. queued, awaiting and cancelled exist only in the live overlay, which may never change which rows a page holds, so the server cannot filter on them.
Allowed values:
trafficenumOptional

live keeps runs real users and integrations started; test keeps runs started from the dashboard (Test, step tests, Ask); eval keeps eval-batch runs; all, or omitted, keeps every run. A schedule run is live, and an eval batch run is eval whoever started it.

Allowed values:
fromstringOptional

Window start (ISO 8601). Defaults to 24 hours ago.

tostringOptional

Window end (ISO 8601). Defaults to now.

Response

Run counts returned
dataobject
windowobject

The started_at window the query resolved to, after defaults.

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
500
Internal Server Error
503
Service Unavailable Error