multi-agent-patterns
它能做什么
这个技能说明一项任务何时需要多个 AI 智能体,以及如何安排它们,例如主管模式、群体模式或明确的交接。适合希望避免不必要协调开销的智能体系统设计者。
适用场景
- ✓当单个智能体处理大型任务时上下文空间不够用时。
- ✓当一项工作可以拆分为需要不同工具或提示词的并行部分时。
- ✓当你需要判断增加更多智能体是否真的值得时。
技能链接
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/multi-agent-patterns/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“我的一个智能体难以完成一项庞大的研究任务。我应该把它拆分给多个智能体吗?该怎么拆?”
每周 5 个新技能,1 分钟读完。
工作原理
该技能说明子智能体的主要作用是隔离上下文,然后比较各种安排方式,并展示协调的利弊权衡。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
Multi-Agent Architecture Patterns
Multi-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.
When to Activate
Activate this skill when:
- Single-agent context limits constrain task complexity
- Tasks decompose naturally into parallel subtasks
- Different subtasks require different tool sets or system prompts
- Building systems that must handle multiple domains simultaneously
- Scaling agent capabilities beyond single-context limits
- Designing production agent systems with multiple specialized components
Do not activate this skill for adjacent work owned by other skills:
- Deciding task-model fit, pipeline shape, or project-level cost before topology is known:
project-development. - Designing hosted sandboxes, warm pools, remote sessions, or background runtime infrastructure:
hosted-agents. - Sharing orchestrator state through KV-cache compaction in controlled runtimes:
latent-briefing. - Designing the tools each agent exposes:
tool-design.
Core Concepts
Use 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.
Choose among three dominant patterns based on coordination needs, not organizational metaphor:
- Supervisor/orchestrator — Use for centralized control when tasks have clear decomposition and human oversight matters. A single coordinator delegates to specialists and synthesizes results.
- 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.
- 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.
Design every multi-agent system around explicit coordination protocols, consensus mechanisms that resist sycophancy, and failure handling that prevents error propagation cascades.
Detailed Topics
Why Multi-Agent Architectures
The Context Bottleneck Reach 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).
Partition 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.
The Token Economics Reality Budget 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):
| Architecture | Token Multiplier | Use Case |
|---|---|---|
| Single agent chat | Baseline | Simple queries |
| Single agent with tools | Higher than baseline | Tool-using tasks |
| Multi-agent system | Much higher than baseline | Complex research/coordination |
Browsing-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.
Prioritize 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.
The Parallelization Argument Assign parallelizable subtasks to dedicated agents with fresh contexts rather than processing them sequentially in a single agent. A research task requiring se
常见问题
智能体越多越好吗?
不是。该技能提醒,设计不当的多智能体配置会增加协调开销,从而抵消其收益。
什么是主管模式?
由一个智能体负责协调其他智能体,分配子任务,并汇总它们的结果。
使用子智能体的主要原因是什么?
该技能说明,子智能体主要是为了隔离上下文,使每个子智能体都在更小、更聚焦的窗口中工作。
详情
作者的原始描述
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.
热度
- GitHub 星标
- 18k
- 排名
- #10648
- 许可证
- MIT
- 更新时间
- 2026/10/11
评论
- …
同一仓库的更多技能
context-engineering-collection
18k帮你的智能体管理输入 AI 模型上下文窗口的内容,涵盖记忆、工具、多智能体配置以及评估。
advanced-evaluation
18k教你的智能体如何用另一个 AI 来评判 AI 的回答,包括打分、并排比较和偏差检查。
bdi-mental-states
18k教你的智能体用 BDI 方法对信念、目标和计划进行建模,使其决策可以被追溯和解释。
context-compression
18k帮你的智能体把很长的 AI 会话压缩成摘要,保留决策、文件、风险和下一步。