Design multi-agent systems for distributing work across multiple context windows.
Scanned 9/3/2026
Install to Claude Code
npx -y skills add mediar-ai/skillhubz --skill multi-agent-patterns --agent claude-codeInstalls into .claude/skills of the current project.
Are you the author of Multi Agent Patterns?
Add the live security badge to your README — it updates automatically with every re-scan.
[](https://www.skillsdirectory.com/skills/mediar-ai-multi-agent-patterns)More formats (shields.io, HTML) on the badges page.
# Multi-Agent Architecture Patterns
Design multi-agent systems for distributing work across multiple context windows.
## Prerequisites
- Understanding of context limitations
- Familiarity with agent frameworks
## Instructions
### Core Insight
Sub-agents exist primarily to **isolate context**, not to anthropomorphize role division. Each sub-agent gets a clean context focused on its subtask.
### Token Economics
| Architecture | Token Multiplier |
|--------------|------------------|
| Single chat | 1× baseline |
| Single + tools | ~4× baseline |
| Multi-agent | ~15× baseline |
### Pattern 1: Supervisor/Orchestrator
Central agent delegates to specialists and synthesizes results.
```
User -> Supervisor -> [Specialist, Specialist] -> Aggregation -> Output
```
**When to use**: Clear decomposition, coordination across domains, human oversight needed.
**Pitfall**: "Telephone game" where supervisor paraphrases incorrectly. Fix with `forward_message` tool for direct responses.
### Pattern 2: Peer-to-Peer/Swarm
Agents communicate directly with explicit handoffs.
```python
def transfer_to_agent_b():
return agent_b # Handoff via function return
```
**When to use**: Flexible exploration, emergent requirements, no rigid planning.
### Pattern 3: Hierarchical
Layers of abstraction: Strategy → Planning → Execution.
**When to use**: Large-scale projects, enterprise workflows, clear hierarchy.
### Context Isolation Mechanisms
- **Full context delegation**: Complex tasks needing full understanding
- **Instruction passing**: Simple, well-defined subtasks
- **File system memory**: Complex tasks with shared state
### Consensus Mechanisms
- **Weighted voting**: Weight by confidence or expertise
- **Debate protocols**: Adversarial critique across rounds
- **Trigger intervention**: Detect stalls or sycophancy
## Guidelines
1. Design for context isolation as primary benefit
2. Choose pattern based on coordination needs, not metaphor
3. Implement explicit handoff protocols with state passing
4. Use weighted voting or debate for consensus
5. Monitor for supervisor bottlenecks
## Notes
- Model upgrades often beat token increases for performance
- Swarm slightly outperforms supervisor with direct responses
- Validate outputs before passing between agents
Source: muratcankoylan/Agent-Skills-for-Context-Engineering
Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.
No comments yet. Be the first to comment!