Invoke Agent (Stream)
Execute an agent with real-time Server-Sent Events (SSE). Reusing id continues the same task/thread.
Path Parameters
Request Body
The request body is identical to Invoke Agent (Sync). Onlyinput.text is required.
id from a previous task response to continue the same conversation. Continued turns keep using that same ID.true, files in input.files are not injected into the LLM context window. See Invoke Sync: Processing Files.default or harder. Controls reasoning depth.instructions_override (which adds behavioral instructions), this supplies supplementary facts or context the agent should consider for this run — e.g. relevant background data, the current state of an external system, or a user’s recent activity.low | medium | high | xhigh). See Invoke Sync: Per-Execution LLM Override.Query Parameters
"draft" to test undeployed changes.Response Format
ReturnsContent-Type: text/event-stream. Each SSE line is prefixed with data: and contains a JSON object with this top-level shape:
chunk events, data is a string fragment. For task lifecycle events, data is the task object snapshot at that moment.
id: "<previous-task-id>", the stream keeps emitting that same task_id. Use Get Task for the latest turn state and Get Task Thread or Get Task Thread (Full) for the full message history.Event Types
Events are emitted in this order during a typical invocation:status: "pending". This is emitted for both brand-new threads and follow-up turns on an existing task/thread ID.executing. Contains the updated task object.status, result, and finished_at.deep_planning is enabled on the agent).Basic Example
--no-buffer (or -N) for real-time output.
Real Event Stream
Here’s what the actual SSE output looks like from a live invocation:Consuming the Stream (Node.js)
Consuming the Stream (Python)
Notes
- Use
curl --no-bufferorcurl -Nfor real-time terminal output - The stream ends after the
task_finishedevent — close the connection at that point chunkevents contain raw text fragments; concatenate them for the full responsetool_call_requestandtool_call_resultevents let you show tool usage in your UIthinkandanalyzeevents show the agent’s reasoning (useful for debugging and transparency)- For multi-turn conversations, wait for
task_finishedbefore sending the next message with the sameid - Reusing
idcontinues the same task/thread; it does not mint a new top-level task ID for the follow-up turn - Get Task shows the latest turn state for that ID, while Get Task Thread and Get Task Thread (Full) show the accumulated conversation
See Also
- Invoke Agent (Sync) — blocks until completion
- Invoke Agent (Async) — returns task ID for polling
- Get Thread — retrieve conversation history after streaming
Authorizations
API Key for authentication
Path Parameters
Query Parameters
The agent/workflow version to invoke. default = latest
Body
text, markdown, json, voice default, harder Per-execution override for the LLM provider (e.g. 'openai', 'anthropic'). Falls back to the agent's configured provider when unset.
Per-execution override for the LLM model name. Falls back to the agent's configured model when unset.
Per-execution override for reasoning effort on reasoning-capable models.
low, medium, high, xhigh Surface that created this execution (mirrored to AgentExecutionHistory.source_node_type). Falls back to SourceNodeType.SDK at persist time when unset.
workbench, sdk, task, assistant, webhook, mcp, a2a, telegram, slack Response
Successful Response

