Invoke Agent (Sync)
Execute an agent and wait for completion. Returns the final result.
Path Parameters
Request Body
Onlyinput is required, with the prompt in input.text. input.user is optional. When you send it, input.user.email is required. user_oidc_token is optional and is used by skills that sign in with MCP OAuth.
id from a previous task’s response to continue the same conversation. The agent will have full context of all prior messages. If omitted, a new thread is created automatically.true, files passed in input.files are not injected into the LLM context window. The file URLs are still available to the agent’s tools, but the raw content won’t be prepended to the prompt.Use this when:- Files are large (would exceed the model’s context limit)
- You want tools to process the files rather than the LLM reading them directly
- You’re passing many files and don’t need them all in context
false): file contents are downloaded, extracted, and injected directly into the LLM prompt as context.default for standard reasoning, harder for deeper chain-of-thought analysis. Use harder for complex multi-step tasks that benefit from more deliberate planning.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."A bulleted list of key findings"). Guides the agent’s response style.openai, anthropic, bedrock) from GET /v1/misc/llm_providers. Omit to use the agent’s configured provider.GET /v1/misc/llm_providers/{provider_identifier}/models). Examples: claude-sonnet-4-6, gpt-5, gemini-2.0-flash. Omit to use the agent’s configured model.low, medium, high, xhigh. Omit to use the agent’s configured reasoning effort.Query Parameters
"draft" to test undeployed changes.Response
The response is the full task object. The key fields you’ll use:id in your next request to continue the conversation.completed, failed, error, or stoppedoutput_format is json, this is a JSON string — parse it with JSON.parse() or jq.null when you did not override it.null when you did not override it.null when you did not override it.Simplest Possible Invoke
Multi-Turn Conversation
Pass theid from the first response to continue the thread:
id for follow-ups.
With User Identity
Pass the user’s identity so the agent can personalize responses and use identity-aware skills:user object as context. When you send user, email is required and id is optional.
With MCP OAuth
Passuser_oidc_token when the agent uses MCP skills that sign in with OAuth on behalf of the user:
Processing Files
Files passed ininput.files are downloaded and injected directly into the LLM context window by default. This works well for small-to-medium files:
Large Files
A large file is still accepted. This request sends a 185-page PDF, and the agent answers correctly:Disable Context Injection
Setdisable_attachment_injection: true to pass the file URL to the agent’s tools without injecting its content into the LLM prompt:
Per-Request Instruction Override
Append instructions for this specific invocation without changing the agent’s configuration:Per-Execution LLM Override
Override the agent’s configured provider, model, or reasoning effort for a single invocation without mutating the agent. Useful for A/B testing models, routing specific requests to a stronger or cheaper model, or dialing up reasoning effort on complex prompts:llm_model_provider, llm_model_name and llm_reasoning_effort. A field you did not override is null in the response, and the agent’s configured value applies.
Structured JSON Output
Request structured output with a JSON Schema:output_format and output_schema on the agent itself, use the Update Agent endpoint or configure it in the dashboard under the Output tab.Example Response
See Also
- Invoke Agent (Async) — returns immediately with a task ID for polling
- Invoke Agent (Stream) — real-time SSE stream of agent activity
- Get Thread — retrieve the full conversation history
- Webhook documentation — trigger agents from external systems via the auto-generated
webhook_url
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, email, api Forces gateway sub-task dispatch: 'sync' runs all downstream sub-tasks inline, 'async' queues them all, 'auto' restores the computed per-sub-task decision.
sync, async, auto 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.
sync, async, auto 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 
