Skip to main content
POST
Stream Runs & Threads
Set 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

Streaming responses include:

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:
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.

Thread WebSocket

The WebSocket surface is the canonical live thread stream:
The initial frame is a 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

Use stream: false when you only need the final result: