Hanzo
OpenapiAgents

Run one tool-calling round against your org's own tools

Answers one turn of a conversation with four things: the model's `reply`, the `actions` the server executed on the caller's behalf, the `ops` the client…

POST /v1/agents/chat

Addresshttps://api.hanzo.ai/v1/agents/chat
MethodPOST
Operationpost_agents_chat
AuthAuthorization: Bearer $HANZO_API_KEY

Answers one turn of a conversation with four things: the model's reply, the actions the server executed on the caller's behalf, the ops the client must apply itself, and the conversationId the turn was recorded under.

The split between actions and ops is the rule most easily got wrong. A tool call is executed HERE only when the chosen preset is server-executing AND the tool resolves in the caller's own scope; every other call is handed back as an op for the client to apply to its own graph or UI. A tool that fails still comes back as an action, carrying its error rather than failing the round.

preset selects the system prompt and the tool set (capability is a legacy alias for it); an unknown one is refused. conversationId continues an existing thread, and its absence starts one. A validated principal with a non-empty org is required — the org is the sole authority for both persistence and tool scope, and is NEVER read from the body.

A completion refused for the caller's own reason — 402 insufficient balance, 429, 403 — is relayed with its own status and body verbatim, so the real billing message reaches the client instead of an opaque gateway error. Only a genuine upstream fault becomes a 502.

Request

The document declares no body for POST /v1/agents/chat. The handler is typed in cloud but its shape is not yet emitted, so the fields are not listed here — ask the MCP door's describe for post_agents_chat, which answers from the running route.

Response

The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.

Examples

hanzo has no subcommand for this operation — the CLI serves only what cloud's live route table confirms. Use HTTP or an SDK.


Agents API · All Hanzo APIs · Interactive reference

How is this guide?

On this page