[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4
SEQ. 5
SEQ. 6
SEQ. 7
SEQ. 8
Agent Communication Protocols
How Agents Talk to Each Other
In multi-agent systems, the way agents share information is as important as the agents themselves. Poor communication patterns lead to lost context, infinite loops, and token explosions.
Communication Patterns
| Pattern | How It Works | Pros | Cons | Best For |
|---|---|---|---|---|
| Direct Messaging | Agent A sends a message directly to Agent B | Simple, low latency | Tight coupling, hard to scale | 2-3 agent systems |
| Shared Blackboard | All agents read/write to a shared state | Decoupled, easy to add agents | Race conditions, coordination needed | Collaborative research |
| Message Bus | Agents pub/sub to named channels | Scalable, async | Complex setup, ordering issues | Enterprise orchestration |
| Hierarchical | Manager agent delegates to worker agents | Clear authority, structured | Manager as bottleneck | Task decomposition |
| Debate/Adversarial | Agents argue opposing positions, a judge decides | High-quality decisions | 3x token cost | Critical decisions, safety |
Shared Blackboard Pattern
// Shared Blackboard Architecture
const blackboard = {
goal: "Write a technical blog post about RAG",
research: null, // ResearcherAgent writes here
outline: null, // PlannerAgent writes here
draft: null, // WriterAgent writes here
feedback: null, // ReviewerAgent writes here
status: "researching"
};
// Each agent reads the blackboard, does its job, writes back:
while (blackboard.status !== "complete") {
const activeAgent = selectAgent(blackboard.status);
await activeAgent.process(blackboard);
}
The Token Cost Problem
Every time agents communicate, you're burning tokens. A naive 4-agent system that passes full context between agents can use 10-50x more tokens than a single agent. Mitigation strategies:
- Summarize before passing: Agent A sends a summary, not its full output.
- Structured handoffs: Use JSON objects with specific fields, not prose.
- Lazy loading: Agents only request context they actually need.
🎯 Pro Tip: Start with the Hierarchical pattern (one manager + N workers). It's the easiest to debug and the most token-efficient. Only move to more complex patterns when you hit its limitations.
SYNAPSE VERIFICATION
QUERY 1 // 2
What is the main risk of naive multi-agent communication?
Agents argue too much
Token costs can explode to 10-50x because full context is passed between every agent
Agents become too creative
Network bandwidth issues