Skip to content
Back to skills

Multi Agent Patterns

ASecurity

Design multi-agent systems for distributing work across multiple context windows.

  • 7 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added September 3, 2026
ai-agentspythonperformance

Security analysis

A100/100

Pro scans all 2 files and shows the line behind each finding

Scanned September 3, 2026

npx -y skills add mediar-ai/skillhubz --skill multi-agent-patterns --agent claude-code

Installs 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 with every re-scan.

Security grade badge for Multi Agent Patterns
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/mediar-ai-multi-agent-patterns/badge)](https://www.skillsdirectory.com/skills/mediar-ai-multi-agent-patterns)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
# 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

Files in this skill

  • manifest.json336 B
  • skill.md2.3 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in ai-agents →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.