Hanzo
OpenapiAgents

Returns the org's agent runs across EVERY agent, newest first — what ran here,…

Returns the org's agent runs across EVERY agent, newest first — what ran here, for whom, on which model, how long it took, and why it failed.

GET /v1/agents/runs

Addresshttps://api.hanzo.ai/v1/agents/runs
MethodGET
Operationget_agents_runs
AuthAuthorization: Bearer $HANZO_API_KEY

Returns the org's agent runs across EVERY agent, newest first — what ran here, for whom, on which model, how long it took, and why it failed.

It is the feed the per-agent history could not be: an operator asking "what is this tenant's agent plane doing" does not start out knowing an agent ref, and answering by listing the agents and then paging each one's history is N+1 round trips to reconstruct one ordering the database already has (RunsSince, ordered by created_at over the org index).

The org is the CALLER's, resolved from identity by tenantStore — never a parameter. There is deliberately no org field on orgRunsQuery to forge: run history is the tenant's own record, and the only tenant this can answer for is the one asking.

Request

2 fields.

FieldInTypeRequiredDescription
limitqueryintegerLimit caps how many runs come back, newest first.
statusquerystringStatus keeps only runs with this outcome ("ok" or "error"). Empty keeps both.

Response

StatusBodyMeaning
200runListok

200 body — 15 fields.

FieldInTypeAlwaysDescription
runsbodyagentRunView[]Runs is the agent's executions, newest first.
runs[].actorbodystringActor is the "org/sub" identity the run was executed and billed AS.
runs[].agentbodystringWhat an operator needs to answer "what ran, for whom, and what did it do" — and, through traceId, to leave this record for the waterfall of the very same run…
runs[].completionTokensbodyintegerCompletionTokens is the same measurement for what the model produced, on the same final completion.
runs[].createdAtbodystringCreatedAt is when the run finished, RFC 3339 in UTC to the second — the duration above already says how long it had been going.
runs[].durationMsbodyintegerDurationMs is wall-clock milliseconds around the completion, including a failover's retries.
runs[].errorbodystringError is why an "ok"-less run failed, as the failing call reported it.
runs[].idbodystringID is the run's handle, minted as "run_" + 32 hex characters.
runs[].inputbodystringInput is the text the run was given, verbatim.
runs[].modelbodystringModel is the model that actually SERVED this run, which is not always the one the agent is defined on — a failover records what answered.
runs[].outputbodystringOutput is what the model produced. Empty on an error run, and empty is also a legitimate answer from a run that succeeded with nothing to say — Status is what…
runs[].promptTokensbodyintegerPromptTokens is what the gateway reported for the run's FINAL completion, and only that one — a tool loop's earlier rounds are the metering ledger's account,…
runs[].statusbodystringStatus is the run's outcome, and there are exactly two: "ok" when the model answered, "error" when it did not.
runs[].toolCallsbodyintegerToolCalls is how many tool dispatches the run made — a count of ACTIONS, which is a different measurement from the token counts above and from the turns a…
runs[].traceIdbodystringTraceID is the trace this run IS, so the record and its spans are one thing to move between: it opens the waterfall for THIS run rather than a search that…

Failure carries the platform error shape — see Errors.

Examples

hanzo agents runs-all

Agents API · All Hanzo APIs · Interactive reference

How is this guide?

On this page