Path Parameters
Unique identifier of the agent to invoke (UUID format)
Request Body
Agent execution input containing the task details
Desired output format. Valid values:
text | json | markdownDefault: texttext: Plain text responsejson: Structured JSON output (use withoutput_schemafor validation)markdown: Formatted markdown response
JSON Schema to validate and structure the agent’s output. When provided with
output_format: "json", the agent will return data conforming to this schema.Example:Additional context to guide the agent’s behavior. Use this to specify tone, audience, constraints, or background information.Example:
"This is for executive leadership. Use professional tone and focus on business impact."Description of the expected output format, length, or structure. Helps guide the agent to produce the desired result.Example:
"A 500-word summary with 3 key recommendations and supporting data."Human-readable title for the task. Useful for identification and organization in task lists.Example:
"Q4 Sales Analysis"UUID of the parent task if this is a sub-task. Used for multi-agent workflows and task hierarchies.Example:
"550e8400-e29b-41d4-a716-446655440000"UUID of the agent that triggered this task. Used for tracking agent-to-agent delegation.Example:
"7c9e6679-7425-40de-944b-e07fc1f90ae7"Custom metadata to attach to the task. Any valid JSON object. Useful for tracking, routing, or application-specific data.Example:
Array of Model Context Protocol (MCP) server configurations to use during execution. Enables integration with external tools and services.Example:
Identifier for the source system or application that created this task. Useful for analytics and debugging.Example:
"mobile-app" | "web-dashboard" | "api-integration"Custom task ID. If not provided, a UUID will be automatically generated. Use this to map tasks to external system IDs.Example:
"custom-task-12345"Response
Returns a completeAgentExecution object with the final result:
Unique identifier for the created task (UUID)
UUID of the agent that executed this task
UUID of the organization
Task execution status:
completed, failed, errorThe input object that was provided
Task execution result content
ISO 8601 timestamp of when the task was created
ISO 8601 timestamp of when execution began
ISO 8601 timestamp of when the task finished
Example Requests
Basic Request
Structured JSON Output
With User Context and Custom Metadata
Markdown Output with Context
Example Response
Notes
- This endpoint waits for task completion before returning
- Recommended timeout: 30-60 seconds
- For long-running tasks, use [Invoke Agent (Async)](/API reference/v1/agents/invoke-async) instead
- The agent must have
deployment_type: serverlessor be a running container
See Also
- [Invoke Agent (Async)](/API reference/v1/agents/invoke-async) - For long-running tasks that don’t need immediate results
- [Invoke Agent (Stream)](/API reference/v1/agents/invoke-stream) - For real-time streaming responses
- [Get Task](/API reference/v1/tasks/get-task) - Retrieve task details and results
- [List Tasks](/API reference/v1/tasks/list-tasks) - Query and filter task history
Authorizations
API Key for authentication
Path Parameters
Body
application/json
Available options:
text, markdown, json Response
Successful Response
Task creation response model.
Extends AgentExecution with additional agent_id field.
Available options:
pending, executing, paused, error, failed, completed, stopped Available options:
text, markdown, json 
