Hanzo
OpenapiAgents

Returns one agent's execution history, newest first — each run's input, its…

Returns one agent's execution history, newest first — each run's input, its output or its error, and how long it took.

GET /v1/agents/{ref}/runs

Addresshttps://api.hanzo.ai/v1/agents/{ref}/runs
MethodGET
Operationget_agents_by_ref_runs
AuthAuthorization: Bearer $HANZO_API_KEY

Returns one agent's execution history, newest first — each run's input, its output or its error, and how long it took. Every row is a run that actually happened.

Request

2 fields.

FieldInTypeRequiredDescription
refpathstringyesRef is the agent's public id or its org-unique name, from the path.
limitqueryintegerLimit caps how many runs come back, newest first.

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 <ref>

Agents API · All Hanzo APIs · Interactive reference

How is this guide?

On this page