Expertise·AI & Agents

Multi-Agent Patterns

Use when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, or parallel…

You say
Buy it · $79 Read it before you buy $79 Written by muratcankoylan · unverified publisher
Context cost
13k tokensestimated from the bundle, loaded when it triggers
Bundle
3 files · 52.1 kB1 script among them — read before you run
Licence
MITpaid listing
Last change
no release on file
Servers it uses
Noneruns standalone

What it does

This skill should be used when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, parallel execution, or a decision on whether multiple agents are justified.

Installed, it changes the agent in these ways.

What this skill changes about the agent is not written down here yet. The listing was collected from its source, and the description is in its own SKILL.md.

Expertise

Domain judgement the base model does not have.

multi-agentarchitecturecontext-engineering
Filed under

AI & Agents

The skill itself

This is the whole product. A skill is instructions the model reads, so there is nothing behind the listing you cannot see first — the front matter loads with every session, and the body below it loads when the skill triggers.

SKILL.md18.6 kB · 268 lines
--- name: multi-agent-patterns description: "This skill should be used when designing multi-agent systems that need context isolation, supervisor or swarm coordination, explicit handoffs, parallel execution, or a decision on whether multiple agents are justified." ---
6# Multi-Agent Architecture Patterns
7
8Multi-agent architectures distribute work across multiple language model instances, each with its own context window. When designed well, this distribution enables capabilities beyond single-agent limits. When designed poorly, it introduces coordination overhead that negates benefits. The critical insight is that sub-agents exist primarily to isolate context, not to anthropomorphize role division.
9
10## When to Activate
11
12Activate this skill when:
13- Single-agent context limits constrain task complexity
14- Tasks decompose naturally into parallel subtasks
15- Different subtasks require different tool sets or system prompts
16- Building systems that must handle multiple domains simultaneously
17- Scaling agent capabilities beyond single-context limits
18- Designing production agent systems with multiple specialized components
19
20Do not activate this skill for adjacent work owned by other skills:
21- Deciding task-model fit, pipeline shape, or project-level cost before topology is known: project-development.
22- Designing hosted sandboxes, warm pools, remote sessions, or background runtime infrastructure: hosted-agents.
23- Sharing orchestrator state through KV-cache compaction in controlled runtimes: latent-briefing.
24- Designing the tools each agent exposes: tool-design.
25
26## Core Concepts
27
28Use multi-agent patterns when a single agent's context window cannot hold all task-relevant information. Context isolation is the primary benefit — each agent operates in a clean context without accumulated noise from other subtasks, preventing the telephone game problem where information degrades through repeated summarization.
29
30Choose among three dominant patterns based on coordination needs, not organizational metaphor:
31
32- **Supervisor/orchestrator** — Use for centralized control when tasks have clear decomposition and human oversight matters. A single coordinator delegates to specialists and synthesizes results.
33- **Peer-to-peer/swarm** — Use for flexible exploration when rigid planning is counterproductive. Any agent can transfer control to any other through explicit handoff mechanisms.
34- **Hierarchical** — Use for large-scale projects with layered abstraction (strategy, planning, execution). Each layer operates at a different level of detail with its own context structure.
35
36Design every multi-agent system around explicit coordination protocols, consensus mechanisms that resist sycophancy, and failure handling that prevents error propagation cascades.
37
38## Detailed Topics
39
40### Why Multi-Agent Architectures
41
42**The Context Bottleneck**
43Reach for multi-agent architectures when a single agent's context fills with accumulated history, retrieved documents, and tool outputs to the point where performance degrades. Recognize three degradation signals: the lost-in-middle effect (attention weakens for mid-context content), attention scarcity (too many competing items), and context poisoning (irrelevant content displaces useful content).
44
45Partition work across multiple context windows so each agent operates in a clean context focused on its subtask. Aggregate results at a coordination layer without any single context bearing the full burden.
46
47**The Token Economics Reality**
48Budget for substantially higher token costs. Production data shows multi-agent systems can cost far more tokens than single-agent chat (claim-multi-agent-token-multiplier):
49
50| Architecture | Token Multiplier | Use Case |
51|--------------|------------------|----------|
52| Single agent chat | Baseline | Simple queries |
53| Single agent with tools | Higher than baseline | Tool-using tasks |
54| Multi-agent system | Much higher than baseline | Complex research/coordination |
55
56Browsing-agent evaluation research suggests token usage, tool calls, and model choice dominate performance variance (claim-evaluation-browsecomp-variance). This supports measuring multi-agent setups against single-agent baselines instead of assuming extra agents help.
57
58Prioritize model selection alongside architecture design — upgrading to better models often provides larger performance gains than doubling token budgets. BrowseComp data shows that model quality improvements frequently outperform raw token increases. Treat model selection and multi-agent architecture as complementary strategies.
59
60**The Parallelization Argument**
61Assign parallelizable subtasks to dedicated agents with fresh contexts rather than processing them sequentially in a single agent. A research task requiring searches across multiple independent sources, analysis of different documents, or comparison of competing approaches benefits from parallel execution. Total real-world time approaches the duration of the longest subtask rather than the sum of all subtasks.
62
63**The Specialization Argument**
64Configure each agent with only the system prompt, tools, and context it needs for its specific subtask. A general-purpose agent must carry all possible configurations in context, diluting attention. Specialized agents carry only what they need, operating with lean context optimized for their domain. Route from a coordinator to specialized agents to achieve specialization without combinatorial explosion.
65
66### Architectural Patterns
67
68**Pattern 1: Supervisor/Orchestrator**
69Deploy a central agent that maintains global state and trajectory, decomposes user objectives into subtasks, and routes to appropriate workers.
70
71```
72User Query -> Supervisor -> [Specialist, Specialist, Specialist] -> Aggregation -> Final Output
73```
74
75Choose this pattern when: tasks have clear decomposition, coordination across domains is needed, or human oversight is important.
76
77Expect these trade-offs: strict workflow control and easier human-in-the-loop interventions, but the supervisor context becomes a bottleneck, supervisor failures cascade to all workers, and the "telephone game" problem emerges where supervisors paraphrase sub-agent responses incorrectly.
78
79**The Telephone Game Problem and Solution**
80Anticipate that supervisor architectures initially perform approximately 50% worse than optimized versions due to the telephone game problem (LangGraph benchmarks). Supervisors paraphrase sub-agent responses, losing fidelity with each pass.
81
82Fix this by implementing a forward_message tool that allows sub-agents to pass responses directly to users:
83
84```python
85def forward_message(message: str, to_user: bool = True):
86 """
87 Forward sub-agent response directly to user without supervisor synthesis.
88
89 Use when:
90 - Sub-agent response is final and complete
91 - Supervisor synthesis would lose important details
92 - Response format must be preserved exactly
93 """
94 if to_user:
95 return {"type": "direct_response", "content": message}
96 return {"type": "supervisor_input", "content": message}
97```
98
99Prefer swarm architectures over supervisors when sub-agents can respond directly to users, as this eliminates translation errors entirely.
100
101**Pattern 2: Peer-to-Peer/Swarm**
102Remove central control and allow agents to communicate directly based on predefined protocols. Any agent transfers control to any other through explicit handoff mechanisms.
103
104```python
105def transfer_to_agent_b():
106 return agent_b # Handoff via function return
107
108agent_a = Agent(
109 name="Agent A",
110 functions=[transfer_to_agent_b]
111)
112```
113
114Choose this pattern when: tasks require flexible exploration, rigid planning is counterproductive, or requirements emerge dynamically and defy upfront decomposition.
115
116Expect these trade-offs: no single point of failure and effective breadth-first scaling, but coordination complexity increases with agent count, divergence risk rises without a central state keeper, and robust convergence constraints become essential.
117
118Define explicit handoff protocols with state passing. Ensure agents communicate their context needs to receiving agents.
119
120**Pattern 3: Hierarchical**
121Organize agents into layers of abstraction: strategy (goal definition), planning (task decomposition), and execution (atomic tasks).
122
123```
124Strategy Layer (Goal Definition) -> Planning Layer (Task Decomposition) -> Execution Layer (Atomic Tasks)
125```
126
127Choose this pattern when: projects have clear hierarchical structure, workflows involve management layers, or tasks require both high-level planning and detailed execution.
128
129Expect these trade-offs: clear separation of concerns and support for different context structures at different levels, but coordination overhead between layers, potential strategy-execution misalignment, and complex error propagation paths.
130
131### Context Isolation as Design Principle
132
133Treat context isolation as the primary purpose of multi-agent architectures. Each sub-agent should operate in a clean context window focused on its subtask without carrying accumulated context from other subtasks.
134
135**Isolation Mechanisms**
136Select the right isolation mechanism for each subtask:
137
138- **Full context delegation** — Share the planner's entire context with the sub-agent. Use for complex tasks where the sub-agent needs complete understanding. The sub-agent has its own tools and instructions but receives full context for its decisions. Note: this partially defeats the purpose of context isolation.
139- **Instruction passing** — Create instructions via function call; the sub-agent receives only what it needs. Use for simple, well-defined subtasks. Maintains isolation but limits sub-agent flexibility.
140- **File system memory** — Agents read and write to persistent storage. Use for complex tasks requiring shared state. The file system serves as the coordination mechanism, avoiding context bloat from shared state passing. Introduces latency and consistency challenges but scales better than message-passing.
141
142Choose based on task complexity, coordination needs, and acceptable latency. Default to instruction passing and escalate to file system memory when shared state is needed. Avoid full context delegation unless the subtask genuinely requires it.
143
144### Consensus and Coordination
145
146**The Voting Problem**
147Avoid simple majority voting — it treats hallucinations from weak models as equal to reasoning from strong models. Without intervention, multi-agent discussions devolve into consensus on false premises due to inherent bias toward agreement.
148
149**Weighted Voting**
150Weight agent votes by confidence or expertise. Agents with higher confidence or domain expertise should carry more weight in final decisions.
151
152**Debate Protocols**
153Structure agents to critique each other's outputs over multiple rounds. Adversarial critique often yields higher accuracy on complex reasoning than collaborative consensus. Guard against sycophantic convergence where agents agree to be agreeable rather than correct.
154
155**Trigger-Based Intervention**
156Monitor multi-agent interactions for behavioral markers. Activate stall triggers when discussions make no progress. Detect sycophancy triggers when agents mimic each other's answers without unique reasoning.
157
158### Framework Considerations
159
160Different frameworks implement these patterns with different philosophies. LangGraph uses graph-based state machines with explicit nodes and edges. AutoGen uses conversational/event-driven patterns with GroupChat. CrewAI uses role-based process flows with hierarchical crew structures.
161
162## Practical Guidance
163
164### Failure Modes and Mitigations
165
166**Failure: Supervisor Bottleneck**
167The supervisor accumulates context from all workers, becoming susceptible to saturation and degradation.
168
169Mitigate by constraining worker output schemas so workers return only distilled summaries. Use checkpointing to persist supervisor state without carrying full history in context.
170
171**Failure: Coordination Overhead**
172Agent communication consumes tokens and introduces latency. Complex coordination can negate parallelization benefits.
173
174Mitigate by minimizing communication through clear handoff protocols. Batch results where possible. Use asynchronous communication patterns. Measure whether multi-agent coordination actually saves time versus a single agent with a longer context.
175
176**Failure: Divergence**
177Agents pursuing different goals without central coordination drift from intended objectives.
178
179Mitigate by defining clear objective boundaries for each agent. Implement convergence checks that verify progress toward shared goals. Set time-to-live limits on agent execution to prevent unbounded exploration.
180
181**Failure: Error Propagation**
182Errors in one agent's output propagate to downstream agents that consume that output, compounding into increasingly wrong results.
183
184Mitigate by validating agent outputs before passing to consumers. Implement retry logic with circuit breakers. Use idempotent operations where possible. Consider adding a verification agent that cross-checks critical outputs before they enter the pipeline.
185
186## Examples
187
188**Example 1: Research Team Architecture**
189```text
190Supervisor
191├── Researcher (web search, document retrieval)
192├── Analyzer (data analysis, statistics)
193├── Fact-checker (verification, validation)
194└── Writer (report generation, formatting)
195```
196
197**Example 2: Handoff Protocol**
198```python
199def handle_customer_request(request):
200 if request.type == "billing":
201 return transfer_to(billing_agent)
202 elif request.type == "technical":
203 return transfer_to(technical_agent)
204 elif request.type == "sales":
205 return transfer_to(sales_agent)
206 else:
207 return handle_general(request)
208```
209
210## Guidelines
211
2121. Design for context isolation as the primary benefit of multi-agent systems
2132. Choose architecture pattern based on coordination needs, not organizational metaphor
2143. Implement explicit handoff protocols with state passing
2154. Use weighted voting or debate protocols for consensus
2165. Monitor for supervisor bottlenecks and implement checkpointing
2176. Validate outputs before passing between agents
2187. Set time-to-live limits to prevent infinite loops
2198. Test failure scenarios explicitly
220
221## Gotchas
222
2231. **Supervisor bottleneck scaling** — Supervisor context pressure grows non-linearly with worker count. At 5+ workers, the supervisor spends more tokens processing summaries than workers spend on actual tasks. Set a hard cap on workers per supervisor (3-5) and add a second supervisor tier rather than overloading one.
2242. **Token cost underestimation** — Multi-agent runs cost approximately 15x baseline. Teams consistently underbudget because they estimate per-agent costs without accounting for coordination overhead, retries, and consensus rounds. Budget for 15x and treat anything less as a bonus.
2253. **Sycophantic consensus** — Agents in debate patterns tend to converge on agreeable answers, not correct ones. LLMs have an inherent bias toward agreement. Counter this by assigning explicit adversarial roles and requiring agents to state disagreements before convergence is allowed.
2264. **Agent sprawl** — Adding more agents past 3-5 shows diminishing returns and increases coordination overhead. Each additional agent adds communication channels quadratically. Start with the minimum viable number of agents and add only when a clear context isolation benefit exists.
2275. **Telephone game in message-passing** — Information degrades through repeated summarization as it passes between agents. Each agent paraphrases and loses nuance. Use filesystem coordination instead of message-passing for state that multiple agents need to access faithfully.
2286. **Error propagation cascades** — One agent's hallucination becomes another agent's "fact." Downstream agents have no way to distinguish upstream hallucinations from genuine information. Add validation checkpoints between agents and never trust upstream output without verification.
2297. **Over-decomposition** — Splitting tasks too finely creates more coordination overhead than the task itself. A 10-step pipeline with 10 agents spends more tokens on handoffs than on actual work. Decompose only when subtasks genuinely benefit from separate contexts.
2308. **Missing shared state** — Agents operating without a shared filesystem or state store duplicate work, produce inconsistent outputs, and lose track of what has already been accomplished. Establish shared persistent storage before building multi-agent workflows.
231
232## Integration
233
234This skill owns agent topology and coordination protocols. Adjacent skills own project shape, hosted runtime, and latent-state transfer:
235
236- project-development: project-level single-vs-multi choice before topology details.
237- hosted-agents: remote sandbox, session, warm-pool, and multiplayer infrastructure.
238- memory-systems: shared persistent state across agents.
239- tool-design: tool specialization and spawn/status tool contracts.
240- context-optimization: partitioning as one token-efficiency tactic.
241- latent-briefing: KV-cache trajectory handoff between orchestrator and worker when models align.
242- evaluation: measuring whether multiple agents improve outcomes after coordination cost.
243
244## References
245
246Internal reference:
247- [Frameworks Reference](./references/frameworks.md) - Read when: implementing a specific multi-agent pattern in LangGraph, AutoGen, or CrewAI and needing framework-specific code examples
248
249Related skills in this collection:
250- context-fundamentals - Read when: needing to understand context window mechanics before designing agent partitioning
251- memory-systems - Read when: agents need to share state across context boundaries or persist information between runs
252- context-optimization - Read when: individual agent contexts are too large and need partitioning or compression strategies
253
254External resources:
255- [LangGraph Documentation](https://langchain-ai.github.io/langgraph/) - Read when: building graph-based multi-agent workflows with explicit state machines
256- [AutoGen Framework](https://microsoft.github.io/autogen/) - Read when: implementing conversational GroupChat patterns or event-driven agent coordination
257- [CrewAI Documentation](https://docs.crewai.com/) - Read when: designing role-based hierarchical agent processes
258- [Research on Multi-Agent Coordination](https://arxiv.org/abs/2308.00352) - Read when: needing academic grounding on multi-agent system theory and evaluation
259
260---
261
262## Skill Metadata
263
264**Created**: 2025-12-20
265**Last Updated**: 2026-05-15
266**Author**: Agent Skills for Context Engineering Contributors
267**Version**: 2.1.0
268
In the file
SKILL.md2,371 words
Files3
LicenceMIT
Why you can read it

Nothing in a skill executes. The client loads the text and the model follows it, so a skill can be audited the way a runbook is — by reading it.

What it costs in context

Skills are not billed by the call. They are paid for in context: every token the instructions occupy is a token your code, your diff and your conversation cannot use. Here is what this one takes and when it takes it.

≈70
always loaded
The name and description, so the model knows the skill exists and when to reach for it.
12,955
on trigger
The instruction body and 2 supporting files, read only when the skill fires.
6.5%
of a 200k window
Ten skills this size would take about 65% of the window before you open a file.
050k100k150k200k context window

13k tokens, estimated from the bundle at four bytes to the token, held for the rest of the session once it triggers. Heavy. Teams tend to install this one per project rather than globally, and load it only when the job comes up.

Servers bill, skills cost

A server charges by the month. A skill charges once per session, in context, and then keeps charging it for as long as the session lives.

Before and after

The same question, put to the same model twice: once as it comes, and once with these instructions loaded.

No worked example has been published for this skill yet.

Adoption
Installsnone yet
Ratingno reviews yet

The procedure it runs

The procedure has not been published here. It is in the skill’s own SKILL.md, which its author has not sent to the marketplace yet.

Prose, not code

These steps are written for a model to follow, not executed by a runtime. It can still be told to skip one, and it will say so when it does.

Servers it uses

None. This skill calls no MCP servers at all.

Everything it needs is in the instructions, so it works in a project with nothing connected — the model reads the file and changes how it works with what it can already reach.

It writes no files and reaches no network. All it changes is how the model reasons and writes.

What it asks for
Writes filesno
Network accessno

Read from the allowed-tools line of this skill’s own SKILL.md. A skill grants no permissions of its own — it can only ask for tools your client already has.

What it will not do

Every skill is narrow, and the useful ones say where they stop. These are the jobs this one is the wrong tool for.

What this skill is not for has not been published here. Nothing is implied by that: it is a section the author has not filled in.

What is in the bundle

3 files, 52.1 kB on disk. Mostly text — the instructions the model reads — with 1 script in it that your client would run only if the instructions tell it to.

  • SKILL.md18.6 kB
  • references/frameworks.md12.5 kB
  • scripts/coordination.py21.0 kB
What is not in it

A skill installs nothing and depends on nothing: it is a folder your client reads. This one carries 1 script beside the text, so the bundle is 3 files you can review in full before installing. The MIT licence covers the templates and examples as well as the instructions.

Install

Installing copies the bundle into your project. Nothing runs at install time — the files sit on disk until the model reads them.

$79 once
Multi-Agent Patterns · MIT · muratcankoylan
one-time
Price$79 once
LicenceMIT — the author’s, unchanged by this purchase
Paid throughStripe, once, on the card you add at the checkout
Keeps workingfor good — the files are yours once they are on disk
Updatesevery update its author ships, delivered through this account

You can read the whole bundle before paying — the SKILL.md above is the product, not a preview of it. What the money buys is the delivery: the folder packaged and handed to your machine by key, every update its author ships, and our support if it does not do what this listing says. The terms of use are MIT, set by the author and unchanged by buying it here.

Payment runs through Stripe, on a page like this one rather than a redirect. Once there is an account it joins the same mcprush invoice as everything else you run, so there is never a second card to enter.

Which clients pick it up on their own

A skill is a folder of text. A client with a skills folder reads it without being told; everywhere else the same text works, it is just handed to the model rather than found.

Claude Code.claude/skills/
Claude Desktop
ChatGPT
Cursor.cursor/skills/
VS Code.github/skills/
Codex CLI.agents/skills/
Gemini CLI.gemini/skills/
Grok.grok/skills/
Zed.agents/skills/
Windsurf.windsurf/skills/
Agent SDK.claude/skills/
HTTP / API
This release
Versionnot versioned
Publishedno release date on file
Price$79
Referencemuratcankoylan/multi-agent-patterns

Versions

Its author publishes no version number, so there is nothing here to pin to: what you install is the folder as it stands today. Instructions change more often than APIs do — a skill can be rewritten entirely without anything it depends on moving.

v
  • No earlier releases have been published to the marketplace.
Pinning

Nothing to pin to: this skill carries no version number of its own. What you install is what the folder holds on the day you install it.

Reviews

no reviews yet · no installs yet

Nobody has reviewed this skill yet. The rating is the mean of the reviews written here, so there is none until somebody writes the first.

Who can post

Only accounts that have had the skill installed for fourteen days, so a review is written after living with it rather than after reading it. Publishers may reply once.

Publisher
Servers0