📚Academy
likeone
online

Communication Patterns

How agents talk to each other — the protocols that make or break multi-agent systems.

What You'll Learn

  • The three fundamental agent communication patterns
  • How to design message formats agents actually understand
  • Synchronous vs. asynchronous agent communication
  • Common pitfalls that cause agent miscommunication

Agents Don't Speak the Same Language By Default

When two agents pass information to each other, things can go wrong fast. Agent A outputs a free-form paragraph. Agent B expects structured JSON. The result? Garbled data, lost context, and cascading failures.

Communication patterns solve this by establishing contracts between agents — agreed-upon formats, protocols, and expectations for how information flows through the system.

Direct Messaging

The simplest pattern: Agent A sends output directly to Agent B. Like a relay race — the baton passes from hand to hand. This works well for linear pipelines where each agent's output is the next agent's input.

Best for: Sequential workflows, simple handoffs, two-agent systems.

Watch out for: Format mismatches. Always define the exact structure of what gets passed.

Broadcast (Pub/Sub)

One agent publishes a message. Multiple agents receive it and decide independently whether to act. Like a team Slack channel — everyone sees the message, but only relevant agents respond.

Best for: Parallel processing, event-driven systems, agents that need to react to the same trigger differently.

Watch out for: Race conditions and duplicate work. Two agents might both try to handle the same task.

Blackboard (Shared Space)

All agents read from and write to a shared workspace. No direct messages — agents check the blackboard, see what's new, contribute their piece, and move on. Like a collaborative document where everyone adds their section.

Best for: Complex problems where agents need full context, iterative refinement, consensus building.

Watch out for: Stale reads and write conflicts. Two agents editing the same section simultaneously creates chaos.

Structured Message Contracts

A Clean Agent Message

{
"from": "research-agent",
"to": "analysis-agent",
"type": "research_complete",
"payload": {
"topic": "competitor pricing Q4",
"findings": [...],
"confidence": 0.87,
"sources_checked": 12
},
"metadata": {
"timestamp": "2025-03-15T10:30:00Z",
"tokens_used": 4200
}
}

Structured, typed, traceable. The receiving agent knows exactly what it got and how reliable it is.

Design a Message Contract

Take your agent team from Lesson 2. Define the message format for each handoff. What fields does the receiving agent need? What metadata helps with debugging?

Handoff: [Agent A] → [Agent B]
Message type: [name]
Required fields: [list them]
Optional fields: [list them]
Format: JSON / structured text / markdown

Communication pattern strengths and risks.

Match Each Communication Pattern to Its Best Use Case

Tap one on the left, then its match on the right

Good Communication Is the Whole Game

Multi-agent systems fail at the seams — the handoff points between agents. Invest heavily in communication contracts. Define message formats explicitly. Include metadata for debugging. When your agents communicate cleanly, the whole system becomes predictable, debuggable, and reliable.

Key concepts.

Communication patterns quiz.

Communication Patterns — Console
Free response

Compare 3 inter-agent communication patterns: direct messaging, shared blackboard, and event bus. For each: how it works, pros, cons, and a real example.

Type a prompt below to get started.

Try:

Academy
Built with soul — likeone.ai