Defines core elements and flow for agent-to-agent communication including agent cards, messages and parts, tasks with streaming, artifacts as deliverables, discovery, transport, and authentication
Below is a clearer, more structured explanation of the core elements used in A2A (agent-to-agent) communication. The sequence follows discovery → messaging → long-running work → deliverables so you can map each technical diagram to the corresponding definitions and examples.Agent Card
An Agent Card is essentially a “business card” for an AI agent. It tells other agents:
Who the agent is (name, description, provider)
Where to reach it (URL / endpoint)
What it can do (capabilities and skills)
How to authenticate (security requirements)
Capabilities can include features like streaming, push notifications, or state transition history. Skills are detailed entries that list name, id, description, tags, examples, and supported input/output modes — effectively the agent’s advertised abilities.
Example Agent Card (Kubernetes-focused agent):
{ "name": "k8s_a2a_agent", "description": "An example A2A agent that knows how to use Kubernetes tools.", "url": "http://127.0.0.1:8083/api/a2a/kagent/k8s-a2a-agent/", "capabilities": { "streaming": true, "pushNotifications": false, "stateTransitionHistory": true }, "skills": [ { "id": "get-resources-skill", "name": "Get Resources", "description": "Get resources in the Kubernetes cluster", "tags": ["k8s", "resources"], "examples": [ "Get all resources in the Kubernetes cluster", "Get the pods in the default namespace" ], "inputModes": ["text"], "outputModes": ["text"] } ]}
Agent discovery returns the Agent Card so other agents know how to connect, which capabilities are available, and what authentication is required. Exposing accurate capabilities and skill metadata improves automated routing and orchestration in multi-agent systems.
Messages and Parts
Messages are the basic units that agents exchange. Each message typically includes metadata (sender, unique ID) and a list of parts. A part contains the actual content and can be one of:
text (plain user or system text)
file (binary content encoded as Base64 with a MIME type)
structured data (JSON payloads)
Example message parts:
{ "type": "text", "text": "Get the pods in default namespace"}
Artifacts
Artifacts are the tangible outputs produced by agents. Unlike messages (which are transient communication), artifacts are deliverables: reports, structured results, files, images, or any persistent output. Artifacts have unique IDs, names, and parts (using the same parts schema as messages).
Artifacts can also be streamed incrementally as they are produced (useful for large or long-running tasks).Tasks
Tasks model long-running or multi-step work that originates from a message. Tasks have well-defined lifecycles (submitted → working → completed/failed/canceled). While a task executes, it may stream status updates and partial artifacts before delivering final artifacts.Example task lifecycle with streaming partial results then final results:
Clients send Messages composed of Parts (text, files, structured data).
Agents create Tasks for long-running work, stream status and partial Artifacts while working, and return final Artifacts when done.
Other important concepts
Context: Groups related messages and tasks into sessions or conversations for consistent state.
Transport: Use secure channels such as HTTPS. See: HTTPS
Format: Standardize on formats like JSON and JSON-RPC 2.0. See: JSON and JSON-RPC 2.0
Authentication: Prefer robust schemes such as OAuth 2.0 or API keys. See: OAuth 2.0
Agent discovery & extensions: Protocol-level mechanisms for how agents locate each other and how optional extensions are negotiated
Security reminder: always authenticate and encrypt agent endpoints. Exposing discovery endpoints without proper authentication or TLS can leak capabilities and create attack surfaces.