Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

A2A Tasks

Agent-to-Agent task delegation following the A2A protocol. Agents can create tasks for other agents, track progress, and receive results.

GET /api/v1/a2a/tasks

List all tasks.

Query parameters

ParamTypeDefaultDescription
statusstringallFilter by pending, running, completed, failed
agentstringallFilter by assigned agent

Response 200 OK

[
  {
    "id": "task-001",
    "from": "orchestrator",
    "to": "researcher",
    "status": "completed",
    "input": {"query": "latest Rust async runtimes"},
    "output": {"summary": "Top 3 runtimes: tokio, async-std, smol"},
    "created_at": "2026-03-17T09:00:00Z",
    "completed_at": "2026-03-17T09:00:05Z"
  }
]

GET /api/v1/a2a/tasks/

Get a single task by ID.

Response 200 OK — same shape as the array element above.

Returns 404 if the task does not exist.

POST /api/v1/a2a/tasks

Create a new task.

Request body

{
  "from": "orchestrator",
  "to": "researcher",
  "input": {"query": "compare WASM runtimes"}
}

Response 201 Created

{
  "id": "task-002",
  "status": "pending",
  "created_at": "2026-03-17T10:00:00Z"
}

GET /api/v1/a2a/events

SSE stream of task lifecycle events.

Event types

EventDescription
task_createdNew task submitted
task_startedAgent began processing
task_progressIntermediate progress update
task_completedTask finished successfully
task_failedTask failed with error