Python SDK for the Agent2Agent (A2A) Protocol
(a2a module, a2a-sdk distribution). It handles complex messaging, task management,
and communication across different transports (REST, gRPC, JSON-RPC).
- Language: Python 3.10+
- Package Manager:
uv - Lead Transports: Starlette (REST/JSON-RPC), gRPC
- Data Layer: SQLAlchemy (SQL), Pydantic (Logic/Legacy), Protobuf (Modern Messaging)
- Key Directories:
/src: Core implementation logic./tests: Comprehensive test suite./docs: AI guides and migration documentation.
You MUST do all of the following:
-
At the start of every task that touches files, read
docs/ai/coding_conventions.md,docs/ai/mandatory_checks.md, anddocs/ai/evidence_rules.md. -
Before declaring any task done, run the full check sequence in
docs/ai/mandatory_checks.md— including for markdown/comment/whitespace-only changes. -
On any mistake, load the
mistake-reflectionskill at.agents/skills/mistake-reflection/SKILL.mdbefore continuing your response. The skill appends a structured entry todocs/ai/ai_learnings.md(gitignored local journal) so the user can use those findings to improve the workflow.When unsure: load the skill. False positives are free; false negatives are how the same mistake recurs.
pyproject.toml defines extras (grpc, telemetry, postgresql,
etc.). The dev group installs a2a-sdk[all], so anything gated behind
an extra must still import lazily at runtime — the install-smoke
harness verifies this per profile.