
Communication Protocols and Role Specialization
AGAI 301 · Multi-Agent Architecture Patterns
Learn how agents exchange information, how message formats affect reliability, and how clear role design prevents confusion in multi-agent teams.
Key terms
communication = messages + state + routingrole = purpose + tools + limitsstructured messages reduce ambiguitytopology controls coordinationLearning objectives
- Describe common communication patterns between agents.
- Design structured messages for inter-agent coordination.
- Define specialized agent roles with inputs, outputs, and limits.
- Explain how communication topology affects reliability.
Multi-agent systems depend on communication. If agents cannot exchange information clearly, the system becomes unreliable. Communication design includes message format, routing, memory sharing, permissions, turn-taking, and conflict handling.
A multi-agent system is not just several prompts running independently. It is a communication network. The quality of that network strongly influences the quality of the final result.
Communication patterns
Agents can communicate in several ways.
Direct messaging allows one agent to send a message to another.
Research Agent → Writer Agent: "Here are the key findings and sources."
Shared state allows agents to read and write to a common workspace.
Shared task state:
- current goal
- research notes
- draft answer
- reviewer comments
- open issues
Blackboard architecture uses a shared workspace where agents contribute partial results. Other agents inspect the board and act when relevant.
[Agent A] writes finding
[Agent B] reads finding and adds critique
[Agent C] synthesizes final answer
Message bus or event-driven communication routes events to agents that subscribe to them.
Event: "new_security_issue_detected"
→ Security Reviewer Agent handles it
Production systems often prefer shared state or graph-based orchestration because they are easier to inspect than free-form agent chat.
Structured communication
Free-form natural language is flexible but unreliable. Structured messages improve coordination.
Instead of this:
I found some useful things about the API. It seems pretty good but maybe has some limitations.
Use this:
{
"agent": "ResearchAgent",
"task_id": "research_api_limits",
"status": "complete",
"findings": [
{
"claim": "The API supports streaming responses.",
"source": "official_docs",
"confidence": "high"
},
{
"claim": "Batch support is limited to enterprise plans.",
"source": "pricing_page",
"confidence": "medium"
}
],
"open_questions": ["Confirm whether batch limits changed after March 2025."]
}
Structured messages make downstream agents more reliable. The writer can use findings. The reviewer can inspect confidence. The orchestrator can detect open questions.
Role specialization
Role specialization means each agent has a defined responsibility. Good roles are narrow enough to guide behavior but broad enough to be useful.
Weak role:
You are an AI agent. Help with the task.
Better role:
You are a Source Verification Agent. Your job is to inspect claims in a draft and determine whether each claim is supported by the provided sources. Do not rewrite the draft. Return unsupported claims and missing citations only.
The better role prevents the agent from doing unrelated work.
Useful specialist roles include:
- Planner
- Researcher
- Extractor
- Analyst
- Writer
- Critic
- Verifier
- Tool executor
- Security reviewer
- Compliance reviewer
- Test runner
- Summarizer
Avoiding role overlap
Role overlap can cause duplication and conflict. If both the analyst and reviewer rewrite the final answer, they may step on each other’s work. If every agent can use every tool, permission boundaries blur.
Define each role with:
Purpose: what the agent is for
Inputs: what it receives
Outputs: what it must produce
Tools: what it may use
Limits: what it must not do
Success criteria: how its work is judged
Example:
{
"role": "SecurityReviewer",
"purpose": "Find security risks in proposed code changes.",
"inputs": ["diff", "test_results", "implementation_notes"],
"outputs": ["risk_list", "severity", "recommended_fixes"],
"tools": ["static_analysis", "dependency_scan"],
"limits": ["Do not edit code directly."],
"success_criteria": ["Identifies high-risk vulnerabilities", "Avoids speculative claims"]
}
Communication topology
Communication topology defines who can talk to whom.
In a strict hierarchy:
Subagents cannot talk directly.
All messages go through orchestrator.
This improves control and logging.
In an open peer network:
Any agent can message any other agent.
This improves flexibility but can create chatter and drift.
A middle ground is controlled peer communication:
Research agents can write to shared notes.
Reviewer agents can comment on drafts.
Only orchestrator can produce final output.
For production systems, controlled communication is usually best.
Example: software engineering team of agents
A multi-agent coding system might use the following roles:
[Planner]
- Reads user request
- Creates implementation plan
[Codebase Analyst]
- Locates relevant files
- Summarizes current architecture
[Implementer]
- Edits code according to plan
[Test Runner]
- Runs tests and reports failures
[Security Reviewer]
- Reviews diff for security risk
[Orchestrator]
- Coordinates roles and summarizes final result
Each role communicates through structured artifacts: plan JSON, file summaries, diffs, test results, review reports.
Practical takeaway
Multi-agent communication should be designed, not improvised. Clear roles and structured messages prevent confusion. Communication topology controls how much freedom agents have to influence one another.
A reliable multi-agent system defines not only what each agent does, but also how agents exchange information, what format they use, who can speak to whom, and who owns the final decision.
Sign in to track your progress.
Up next · Module 2
Coordination, Consensus, and Emergent Behavior
Explore how multiple agents coordinate decisions, resolve disagreements, and produce higher-quality outputs through debate, critique, and consensus. This module also explains emergent behavior and why multi-agent systems can become unpredictable without strong controls.
Ask your AI guide
Ask anything about Multi-Agent Systems — Communication Protocols and Role Specialization, or choose a suggested question below.
AI responses are educational and may not be perfectly accurate. Press Enter to send, Shift+Enter for new line.