v2

OpenAPI 3.0.02026-08-051996591.2 MB
A2A Protocol

Cancel A2A v1 task

Cancels a running task. Returns its state after cancellation in the v1 wire format. Returns 409 if the task is not currently running.

post/v2/agents/{agent_key}/tasks/{task_id}:cancel

Path parameters

agent_keystring required

A unique key that identifies an agent.

Example:customer_support

The unique key of the agent.

task_idstring required

The A2A task id, as returned in task.id. Opaque — do not construct or parse.

Headers

Request-Timeoutinteger

The platform makes a best effort to complete the request in the specified seconds, or it times out.

Request-Timeout-Millisinteger

The platform makes a best effort to complete the request in the specified milliseconds, or it times out.

Response

The task state after cancellation.

idstring required

Unique identifier of the task.

contextIdstring

Identifier of the conversation context the task belongs to.

metadataobject nullable

Arbitrary agent-supplied metadata for the task.