In words
What it is, why it matters, and what it is like.
Why am I learning this?
This lets you build AI systems where independent programs work together reliably, even if they were created by different people or companies. You already see this in complex agentic workflows—the step-by-step processes your library uses—where agents must coordinate to finish a task. Understanding protocols helps you spot the security trade-offs: every time you add a new way for agents to talk, you add a 'trust boundary,' which is simply the point where you can no longer fully verify who sent a message or whether it has been tampered with. This knowledge lets you see why some systems are fragile and how to design them so they remain secure as they grow.
The idea, in plain terms
Imagine you are in a busy office. People need to share information and ask each other to do things. If everyone just shouted whatever they wanted, in whatever order, with no rules about how to phrase a request or how to confirm it was understood, chaos would result: messages would be lost, requests would be misinterpreted, and nobody would know who was responsible for what. So the office adopts a set of rules: 'When you want something, write it on a form, hand it to the correct person, and they will write back either done or why not.' That set of rules—what a message looks like, how it's addressed, what responses are possible, and in what order—is a communication protocol. It doesn't tell anyone what to say, only the shape of the conversation. In the world of AI agents, the same problem appears. An agent (a program that uses a large language model to plan and act) needs to ask another agent for information, or ask it to perform a task, and then receive the result. Without a shared protocol, each agent would have to be custom-built to talk to each other specific agent—the same as if every person in the office had to learn a separate language for every colleague. A protocol is the shared language and etiquette that lets any agent talk to any other agent, as long as they both follow the rules.
An analogy
The best analogy is a postal system. When you send a letter, you don't need to know the exact person who will carry it, nor do you need to arrange for them to meet you. You write your message on paper, put it in an envelope, write the address in a standard format (street, city, postal code), and drop it in a mailbox. The postal service guarantees that if the address is right and you've paid the postage, the letter will arrive at the destination. The recipient reads it, and if they choose to reply, they do the same in reverse. The protocol here is the set of rules: the envelope size, the address format, the postage, the delivery guarantee. It doesn't matter what language the letter is written in, or what the content is—the protocol is about the wrapping and the routing. Now, AI agents work similarly. An agent sends a message (like a letter) to another agent (the address). The message is wrapped in a standard format (the protocol's envelope), which includes things like 'who is the sender', 'who is the receiver', 'what type of message this is' (a request, a response, an error), and the payload (the actual content). The receiving agent can unwrap it because it also understands the protocol. The analogy has one caveat: AI agents are much more literal than humans; if a message is missing a field or has a wrong type, the agent will often reject it outright.
Definition
An agent communication protocol is a set of rules that defines how two or more AI agents exchange messages—the structure of a message, the allowed message types, the order in which they can be sent, and the expected responses—so that the agents can cooperate without being custom-built for each other.
Where this sits
You already have notes on AI Agents, and you know that beneath every framework lies a message loop. This concept is about the rules that govern those messages. It connects directly to Agent Cards—directory entries that describe an agent's capabilities so another agent knows who to send a message to and what that agent can do—and Agent Executors, which are the runtime environments that actually send and receive the messages. A protocol is simply what those executors use to format and parse the data they carry.