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"Thread ID for conversation context. This ID is critical for multi-turn conversations:
- If not provided: A UUID will be automatically generated (recommended for single-turn requests)
- First message in conversation: Provide a unique UUID and save it for subsequent messages
- Follow-up messages: Use the same
idfrom the first request to maintain conversation history - The agent will remember all previous messages in the thread when you reuse the same ID
"a37db9a1-e483-4544-9136-b32120ae8c81"Multi-Turn Conversations: To enable the agent to remember previous messages, always use the same
id for all requests in a conversation thread. Each unique id represents a separate conversation session. The response will include the same id (whether you provided it or it was auto-generated).Response
Returns a completeAgentExecution object with the final result:
Unique identifier for the created task (UUID) - this is the thread ID if you provided one
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 (may be null)
ISO 8601 timestamp of when the task finished
The output format specified in the request
The output schema if provided in the request
The task title if provided
The source identifier (e.g., “api”)
Whether event streaming was enabled
Custom metadata attached to the task
Parent task information if this is a sub-task
Array of sub-task executions spawned by this task
UUID of the agent that triggered this task (if delegated)
Example Requests
Basic Request
Structured JSON Output
With User Context and Custom Metadata
Markdown Output with Context
Multi-Turn Conversation
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 - Multi-Turn Conversations: Use the same
idparameter across requests to maintain conversation context. The agent will remember all previous messages in the thread.
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
- [Get Task Thread](/API reference/v1/tasks/get-thread) - View complete conversation history for a thread
- [List Tasks](/API reference/v1/tasks/list-tasks) - Query and filter task history
- Agent Memory - Configure how agents store and recall conversation history
Authorizations
Path Parameters
Body
application/json
Available options:
text, markdown, json Response
Available options:
pending, executing, paused, error, failed, completed, stopped Available options:
text, markdown, json 
