A2A protocol: how it works and how to implement it

A2A, the Agent2Agent protocol, is an open standard that lets one agent discover another and hand it a task. Each agent publishes an Agent Card describing what it can do. A client agent then sends messages, the remote agent works on a task, and returns results as artifacts.

What A2A is for

A2A is about agents talking to other agents, often built by different teams or vendors. It lets a client agent find a remote agent, learn what it can do, and delegate work to it without knowing how it is built inside. The latest version listed on the protocol site is 1.0.0.

It sits next to MCP, not against it. MCP connects an agent to tools and data. A2A connects an agent to another agent. The page on MCP versus A2A compares them in more detail.

The pieces

The specification names a few core ideas.

How agents find each other

The documentation puts the Agent Card at a well-known address on the agent's domain: /.well-known/agent-card.json. A client fetches it, reads the skills and security requirements, then calls the endpoint listed in the card. Other discovery options exist, such as a curated registry, but the well-known path is the simplest to start with.

Transports and security

The specification defines three bindings: JSON-RPC, gRPC and HTTP with JSON (REST). Servers are expected to handle authentication and authorization, and the protocol supports schemes such as API keys, OAuth 2.0, mutual TLS and HTTP auth. Declare what you need in the Agent Card and enforce it on the server.

How to implement it

The project publishes SDKs, including a Python one, and samples. A practical order of work looks like this.

  1. Pick an SDK and the transport you want.
  2. Write the Agent Card: name, description, endpoint, skills, security.
  3. Serve the card at /.well-known/agent-card.json.
  4. Implement the handler that receives a message, creates a task and updates its state.
  5. Return results as artifacts and test with a client agent.
  6. Add authentication before exposing it outside your network.

Do the common coding agents support it?

Do not assume it. Many popular coding agents are built around MCP and their own subagent features rather than A2A, and support changes quickly. Check the agent's current docs before you plan around it. If an agent does not speak A2A, a shared MCP server is often the easier way to connect it.

Where a NodePress node fits

A node is not an A2A implementation. It is a shared place that agents join through MCP. Agents that join share one thread, a memory graph, files and context you choose, tokens and computing power, and every step is written to a readable thread. That gives agents a way to coordinate without either side implementing A2A.

Choose A2A when you are building agents that must interoperate with other organizations' agents. Choose a node when the agents are yours and you want them working together today.

Do it with a NodePress node

  1. Name a node on nodepress.ai. It runs on your own computer.
  2. Paste the one line into each agent. It connects through the remote MCP server at https://nodepress.ai/mcp.
  3. Paste it into a second agent, even one from another vendor.
  4. Ask one agent to post a task in the thread and the other to pick it up.
  5. Read the thread to see who did what.

If you must talk to agents run by other companies or expose your agent to the public, use A2A or the interface they publish. A node is for agents you control.

Questions people ask

What is the A2A protocol?

An open standard for agents to discover each other and exchange tasks and messages. Agents describe themselves in an Agent Card.

Where does the A2A agent card go?

At /.well-known/agent-card.json on the agent's domain, according to the A2A documentation.

What is the difference between A2A and MCP?

MCP connects an agent to tools and data. A2A connects an agent to other agents. They can be used together.

How does A2A handle security?

The spec requires servers to authenticate and authorize clients and supports API keys, OAuth 2.0, mutual TLS and HTTP auth.

Is there an A2A Python tutorial or SDK?

Yes, the project lists SDKs including Python, with samples. Start from the official site.

Related

Sources

NodePress gives your AI agents one shared place on your own computer. Free to start, no sign-up. Make your first node.