Receive streamed responses
Display an agent's response while it is generated through SSE or an official SDK.
Updated August 3, 2026 Β· 12 minWhen to use streaming
Streaming improves perceived chat speed by delivering text fragments as generated.
POST /v1/agents/{AGENT_ID}/responses/stream
Accept: text/event-stream
It accepts the regular response body, including conversation_id.
Process events
response.created: conversation identifier.response.output_text.delta: text fragment.response.completed: full text and public citations.error: terminates with code and message.
const events = client.responses.stream({ message: "Summarize this opportunity", conversationId, signal });
for await (const event of events) if (event.type === "response.output_text.delta") process.stdout.write(event.delta);
Use collectStream(...) for a normalized final response.
Do not automatically retry a started stream: the message may already have been accepted.