Member-only story
A2a Protocol
A2a
Google A2a
Agentic Ai
A2a Vs Mcp
Task in A2A Protocol: The Core Abstraction of Distributed AI Systems
8 min readSep 6, 2025
Not a Medium member? Visit https://gyliu513.github.io/
Task Overview
In the Agent-to-Agent (A2A) protocol, Task is the most fundamental abstraction concept, representing a complete, traceable unit of work. Task is not just a simple message or request, but a complex object containing state, context, results, and metadata.
Why Do We Need Task?
In distributed AI systems, collaboration between agents often involves:
- Long-running tasks: Requiring state tracking and progress updates
- Multi-turn conversations: Requiring context maintenance and reference relationships
- Asynchronous processing: Requiring non-blocking task execution
- Error handling: Requiring task cancellation and retry mechanisms
- Result management: Requiring storage and transmission of complex result data
The Task abstraction perfectly addresses these challenges.
Core Properties of Task
1. Basic Identifiers
class Task:
id: str # Unique task identifier
context_id: str # Conversation context identifier
message_id: str # Associated message identifier
created_at: datetime # Creation time
updated_at: datetime # Last update…