Lesson 11.13 · 21 min · video lesson
Agent Communication: Protocols and Message Formats
When a billing agent and a tech-support agent need to work on the same customer, how do they actually talk: free text, JSON, a shared database, or a chat room?
In short: Agents communicate by exchanging messages or by reading and writing shared state. The four basic patterns are direct (one to one), centralized (through a hub), broadcast (one to all) and shared memory (a common blackboard). Good communication needs a clear message format, agreed rules (a protocol) and safeguards against lost context, loops and untrusted content.
What you will learn
- What is agent communication?
- Why do agents need to communicate?
- What agents need in order to communicate
- How a message flows between agents
- The ways AI agents communicate
- Direct Communication
- Centralized Communication
- Broadcast Communication
- Shared Memory Communication
- What a message looks like
- The rules agents follow to talk
- Challenges when agents communicate
- Best Practices
In this lesson
- What is agent communication?
- Why do agents need to communicate?
- What agents need in order to communicate
- How a message flows between agents
- The ways AI agents communicate
- What a message looks like
- The rules agents follow to talk
- Challenges when agents communicate
- Best practices
- Worked example, step by step
- Practice: try it yourself
Key terms in this lesson
- Direct communication
- One agent sends a message to one specific agent.
- Centralized communication
- All messages pass through a hub (usually an orchestrator) that routes them.
- Broadcast
- One agent sends the same message to all agents or all subscribers of a topic.
- Blackboard (shared memory)
- A common store that agents read from and write to instead of messaging each other.
- Message envelope
- Structured fields (id, sender, receiver, intent) wrapped around a message's content.
- Protocol
- An agreed set of rules for message formats, allowed intents and the order of exchanges.
- Performative / intent
- A label for what a message does: request, inform, refuse, propose.
This lesson is part of the Generative AI Engineering and Complete AI Engineer tracks. See plans and pricing to open the full lesson, its video, labs and quiz, or try the free lesson first (free account needed).
← 11.12 Subagents: Delegating Tasks Within an Agent Network · 11.14 AI Orchestration: Coordinating Agents, Tools, and Flows →