Legacy
Stream agent execution in real-time
deprecated
Stream an existing agent execution in real-time via SSE, providing live message chunks, tool calls, and status updates until completion.
POST
Stream agent execution in real-time
Related guide: Build agents guide. See the Build agents guide for a walkthrough with examples.
This endpoint is deprecated. Use the Responses API instead.
Authorizations
Body
application/json
Request body for invoking an existing agent (stream-task endpoint). Used to start a new task or continue an existing conversation.
Response
Server-Sent Event stream successfully established. Returns real-time events including agent messages, tool calls, status updates, and completion signals. The stream ends with a [DONE] sentinel value.
Initial event emitted when an agent stream begins. Contains the task ID for tracking, workspace context, and trace ID for observability.
- Agent Execution Started Event
- Agent Started Event
- Agent Thought Event
- Agent Inactive Event
- Agent Errored Event
- Action Review Requested Event
- Action Reviewed Event
- Execution Review Required Event
- Execution Reviewed Event
- Execution Named Event
- Agent Handed Off Event
- Agent Message Created Event
- Tool Execution Started Event
- Tool Execution Finished Event
- Tool Execution Failed Event
- Timeout Event
- Error Event