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.
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; 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.
Get a Conversation
Returns recent conversation messages for the published agent. Query params:Operations
The gateway requires the same Postgres cluster as the conductor, Redis, the published-agent API key pepper, and a private conductor URL:
The gateway refuses to start when the Postgres role is a
SUPERUSER or has BYPASSRLS, because published_agents and gateway_runs reads are tenant-scoped by RLS. Use the same application-role pattern as the conductor.
Health endpoints: