Agents Start Chat
[MODE:SIDEEFFECTS] Tier: overseer. Not idempotent.
Starts an Agent chat container on the Marquee through POST /api/agents/:id/chats.
The Marquee must be funded. Unpaid Marquees return MARQUEE_NOT_FUNDED.
When to use
- Initial bring-up of a new Agent.
- After Marquee was unreachable and chats fell over — reconnects to existing session when possible.
- Following
fibe_agents_runtime_statusreturningstatus:"missing".
Inputs
| Field | Type | Required | Notes |
|---|---|---|---|
id_or_name | int or string | yes | Agent ID or name |
marquee_id is read from FIBE_MARQUEE_ID env — failing fast if unset.
Output
HTTP 202 envelope describing the chat session (pending initially, transitions to running once background provisioning finishes).
Behavior
- Validates the Agent and its target Marquee.
- Refuses if Marquee is not
chat_launchable(returnsMARQUEE_NOT_READY). - Reuses an existing chat record where possible (idempotent reconnect for the same Marquee).
- Enqueues background deployment when the chat is
pending. - Deployment recreates the runtime with
--pull always, so starts and restarts pick up the latest configured Agent image.
Gotchas
FIBE_MARQUEE_IDis required in the Agent's environment — without it the SDK errors before sending a request.- Marquee not
running→MARQUEE_NOT_READY. Unpaid Marquee →MARQUEE_NOT_FUNDED. Bring the Marquee up and fund it first (fibe_resource_mutate(resource:"marquee", operation:"test_connection")then status check). - Existing chats on a different Marquee are preserved; new deployment goes on the requested Marquee.
- Status flips async — expect
pendingduring start/restart and callfibe_agents_runtime_statusto confirmrunning. - Authentication state is separate; the Agent may need
authenticatebefore processing messages even when chat isrunning.
Related
fibe_agents_runtime_status— health check after start.fibe_agents_send_message— first-message after bring-up.fibe_resource_mutate(resource:"agent", operation:"restart_chat")— marks an existing chatpending, redeploys it, and replaces the old runtime when healthy.