Task (A2A)
The stateful unit of work an A2A agent creates to track a request, with a server-generated id, a status, artifacts and message history.
In A2A, a task is the stateful unit of work a remote agent creates to track a client’s request, identified by a unique id and moving through a defined lifecycle. Tasks are what make long-running and multi-turn work between agents trackable.
When a task exists. A client starts with Send Message. The agent may answer a simple exchange with a direct Message, or create a Task and return it (specification section 3.1.1). Task ids are always generated by the server. A client cannot create a task with its own id, and a message that references an unknown taskId gets TaskNotFoundError (section 3.4.2).
Shape. The Task message in a2a.proto requires id and status, and adds contextId, artifacts, history and metadata. The status object holds the current state, an optional status message and a timestamp. Results belong in artifacts: section 3.7 says messages should not be used to deliver task outputs. A JSON-RPC SendMessage result wraps the task in a task member:
{
"jsonrpc": "2.0",
"id": 1,
"result": {
"task": {
"id": "b1f6d9e2-4c1a-4e8e-9a51-2f0c7d3e8a10",
"contextId": "5d0c7a4e-91b2-4f3a-8e6d-0a9c2b7f1e33",
"status": {"state": "TASK_STATE_COMPLETED", "timestamp": "2026-09-25T14:03:11.482Z"},
"artifacts": [
{"artifactId": "a-1", "name": "Answer", "parts": [{"text": "Shipment 4471 was delivered at 09:12."}]}
]
}
}
}
Following progress. A client tracks a task by polling Get Task, by streaming through Send Streaming Message or Subscribe to Task when the Agent Card declares streaming, or through push notifications to a webhook it registers (section 3.5). List Tasks and Cancel Task complete the core task operations.
Immutability. Once a task reaches a terminal state it cannot restart. A follow-up or refinement starts a new task in the same contextId, and the client can point back to the earlier task with referenceTaskIds (Life of a Task guide). This gives each task a fixed record of its inputs, outputs and artifacts.
Sources
- A2A Protocol Specification, section 3.1: Core Operations (accessed )
- A2A Protocol Specification, section 3.4: Multi-Turn Interactions (accessed )
- A2A Protocol Specification, section 3.7: Messages and Artifacts (accessed )
- A2A protocol definition (a2a.proto): Task, TaskStatus (accessed )
- A2A documentation: Life of a Task (accessed )