Agents
Stream chat events
Relays OpenCode SSE events for this Daytona-backed chat runtime. Supports replay from buffered events using Last-Event-ID and transparently reconnects stopped or archived runtimes. Accepts either Bearer token auth or a short-lived stream token via query parameter. When both are provided, Bearer auth takes precedence.
get/agent/v2/chat/{id}/stream
Path parameters
idstring required
Chat session ID
Query parameters
tokenstring
Short-lived stream token from POST /agent/v2/chat/:id/stream-token. If provided, Bearer auth is not required.
lastEventIdinteger
Replay events after this sequence number
Response
SSE stream