multi-agent-architecture
13
总安装量
2
周安装量
#24881
全站排名
安装命令
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill multi-agent-architecture
Agent 安装分布
opencode
2
claude-code
2
replit
2
openhands
1
zencoder
1
Skill 文档
Multi-Agent Architecture
Design principles for orchestrating many sub-agents without context overflow.
Core Philosophy
Treat agent design like human hiring: write a job description first, then translate to architecture. The framing shapes every decision.
The Job Description Method
Before writing any agent code:
- Write a human JD â What would you want this person to do? What qualities? What indicates success?
- Identify handoff points â Where would a human need to check in or escalate?
- Define the onboarding â What handbook would you give a new hire?
- Translate to agents â Each JD section becomes architecture
| JD Section | Architecture Element |
|---|---|
| Responsibilities | Agent workflows |
| Required skills | Tool permissions |
| Success indicators | Output schemas |
| Escalation criteria | Error handling |
| Onboarding materials | Skills/handbook |
The Shared Folder Pattern
Problem: Orchestrator context overwhelmed when 10+ sub-agents return detailed reports simultaneously.
Solution: Sub-agents write to temp folder â downstream agents read directly.
.claude/workspace/
âââ phase-1/
â âââ gmail-analysis.md
â âââ calendar-analysis.md
â âââ drive-inventory.md
âââ phase-2/
â âââ client-summary.md
â âââ action-items.md
âââ manifest.yml
Workflow:
1. Orchestrator spawns sub-agents
2. Each sub-agent:
- Does work
- Writes report to .claude/workspace/{phase}/{name}.md
- Returns only: { status: "complete", path: "..." }
3. Downstream agents read prior phase outputs directly
4. Orchestrator reads manifest, not full reports
Benefits:
- Orchestrator context stays minimal
- Sub-agents get full upstream context
- No signal loss from summarization relay
The Handbook Pattern
Problem: Many narrow skills create fragility and maintenance burden.
Solution: One handbook organized by chapters, read foundation + relevant sections.
skills/project-manager/
âââ SKILL.md # Entry point, routes to chapters
âââ resources/
âââ 01-foundation.md # Who we are, tools, escalation, standards
âââ 02-daily-ops.md # Data gathering procedures
âââ 03-dashboards.md # Structure, quality checks
âââ 04-onboarding.md # New client setup
Chapter Structure:
| Chapter | Contents |
|---|---|
| Foundation | Team, tools, data sources, escalation rules, quality standards |
| Domain chapters | Specific procedures for each responsibility area |
Reading Pattern:
Sub-agent reads:
1. Foundation chapter (always)
2. Relevant domain chapter(s) (based on task)
Context Budget Strategies
| Strategy | When to Use |
|---|---|
| Shared folder | 5+ sub-agents, inter-agent dependencies |
| Context proxy | Research agents returning verbose results |
| Manifest files | Orchestrator needs status, not details |
| Chunked execution | Serial phases when parallel overwhelms |
Architecture Decision Tree
How many sub-agents?
âââ 1-3 â Direct orchestration (return reports to main)
âââ 4-10 â Shared folder pattern
âââ 10+ â Phased execution with manifest
Do sub-agents need each other's output?
âââ No â Parallel execution, merge results
âââ Yes â Shared folder, dependency ordering
Is orchestrator context a concern?
âââ No â Return full reports
âââ Yes â Status-only returns + file paths
Anti-Patterns
| Pattern | Problem | Fix |
|---|---|---|
| Slash commands as orchestration | Context exhaustion before work starts | Move to sub-agents |
| Orchestrator relays all context | Bottleneck, signal loss | Shared folder |
| One skill per micro-task | Fragile, hard to maintain | Handbook chapters |
| Sub-agents return full reports | Context overflow at 10+ agents | Path-only returns |
Iteration Path
Most multi-agent systems evolve through:
- Slash commands â Quick start, context limits emerge
- Orchestrator + sub-agents â Solves context, creates relay bottleneck
- Shared folder â Solves relay, reveals skill fragmentation
- Handbook consolidation â Unified knowledge, maintainable
Skip earlier stages when building new systems.