Skip to main content
The task command group provides functionality to manage A2A tasks, including retrieving task status, canceling tasks, resubscribing to task streams, and managing push notification configurations.

get

Retrieve the current status and details of a task.
handler task get <agent_url> <task_id> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent that owns the task
task_id
string
required
Unique identifier of the task to retrieve

Options

--history-length
integer
Number of history messages to include in the response. Short form: -n
--bearer
string
Bearer token for authentication. Overrides saved credentials. Short form: -b
--api-key
string
API key for authentication. Overrides saved credentials. Short form: -k

Examples

handler task get http://localhost:8000 task_abc123

Response Format

Successful responses include:
  • Task ID: The unique identifier of the task
  • State: Current state (e.g., working, completed, cancelled, failed)
  • Context ID: Associated conversation context (if available)
  • Text: Latest response or status message from the agent

cancel

Request cancellation of a running task.
handler task cancel <agent_url> <task_id> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent that owns the task
task_id
string
required
Unique identifier of the task to cancel

Options

--bearer
string
Bearer token for authentication. Overrides saved credentials. Short form: -b
--api-key
string
API key for authentication. Overrides saved credentials. Short form: -k

Examples

handler task cancel http://localhost:8000 task_abc123
Cancellation is a request to the agent. The agent may complete some work before fully canceling, or may not support cancellation for certain task types.

resubscribe

Resubscribe to a task’s Server-Sent Events (SSE) stream after disconnection. Useful for reconnecting to long-running tasks.
handler task resubscribe <agent_url> <task_id> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent that owns the task
task_id
string
required
Unique identifier of the task to resubscribe to

Options

--bearer
string
Bearer token for authentication. Overrides saved credentials. Short form: -b
--api-key
string
API key for authentication. Overrides saved credentials. Short form: -k

Examples

handler task resubscribe http://localhost:8000 task_abc123
Use resubscribe when your streaming connection drops but the task is still running on the agent. This reconnects you to receive ongoing updates.

notification set

Configure a push notification webhook for a task. The agent will send updates to the specified URL as the task progresses.
handler task notification set <agent_url> <task_id> --url <webhook_url> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent that owns the task
task_id
string
required
Unique identifier of the task to configure notifications for

Options

--url
string
required
Webhook URL to receive notifications. Short form: -u
--token
string
Authentication token for the webhook. The agent will include this in notification requests. Short form: -t
--bearer
string
Bearer token for agent authentication. Overrides saved credentials. Short form: -b
--api-key
string
API key for agent authentication. Overrides saved credentials. Short form: -k

Examples

handler task notification set http://localhost:8000 task_abc123 \
  --url http://localhost:9000/webhook

Response Format

Successful configuration includes:
  • Task ID: The task identifier
  • URL: The webhook URL
  • Token: Masked token (first 20 characters shown)
  • Config ID: Unique identifier for this notification configuration
You can start a local webhook server using handler server push to receive notifications during development.

notification get

Retrieve the push notification configuration for a task.
handler task notification get <agent_url> <task_id> [OPTIONS]

Arguments

agent_url
string
required
URL of the A2A agent that owns the task
task_id
string
required
Unique identifier of the task

Options

--config-id
string
Specific push notification config ID to retrieve. Short form: -c
--bearer
string
Bearer token for authentication. Overrides saved credentials. Short form: -b
--api-key
string
API key for authentication. Overrides saved credentials. Short form: -k

Examples

handler task notification get http://localhost:8000 task_abc123

Response Format

Returns the notification configuration including:
  • Task ID: The task identifier
  • URL: The webhook URL
  • Token: Masked token value
  • Config ID: Unique configuration identifier
The token is masked in the output for security. Only the first 20 characters are shown.