Invoke Agent (Async)
Execute an agent asynchronously. Returns immediately with a task ID for polling.
status: "pending". Poll the Get Task endpoint to check when results are ready.
Use this for long-running tasks, background processing, or when you don’t want to block a request.
Path Parameters
Request Body
The request body is identical to Invoke Agent (Sync).input.textis requiredinput.user.idis requiredinput.user.emailis requireduser_oidc_tokenis optional for MCP OAuth-backed tools
id from a previous task to continue the conversation.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
Returns immediately with the task object inpending state.
pending on initial return. Transitions to executing → completed (or failed/error).null until the task completesBasic Example
Polling for Results
Example Response (After Completion)
Poll the task after it finishes to get the full result:Task Status Flow
pending → executing → completed | failed | error | stopped
completed before sending the next message with the same id. Sending a follow-up while the previous task is still executing may cause unexpected behavior.See Also
- Invoke Agent (Sync) — blocks until completion (best for quick tasks)
- Invoke Agent (Stream) — real-time SSE stream
- Get Task — poll for task status and results
- Webhook documentation — get notified when tasks complete instead of polling
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
Task creation response model.
Extends AgentExecution with additional agent_id field.
pending, executing, paused, error, failed, completed, stopped Model representing human-in-the-loop approval records for tasks.
Attributes: wait_node_id (str): The id of the node that triggered this HITL.
text, markdown, json, voice default, harder Snapshot of the LLM provider used for this execution (request override or agent default at run time).
Snapshot of the LLM model name used for this execution (request override or agent default at run time).
Snapshot of the reasoning effort applied during this execution, when supported by the model.
low, medium, high, xhigh 
