a2a-protocol
A2A Protocol
Overview
The Agent2Agent (A2A) protocol lets agents built on different frameworks discover each other through an Agent Card, exchange messages, and run long-lived tasks without exposing their internals. The current spec is 1.0 (a2a-protocol.org/v1.0.0/specification) with three bindings: JSON-RPC 2.0 over HTTP, HTTP+JSON/REST and gRPC; streaming uses SSE and async work can use webhook push notifications. This skill was checked against a2a-sdk 1.2.1 (Python) and @a2a-js/sdk 1.3.0.
Most tutorials online still show the 0.2/0.3 API (A2AStarletteApplication, TextPart, /.well-known/agent.json, A2AClient). Those no longer exist in 1.x. If a project pins a2a-sdk<1, follow the SDK's v0.3 to v1.0 migration guide (docs/migrations/v1_0 in the a2a-python repo) rather than mixing styles.
Instructions
1. Core concepts (v1.0)
- Agent Card: JSON served at
/.well-known/agent-card.json. Lists name, version,supportedInterfaces(one entry per transport:protocolBindingJSONRPC,HTTP+JSONorGRPC, plusurl), capabilities, skills and security schemes. There is no top-levelurlany more. - Task: stateful unit of work. States:
TASK_STATE_SUBMITTED,WORKING,INPUT_REQUIRED,AUTH_REQUIRED,COMPLETED,FAILED,CANCELED,REJECTED. - Message: one turn with
role(ROLE_USER/ROLE_AGENT) andparts. APartis a single unified type withtext,raw(bytes),urlordata; the oldTextPart/FilePart/DataPartwrappers are gone. - Artifact: output of a task (documents, files, structured data).
- Enum names in the SDKs are SCREAMING_SNAKE_CASE (
TaskState.TASK_STATE_WORKING,Role.ROLE_USER).