Base URL
Use the externally advertised chat-gateway host. Published agent rows includepublicUrl when CHAT_GATEWAY_PUBLIC_HOST is set on the conductor:
Origin is present, and rate-limited per key.
Error Responses
Every route below can also return one of these shared errors:Send a Chat Message
Runs one message against a published agent. The gateway creates a conversation whenconversation_id is omitted, otherwise it reuses the existing conversation’s runtime session.
syncMaxDurationSeconds, the endpoint returns 504 with sync_timeout, conversation_id, and public_run_id. syncMaxDurationSeconds defaults to 60 and can be set between 1 and 270 when creating or updating a published agent through the conductor publish API.
There is a second, rarer 504 path: if the underlying watcher’s event stream closes before a terminal event is observed, the gateway also returns 504 with sync_timeout, but the body carries only { "error": "sync_timeout", "message": "run did not finish synchronously" }, with no conversation_id or public_run_id.
In both cases, use the run or stream endpoints below to resume.
Stream a Chat Message
Starts a run and streams public Server-Sent Events. The request body is the same as Send a Chat Message.
The gateway also sends
: ping heartbeat comments about every 15 seconds.
Get a Public Run
Returns the terminal output for a public run, or202 Accepted while it is still dispatching or running.
error runs return 502; lost runs return 410.
Resume a Public Run Stream
Subscribes to an in-flight public run when its watcher is still alive. If the run is already terminal, the gateway emits one reconstructeddone or error event from stored conversation history.