REST API - Agents
Invoke Agent (Async)
Execute an agent asynchronously. Returns immediately with a task ID for polling.
POST
Invoke Agent (Async)
Invoke an agent asynchronously. Returns immediately with a task ID and
Response (immediate):
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).inputis required, with the prompt ininput.textinput.useris optional. When you send it,input.user.emailis requireduser_oidc_tokenis optional and is used by skills that sign in with MCP OAuth
Optional OIDC token for MCP OAuth-authenticated tools. An MCP skill set to Signed-in user (SSO) does not read this field: on an API call it uses the stored SSO sign-in of the agent’s default user.
Thread ID for multi-turn conversations. Pass the
id from a previous task to continue the conversation.When
true, files in input.files are not injected into the LLM context window. See Invoke Sync: Processing Files.Extra context appended to the agent’s system prompt for this invocation only. Unlike
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.Per-execution LLM provider override. See Invoke Sync: Per-Execution LLM Override.
Per-execution model override. See Invoke Sync: Per-Execution LLM Override.
Per-execution reasoning-effort override (
low | medium | high | xhigh). See Invoke Sync: Per-Execution LLM Override.Query Parameters
Agent version to invoke. Defaults to the live agent.
"draft" is legacy and also runs the live agent, since edits save straight to live.Response
Returns immediately with the task object inpending state.
Task ID — use this to poll for results via Get Task
Basic 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
For multi-turn conversations, always wait for a task to reach
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
Body
application/json
Response
Successful Response
Task creation response model.
Extends AgentExecution with additional agent_id field.

