Hanzo
Start

Agent

Create an agent, run it, read the run back.

Create an agent, run it, read the run back.

ref accepts the public id (agent_...) OR the org-unique name, which is why run and read can both use the name just created without waiting for an id. Names are org-unique, so an example must not hardcode one. The last step is the RUN list, not the agent read: a run is asynchronous, so the example polls it until the run it started is terminal.

CreateAgent defines an agent in the caller's org: a model, a system prompt (instructions) and a set of tool names.

POST /v1/agents · reference →

CreateAgent defines an agent in the caller's org: a model, a system prompt (instructions) and a set of tool names. The name must be unique in the org and match ^[A-Za-z0-9][A-Za-z0-9._-]{0,63}$. An omitted model takes the deployment's configured default; a named one is checked against the gateway's served catalog, so a model this deployment never serves is refused here rather than failing at run time. A long-running agent must carry a 5-field cron schedule (the scheduler would otherwise never fire it) and counts against a per-org cap on scheduled agents.

ParameterInRequiredDescription
computeRefbody
descriptionbody
executionModebody
instructionsbody
modelbody
namebody
schedulebody
serviceAccountIdbody
toolsbody
hanzo agents create \
  --model <model> \
  --name <name>

Run the agent.

POST /v1/agents/{ref}/run · reference →

Composes the agent's instructions with the caller input and runs a real chat completion via the in-process AI client, then records the run. A run moves money (debits the org's commerce ledger), so a validated principal is required and the org balance is pre-authorized fail-closed.

ParameterInRequiredDescription
refpathyesThe agent's public id (the agent_... handle) OR its org-unique name.
inputbodyCaller input appended to the agent's instructions (capped at 128 KiB).
hanzo agents run <ref>

ListAgentRuns 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 · reference →

ListAgentRuns 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.

ParameterInRequiredDescription
refpathyesThe agent's public id (the agent_... handle) OR its org-unique name.
limitqueryLimit caps how many runs come back, newest first. Absent, zero or out of range (1..200) reads as 50.
hanzo agents runs <ref>

Every command, call and tool above is generated from the same OpenAPI document that generates the SDKs themselves — the four surfaces are projections of one doc comment, so they cannot disagree.

How is this guide?

On this page