Skip to main content
GET /api/v1/cloud/sessions/{session_id}/events/stream Streams public Session events as Server-Sent Events.

Path parameters

Query parameters

Headers

Example request

Request both supported event delta types:

Response

The response uses text/event-stream. Each data: payload is one of:
  • a complete public Event object, called a buffered event below, which is recorded in Session event history and includes an SSE id: cursor;
  • a stream-only event delta frame, whose SSE id: is the ID of the event being streamed.
The model request boundaries in buffered output follow the model request span event schemas.

Stream format

Each event is emitted with standard SSE fields:
The server sends : heartbeat comment lines periodically to keep the connection alive.

Event delta frames

Incremental agent.message output emits event_start followed by one or more event_delta frames. Incremental agent.thinking output emits only event_start.
Each frame’s SSE id: is the ID of the event being streamed. Its JSON payload does not include top-level id or processed_at fields. Event delta frames do not appear in list/history responses. Retained deltas are available for reconnect only while the event is still in progress; after the buffered agent.message is written, historical deltas are no longer replayed.

Reconnection

For normal buffered events, Last-Event-ID resumes after the specified event. An in-progress incrementally streamed event has additional behavior because its event_start, all event_delta frames, and final buffered event share one ID:
  1. A cursor before the current event_start replays its retained start and historical deltas while generation is still in progress.
  2. A cursor equal to the in-progress event ID skips its historical deltas and receives only future deltas and the final buffered event.
  3. After generation completes, reconnecting from an earlier buffered event returns the final agent.message, not historical deltas.
To rebuild an entire in-progress event, reconnect from the buffered event immediately before its event_start and reprocess frames keyed by their shared event ID. See SSE Event Stream for the complete client guidance.

Errors

Example: 404 Session not found

See Errors for the full error envelope.