API
Events (SSE)
Updated 2026-09-16
GET /api/v2/me/agents/:agentId/conversations/:sessionId/events is a Server-Sent Events stream with named events (event: chunk), always with data (even if it is {}).
Three rules that surprise people
- It is re-subscribable. On connecting you first receive everything the current turn already emitted, then the live feed. An F5, or coming back tomorrow, loses nothing. Disconnecting does not cancel the turn: the work belongs to the server.
- At rest you get a
doneright away, flaggedreposo: true("idle"), so you can tell "no turn" from "a turn finished". - Open permissions are re-sent on every subscription. The server doesn't know which screens are still alive. Dismiss them with
permission-resolved, which also covers another client answering.
There is a heartbeat every 25 s so no proxy cuts a long turn for silence.
Catalog
Minimal client in Node
Retries
If the connection drops, open it again: you get the replay and carry on. To find out whether the turn finished while you were away, look at ultimoTurno ("last turn") in GET …/conversations/:sessionId.