A2A Task Lifecycle — A2A Protocol & Google ADK
[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4
SEQ. 5
A2A Task Lifecycle
How Tasks Flow Between Agents
In A2A, work is organized around Tasks - structured units of work that flow between a Client Agent and a Remote Agent.
Task State Machine
┌───────────┐ ┌───────────┐ ┌───────────┐
│ submitted │────▶│ working │────▶│ completed │
└───────────┘ └─────┬─────┘ └───────────┘
│
┌─────▼──────────┐
│ input-required │ (needs input from client)
└─────┬──────────┘
│
┌─────▼─────────────┐
│ failed / canceled │
└───────────────────┘
Task Lifecycle Example
// 1. Client creates a task (JSON-RPC message/send or tasks/send)
POST /a2a
{
"jsonrpc": "2.0",
"id": 1,
"method": "message/send",
"params": {
"message": {
"role": "user",
"parts": [{ "kind": "text", "text": "Book a flight from London to New York on 2026-05-15" }]
}
}
}
// 2. Remote agent processes and responds
{
"taskId": "task_abc123",
"status": { "state": "working" },
"updates": [
{ "type": "status", "message": "Searching 5 airlines..." },
{ "type": "status", "message": "Found 12 flights" }
]
}
// 3. Agent might need clarification (input-required)
{
"status": { "state": "input-required" },
"question": "Do you prefer direct flights only or include layovers?",
"options": ["direct_only", "include_layovers"]
}
// 4. Client responds, agent completes
{
"status": { "state": "completed" },
"artifacts": [{
"flight": "BA177",
"price": "$542",
"departure": "09:15"
}]
}
Key A2A Interaction Patterns
| Pattern | Description | Use Case |
|---|---|---|
| Fire-and-Forget | Submit task, don't wait | Background processing, batch jobs |
| Request-Response | Submit task, wait for result | Simple delegation (booking, search) |
| Streaming | Receive real-time updates | Research, long-running analysis |
| Negotiation | Propose → Counter → Accept | Price negotiation, scheduling |
🎯 Pro Tip: Always implement the
input-required state. Real-world tasks frequently need clarification. An agent that can ask for input mid-task is far more useful than one that guesses and fails.⌨ HANDS-ON LABMonitor A2A Task State Transitions
⭐ +150 XPTrack an A2A task through its formal lifecycle: Submitted -> Working -> Completed with progress telemetry.
1Monitor A2A task lifecycle telemetry.
OBJECTIVE 1 / 1 — type "hint" if stuck
SYNAPSE VERIFICATION
QUERY 1 // 3
What happens when an A2A task enters the 'input-required' state?
The task is cancelled
The remote agent needs input or clarification from the client before it can continue
The server crashes
The task retries automatically