[ ABORT TO HUD ]
SEQ. 1
SEQ. 2
SEQ. 3
SEQ. 4
SEQ. 5

Agent Communication Protocols

👥 Multi-Agent Systems10 min90 BASE XP

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

PatternHow It WorksProsConsBest For
Direct MessagingAgent A sends a message directly to Agent BSimple, low latencyTight coupling, hard to scale2-3 agent systems
Shared BlackboardAll agents read/write to a shared stateDecoupled, easy to add agentsRace conditions, coordination neededCollaborative research
Message BusAgents pub/sub to named channelsScalable, asyncComplex setup, ordering issuesEnterprise orchestration
HierarchicalManager agent delegates to worker agentsClear authority, structuredManager as bottleneckTask decomposition
Debate/AdversarialAgents argue opposing positions, a judge decidesHigh-quality decisions3x token costCritical 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
Watch: 139x Rust Speedup
Agent Communication Protocols | Multi-Agent Systems — AI Agents Academy