multi-agent-patterns
Skill này làm gì
Skill này giải thích khi nào một tác vụ cần nhiều agent AI và cách sắp xếp chúng, chẳng hạn một supervisor, một swarm hoặc bàn giao rõ ràng. Nó dành cho người thiết kế hệ thống agent muốn tránh chi phí điều phối không cần thiết.
Khi nào nên dùng
- ✓Khi một agent đơn lẻ hết chỗ ngữ cảnh cho một tác vụ lớn.
- ✓Khi công việc chia thành các phần song song cần các công cụ hoặc prompt khác nhau.
- ✓Khi bạn cần quyết định việc thêm agent có thực sự xứng đáng không.
Liên kết skill
https://github.com/muratcankoylan/Agent-Skills-for-Context-Engineering/blob/main/skills/multi-agent-patterns/SKILL.mdSao chép rồi dán vào AI của bạn (Claude, ChatGPT hoặc Cursor) và nhờ nó làm theo hướng dẫn.
Cách dùng
Cách dễ nhất: sao chép tin nhắn và dán vào AI của bạn. AI sẽ đọc skill và làm theo hướng dẫn.
Tin nhắn có sẵn để dán
Dành cho Claude Code, Codex hoặc Cursor: chạy lệnh trong thư mục dự án của bạn và skill sẽ được cài đặt.
Tải tệp SKILL.md về và thả vào thư mục skill của agent.
Ví dụ cách nhờ AI
“Agent đơn của tôi đang vật lộn với một tác vụ nghiên cứu khổng lồ. Tôi có nên chia nó cho nhiều agent không, và chia thế nào?”
5 skill mới mỗi tuần. Đọc chỉ 1 phút.
Cách hoạt động
Skill giải thích rằng các sub-agent chủ yếu dùng để cách ly ngữ cảnh, rồi so sánh các cách sắp xếp và chỉ ra đánh đổi của việc điều phối.
Nội dung kỹ thuật (SKILL.md gốc)
Lấy nguyên văn từ GitHub, do tác giả viết bằng tiếng Anh.
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
Câu hỏi thường gặp
Nhiều agent có luôn tốt hơn không?
Không. Skill cảnh báo rằng thiết lập nhiều agent kém có thể tạo chi phí điều phối làm mất lợi ích.
Mẫu supervisor là gì?
Một agent điều phối những agent khác, giao tác vụ con và gom kết quả của chúng lại.
Lý do chính để dùng sub-agent là gì?
Skill nói sub-agent tồn tại chủ yếu để cách ly ngữ cảnh, để mỗi cái làm việc với cửa sổ nhỏ, tập trung hơn.
Chi tiết
Mô tả gốc của tác giả
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.
Độ phổ biến
- Sao GitHub
- 18k
- Vị trí xếp hạng
- #10648
- Giấy phép
- MIT
- Cập nhật
- 11/10/2026
Bình luận
- …
Thêm skill từ kho mã này
context-engineering-collection
18kGiúp agent của bạn quản lý những gì đưa vào cửa sổ ngữ cảnh của model AI, từ bộ nhớ và công cụ đến thiết lập nhiều agent và đánh giá.
advanced-evaluation
18kDạy agent của bạn cách đánh giá câu trả lời AI bằng một AI khác, với chấm điểm, so sánh cạnh nhau và kiểm tra thiên lệch.
bdi-mental-states
18kDạy agent của bạn mô hình hóa niềm tin, mục tiêu và kế hoạch bằng cách tiếp cận BDI, để các quyết định của nó có thể được truy vết và giải thích.
context-compression
18kGiúp agent của bạn rút gọn các phiên AI dài thành bản tóm tắt giữ lại quyết định, file, rủi ro và bước tiếp theo.
Skill tương tự
add-model-provider
394kGiúp agent của bạn kết nối nhà cung cấp mô hình AI mới với OpenClaw bằng lệnh an toàn, giữ API key khỏi văn bản thuần và chạy thử.
acp-router
394kGiúp agent của bạn gửi một tác vụ đến trợ lý lập trình như Claude Code hoặc Cursor qua OpenClaw, để công việc chạy ngay trong công cụ đó.
browser-automation
394kHướng dẫn agent của bạn điều khiển trang web từng bước, gồm đăng nhập, tab và cách khôi phục khi trang ngừng phản hồi.