reaatech/agentic-arch-patterns/orchestrator-worker
Claude Code and agent skill by reaatech/agentic-arch-patterns
- community
Checking that the SKILL.md file is still in the repository.
Install
npx vskill@latest install reaatech/agentic-arch-patterns/orchestrator-workerSKILL.md
The same SKILL.md was published earlier as reaatech/agentic-arch-patterns/orchestrator-worker.
Orchestrator-Worker Pattern
Abstract
The Orchestrator-Worker pattern coordinates task distribution among specialized agents. A central orchestrator receives requests, decomposes them into subtasks, and dispatches work to worker agents based on their capabilities. Workers execute their assigned tasks and return results to the orchestrator, which aggregates responses and produces the final output.
Problem Statement
In multi-agent systems, requests often require capabilities that span multiple domains. A single monolithic agent becomes unmaintainable as the number of tools and capabilities grows. The problem is how to coordinate specialized agents to handle complex requests while maintaining separation of concerns, enabling independent scaling, and providing clear failure boundaries.
Context
This pattern arises when:
- Multiple specialized agents exist, each with distinct capabilities
- Requests may require coordination across multiple agents
- Different agents have different performance characteristics
- Independent scaling of agent types is desired
- Clear ownership and responsibility boundaries are needed
Forces
- Specialization vs. Coordination: Specialized agents are more maintainable but require coordination overhead
- Latency vs. Quality: Sequential orchestration adds latency but enables quality control
- Coupling vs. Flexibility: Tight coupling simplifies coordination but reduces flexibility
- State Management: Orchestrator must track worker state without becoming a bottleneck
Solution
Architecture Diagram
Components
- Orchestrator: Receives client requests, decomposes into subtasks, dispatches to workers, aggregates results
- Worker: Specialized agent that executes assigned subtasks and returns results
- Task Queue: Optional buffer between orchestrator and workers for load balancing
- Result Store: Optional persistent storage for worker results
Interaction Sequence
- Client sends request to orchestrator
- Orchestrator parses request and identifies required capabilities
- Orchestrator creates subtasks for each required capability
- Orchestrator dispatches subtasks to appropriate workers
- Workers execute subtasks independently
- Workers return results to orchestrator
- Orchestrator aggregates results
- Orchestrator returns final response to client
Formal Properties
Invariants:
- Each subtask is assigned to exactly one worker
- Orchestrator tracks all pending subtasks
- Results are correlated with their originating subtasks
Guarantees:
- All subtasks are eventually executed or explicitly cancelled
- Client receives aggregated response within bounded time
- Worker failures are isolated and do not affect other workers
Bounds:
- Maximum subtasks per request: configurable
- Worker timeout: bounded by orchestrator timeout
- Result aggregation: O(n) where n = number of subtasks
Implementation
TypeScript Example
Key Design Decisions
- Synchronous vs. Asynchronous: Synchronous for simplicity; asynchronous for scalability
- Decomposition Strategy: Rule-based decomposition for predictability; ML-based for flexibility
- Result Aggregation: Simple concatenation for homogeneous results; custom logic for heterogeneous
Failure Modes
| Failure | Detection | Recovery | |
|---|---|---|---|
| Worker unavailable | Timeout or connection error | Retry with backoff, failover to backup worker | |
| Subtask timeout | Timeout exceeded | Cancel subtask, return partial results or error | |
| Result aggregation failure | Exception during aggregation | Return raw results with aggregation error | |
| Orchestrator failure | Health check failure | Failover to backup orchestrator | |
| Worker returns invalid result | Schema validation failure | Retry or mark as failed |
When NOT to Use
- Simple requests: If requests can be handled by a single agent, avoid orchestration overhead
- Tight latency requirements: Sequential orchestration adds latency; consider parallel execution
- Stateful workflows: If workflow state must persist across requests, consider Saga pattern
- Highly coupled tasks: If tasks are highly interdependent, consider Pipeline pattern
Cross-References
Related Patterns
- Supervisor (Part I) — Adds hierarchical oversight and escalation
- Fan-Out/Fan-In (Part I) — Parallel execution variant
- Pipeline (Part I) — Sequential processing variant
- Router (Part I) — Content-based routing to workers
External Implementations
- agent-mesh — Complete orchestrator implementation with confidence gating
References
- Pattern-Oriented Software Architecture, Volume 1 (Buschmann et al., 1996) — Master-Slave pattern
- Enterprise Integration Patterns (Hohpe & Woolf, 2003) — Message routing patterns
- Building Microservices (Newman, 2015) — Service orchestration vs. choreography
Security
- Security scanPassed, 100 of 100Pattern checks on the skill's files.
- Model reviewNot runA model review is scheduled for the next rescan.
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/orchestrator-worker/skill.md
Popularity
- 7-day trend score
- 0
Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/reaatech/agentic-arch-patterns/orchestrator-worker)