跳到正文
Skillpedia
智能体18k · #10648

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。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/multi-agent-patterns/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 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.

repo: muratcankoylan/Agent-Skills-for-Context-Engineering

热度

GitHub 星标
18k
排名
#10648
许可证
MIT
更新时间
2026/10/11

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能