Skip to content

Tasks

Get Task by ID
client.tasks.retrieve(stringtaskID, TaskRetrieveParams { relationships } query?, RequestOptionsoptions?): TaskRetrieveResponse { id, agents, cleaned_at, 7 more }
GET/tasks/{task_id}
Delete Task by ID
client.tasks.delete(stringtaskID, RequestOptionsoptions?): DeleteResponse { id, message }
DELETE/tasks/{task_id}
List Tasks
client.tasks.list(TaskListParams { agent_id, agent_name, limit, 6 more } query?, RequestOptionsoptions?): TaskListResponse { id, agents, cleaned_at, 6 more }
GET/tasks
Stream Task Events by ID
client.tasks.streamEvents(stringtaskID, RequestOptionsoptions?): TaskStreamEventsResponse | Stream<TaskStreamEventsResponse>
GET/tasks/{task_id}/stream
Get Task by Name
client.tasks.retrieveByName(stringtaskName, TaskRetrieveByNameParams { relationships } query?, RequestOptionsoptions?): TaskRetrieveByNameResponse { id, agents, cleaned_at, 7 more }
GET/tasks/name/{task_name}
Delete Task by Name
client.tasks.deleteByName(stringtaskName, RequestOptionsoptions?): DeleteResponse { id, message }
DELETE/tasks/name/{task_name}
Stream Task Events by Name
client.tasks.streamEventsByName(stringtaskName, RequestOptionsoptions?): TaskStreamEventsByNameResponse | Stream<TaskStreamEventsByNameResponse>
GET/tasks/name/{task_name}/stream
Update Task by ID
client.tasks.updateByID(stringtaskID, TaskUpdateByIDParams { merge_params, task_metadata } body, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
PUT/tasks/{task_id}
Update Task by Name
client.tasks.updateByName(stringtaskName, TaskUpdateByNameParams { merge_params, task_metadata } body, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
PUT/tasks/name/{task_name}
Complete Task
client.tasks.complete(stringtaskID, TaskCompleteParams { reason } body?, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
POST/tasks/{task_id}/complete
Fail Task
client.tasks.fail(stringtaskID, TaskFailParams { reason } body?, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
POST/tasks/{task_id}/fail
Cancel Task
client.tasks.cancel(stringtaskID, TaskCancelParams { reason } body?, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
POST/tasks/{task_id}/cancel
Terminate Task
client.tasks.terminate(stringtaskID, TaskTerminateParams { reason } body?, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
POST/tasks/{task_id}/terminate
Timeout Task
client.tasks.timeout(stringtaskID, TaskTimeoutParams { reason } body?, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
POST/tasks/{task_id}/timeout
Query Task Workflow
client.tasks.queryWorkflow(stringqueryName, TaskQueryWorkflowParams { task_id } params, RequestOptionsoptions?): TaskQueryWorkflowResponse
GET/tasks/{task_id}/query/{query_name}
Interrupt Task
client.tasks.interrupt(stringtaskID, TaskInterruptParams { reason } body?, RequestOptionsoptions?): Task { id, cleaned_at, created_at, 6 more }
POST/tasks/{task_id}/interrupt
ModelsExpand Collapse
Task { id, cleaned_at, created_at, 6 more }
id: string
cleaned_at?: string | null
created_at?: string | null
name?: string | null
params?: Record<string, unknown> | null
status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null
One of the following:
"CANCELED"
"COMPLETED"
"FAILED"
"RUNNING"
"INTERRUPTED"
"TERMINATED"
"TIMED_OUT"
"DELETED"
status_reason?: string | null
task_metadata?: Record<string, unknown> | null
updated_at?: string | null
TaskRetrieveResponse { id, agents, cleaned_at, 7 more }

Task response model with optional related data based on relationships

id: string
agents?: Array<Agent { id, acp_type, created_at, 9 more } > | null
id: string

The unique identifier of the agent.

acp_type: AcpType

The type of the ACP Server (Either sync or async)

One of the following:
"sync"
"async"
"agentic"
created_at: string

The timestamp when the agent was created

formatdate-time
description: string

The description of the action.

name: string

The unique name of the agent.

updated_at: string

The timestamp when the agent was last updated

formatdate-time
agent_input_type?: "text" | "json" | null

The type of input the agent expects.

One of the following:
"text"
"json"
production_deployment_id?: string | null

ID of the current production deployment.

registered_at?: string | null

The timestamp when the agent was last registered

formatdate-time
registration_metadata?: Record<string, unknown> | null

The metadata for the agent’s registration.

status?: "Ready" | "Failed" | "Unknown" | 3 more

The status of the action, indicating if it’s building, ready, failed, etc.

One of the following:
"Ready"
"Failed"
"Unknown"
"Deleted"
"Unhealthy"
"BuildOnly"
status_reason?: string | null

The reason for the status of the action.

cleaned_at?: string | null
created_at?: string | null
name?: string | null
params?: Record<string, unknown> | null
status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null
One of the following:
"CANCELED"
"COMPLETED"
"FAILED"
"RUNNING"
"INTERRUPTED"
"TERMINATED"
"TIMED_OUT"
"DELETED"
status_reason?: string | null
task_metadata?: Record<string, unknown> | null
updated_at?: string | null
TaskListResponse = Array<TaskListResponseItem>
id: string
agents?: Array<Agent { id, acp_type, created_at, 9 more } > | null
id: string

The unique identifier of the agent.

acp_type: AcpType

The type of the ACP Server (Either sync or async)

One of the following:
"sync"
"async"
"agentic"
created_at: string

The timestamp when the agent was created

formatdate-time
description: string

The description of the action.

name: string

The unique name of the agent.

updated_at: string

The timestamp when the agent was last updated

formatdate-time
agent_input_type?: "text" | "json" | null

The type of input the agent expects.

One of the following:
"text"
"json"
production_deployment_id?: string | null

ID of the current production deployment.

registered_at?: string | null

The timestamp when the agent was last registered

formatdate-time
registration_metadata?: Record<string, unknown> | null

The metadata for the agent’s registration.

status?: "Ready" | "Failed" | "Unknown" | 3 more

The status of the action, indicating if it’s building, ready, failed, etc.

One of the following:
"Ready"
"Failed"
"Unknown"
"Deleted"
"Unhealthy"
"BuildOnly"
status_reason?: string | null

The reason for the status of the action.

cleaned_at?: string | null
created_at?: string | null
name?: string | null
status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null
One of the following:
"CANCELED"
"COMPLETED"
"FAILED"
"RUNNING"
"INTERRUPTED"
"TERMINATED"
"TIMED_OUT"
"DELETED"
status_reason?: string | null
task_metadata?: Record<string, unknown> | null
updated_at?: string | null
TaskStreamEventsResponse = unknown
TaskRetrieveByNameResponse { id, agents, cleaned_at, 7 more }

Task response model with optional related data based on relationships

id: string
agents?: Array<Agent { id, acp_type, created_at, 9 more } > | null
id: string

The unique identifier of the agent.

acp_type: AcpType

The type of the ACP Server (Either sync or async)

One of the following:
"sync"
"async"
"agentic"
created_at: string

The timestamp when the agent was created

formatdate-time
description: string

The description of the action.

name: string

The unique name of the agent.

updated_at: string

The timestamp when the agent was last updated

formatdate-time
agent_input_type?: "text" | "json" | null

The type of input the agent expects.

One of the following:
"text"
"json"
production_deployment_id?: string | null

ID of the current production deployment.

registered_at?: string | null

The timestamp when the agent was last registered

formatdate-time
registration_metadata?: Record<string, unknown> | null

The metadata for the agent’s registration.

status?: "Ready" | "Failed" | "Unknown" | 3 more

The status of the action, indicating if it’s building, ready, failed, etc.

One of the following:
"Ready"
"Failed"
"Unknown"
"Deleted"
"Unhealthy"
"BuildOnly"
status_reason?: string | null

The reason for the status of the action.

cleaned_at?: string | null
created_at?: string | null
name?: string | null
params?: Record<string, unknown> | null
status?: "CANCELED" | "COMPLETED" | "FAILED" | 5 more | null
One of the following:
"CANCELED"
"COMPLETED"
"FAILED"
"RUNNING"
"INTERRUPTED"
"TERMINATED"
"TIMED_OUT"
"DELETED"
status_reason?: string | null
task_metadata?: Record<string, unknown> | null
updated_at?: string | null
TaskStreamEventsByNameResponse = unknown
TaskQueryWorkflowResponse = Record<string, unknown>