Stream Runs & Threads
Agents
Stream Runs & Threads
Stream immediate run output with SSE and live thread frames with WebSockets
POST
Stream Runs & Threads
Set
Streaming responses include:
Common SSE categories include agent text deltas, tool calls, tool results, errors, and completion frames. The exact run stream payload is produced by the active runtime.
The initial frame is a
stream to true, or omit it, to receive a Server-Sent Events response from POST /v1/run.
Use the thread WebSocket when you want durable thread state plus live token, reasoning, source, and tool-output deltas.
Request
Event Shape
Event names and payloads are produced by the active agent runtime and may vary by execution mode. Clients should parse SSE frames generically:Thread WebSocket
The WebSocket surface is the canonical live thread stream:snapshot with protocol_version: 1. Owners receive live content. Admin broader-view sockets receive a metadata-only snapshot when they are not the thread owner.
Transient frames such as assistant_message_delta, assistant_thinking_delta, assistant_message_source, tool_call_started, tool_output_delta, and tool_call_completed are live-only. Final assistant_message, tool_call, and tool_result frames are durable thread events.
Thread API
See the full frame catalog and thread-event publish route.
Non-Streaming Alternative
Usestream: false when you only need the final result: