| name | multi-agent-orchestration |
| description | Coordinate multiple AI agents for complex tasks โ decomposition, delegation, and synthesis |
| tier | standard |
| user-invokable | false |
| applyTo | **/*agent*,**/*orchestrat*,**/*multi*,**/*workflow*,**/*subagent* |
Multi-Agent Orchestration Skill
Decompose complex problems into agent-appropriate subtasks, delegate effectively, and synthesize results.
โ ๏ธ Rapid Evolution Domain
Multi-agent patterns are evolving rapidly. This skill captures stable patterns while acknowledging the field is in flux.
Refresh triggers:
- New orchestration frameworks (LangGraph, AutoGen, CrewAI releases)
- Claude/GPT native multi-agent features
- VS Code Copilot agent architecture changes
Last validated: February 2026
Core Concepts
When to Use Multi-Agent
| Scenario | Single Agent | Multi-Agent |
|---|
| Simple code edit | โ
| โ Overkill |
| Multi-file refactor | โ
(if capable model) | โ ๏ธ Consider |
| Research + implement | โ ๏ธ Long context | โ
Decompose |
| Cross-domain task | โ Context overload | โ
Specialists |
| Parallel independent work | โ Sequential | โ
Parallel agents |
Agent Roles
| Role | Responsibility | Example |
|---|
| Orchestrator | Decompose, delegate, synthesize | Main chat session |
| Specialist | Deep expertise in one domain | Security reviewer agent |
| Worker | Execute well-defined subtask | "Find all usages of X" |
| Critic | Validate, review, improve | Code review agent |
Decomposition Patterns
1. Horizontal Decomposition (Parallel)
Split task into independent subtasks that can run simultaneously.
โโโโโโโโโโโโโโโโโโโ
โ Orchestrator โ
โโโโโโโโโฌโโโโโโโโโโ
โ decompose
โโโโโโดโโโโโฌโโโโโโโโโ
โผ โผ โผ
โโโโโโโ โโโโโโโ โโโโโโโ
โ A1 โ โ A2 โ โ A3 โ (parallel)
โโโโฌโโโ โโโโฌโโโ โโโโฌโโโ
โโโโโโโโโโผโโโโโโโโโ
โผ
synthesize
When to use:
- Tasks have no dependencies
- Results can be merged mechanically
- Time is critical
Example: "Search for security issues in auth, api, and database modules"
2. Vertical Decomposition (Pipeline)
Chain agents where each builds on previous output.
โโโโโโโโโโโโโโโโโโโ
โ Orchestrator โ
โโโโโโโโโฌโโโโโโโโโโ
โผ
โโโโโโโโโ
โ A1 โ โ research
โโโโโฌโโโโ
โผ
โโโโโโโโโ
โ A2 โ โ analyze
โโโโโฌโโโโ
โผ
โโโโโโโโโ
โ A3 โ โ implement
โโโโโโโโโ
When to use:
- Each step needs output from previous
- Context builds incrementally
- Quality gates between steps
Example: "Research best practices โ Design API โ Implement โ Review"
3. Hierarchical Decomposition (Tree)
Orchestrator delegates to sub-orchestrators who manage workers.
โโโโโโโโโโโโโโโโโโโ
โ Root Orch โ
โโโโโโโโโฌโโโโโโโโโโ
โโโโโโดโโโโโ
โผ โผ
โโโโโโโ โโโโโโโ
โSubO1โ โSubO2โ (sub-orchestrators)
โโโโฌโโโ โโโโฌโโโ
โโโดโโ โโโโดโโโ
โผ โผ โผ โผ
โโโ โโโ โโโ โโโ
โWโ โWโ โWโ โWโ (workers)
โโโ โโโ โโโ โโโ
When to use:
- Very complex tasks
- Different domains within task
- Scale beyond single orchestrator's context
Delegation Best Practices
Crafting Agent Instructions
When delegating to a subagent, specify:
| Element | Purpose | Example |
|---|
| Context | What they need to know | "Working on Alex VS Code extension" |
| Scope | Clear boundaries | "Only look in /src/services" |
| Output | Expected format | "Return JSON with findings" |
| Constraints | What NOT to do | "Don't modify files, only report" |
Template for Subagent Prompt
**Task:** [One-sentence objective]
**Context:**
- Project: [name/type]
- Relevant files: [list]
- What's already done: [state]
**Scope:**
- DO: [specific actions]
- DON'T: [boundaries]
**Expected Output:**
[Format and content expectations]
**Success Criteria:**
[How you'll know it's done right]
Synthesis Patterns
Merging Agent Outputs
| Pattern | When | How |
|---|
| Concatenate | Independent results | Simple append |
| Deduplicate | Overlapping searches | Hash/compare |
| Vote | Multiple opinions | Majority wins |
| Synthesize | Diverse perspectives | LLM summary |
| Validate | Critical decisions | Critic agent reviews |
Conflict Resolution
When agents disagree:
-
Identify conflict type
- Factual (check sources)
- Opinion (escalate to user)
- Interpretation (provide both views)
-
Resolution strategies
- Ask clarifying questions
- Request evidence from agents
- Escalate to more capable model
- Present options to user
VS Code Copilot Patterns
Using runSubagent Effectively
The runSubagent tool enables orchestration within VS Code:
await runSubagent({
prompt: `Search the codebase for all error handling patterns.
Return a JSON array of: {file, line, pattern, quality}`,
description: "Find error patterns"
user-invokable: false
});
await runSubagent({
prompt: "Look for problems in the code",
description: "Find issues"
user-invokable: false
});
When to Use Subagent vs Direct
| Scenario | Approach |
|---|
| Simple search | Direct grep_search |
| Complex multi-step search | runSubagent |
| Single file edit | Direct replace_string_in_file |
| Multi-file coordinated change | Consider subagent for planning |
| Research + implementation | Subagent for research, direct for implementation |
Common Anti-Patterns
โ Over-Orchestration
Problem: Using multiple agents for simple tasks
Symptom: Slower, more expensive, no quality gain
Fix: Trust capable models for multi-step tasks up to complexity threshold
โ Insufficient Context
Problem: Agents lack needed information
Symptom: Repeated clarification requests, wrong assumptions
Fix: Front-load context in delegation prompt
โ No Synthesis Strategy
Problem: Raw agent outputs dumped on user
Symptom: User must manually integrate results
Fix: Plan synthesis before decomposition
โ Circular Dependencies
Problem: Agent A needs B's output, B needs A's output
Symptom: Deadlock or infinite loops
Fix: Identify and break cycles in task graph
Framework Landscape (2026)
| Framework | Strength | Use Case |
|---|
| LangGraph | State machines, cycles | Complex workflows |
| AutoGen | Conversation patterns | Research, debate |
| CrewAI | Role-based teams | Business processes |
| VS Code Agents | IDE integration | Code tasks |
| Semantic Kernel | .NET native | Enterprise C# |
Alex-Specific Patterns
Heir Orchestration
Master Alex can coordinate heirs for cross-platform tasks:
Master Alex (orchestrator)
โโโ VS Code Heir โ code analysis
โโโ M365 Heir โ document synthesis
โโโ Global Knowledge โ pattern matching
Skill Selection as Orchestration
When Alex runs Skill Selection Optimization (SSO), it's a form of self-orchestration:
- Survey available skills (agents)
- Match to task requirements
- Load relevant skills
- Execute with combined expertise
Implementation Checklist
When designing multi-agent workflows:
Related Skills
- skill-selection-optimization โ Pre-task skill loading
- prompt-engineering โ Crafting effective agent prompts
- appropriate-reliance โ Knowing when to trust agent output
- root-cause-analysis โ Debugging multi-agent failures
Multi-agent orchestration is powerful but not always necessary. Start simple, add agents when complexity demands it.