orchestrator-workers
Orchestrator-Workers
Anthropic canonical agent pattern. Planner in middle. Workers do pieces. Orchestrator decides next jobs.
What It Is
One orchestrator decomposes task at runtime. It assigns jobs to workers. Workers return outputs. Orchestrator reviews, adds jobs, then combines result.
When to Use
- Task shape not known upfront
- Need dynamic decomposition
- Different workers have different tools or skills
- Need iterative task assignment
- Work is too big for one fixed chain
When Not to Use
- Flow is fixed and simple
- Workers do not add real specialization
- Planner overhead bigger than work
- Need strict predictability over flexible search
- Shared state design is weak
Core Flow
input
→ orchestrator plans
→ assign worker jobs
→ workers execute
→ orchestrator reviews gaps
→ assign more jobs or finish
→ synthesize output
Simple Implementation Outline
- Define orchestrator role.
- Define worker types and contracts.
- Store shared task state outside prompts.
- Give workers narrow jobs.
- Make orchestrator inspect worker outputs.
- Allow replan, but cap loops.
- Synthesize with citations to worker results.
Good Worker Types
- Research worker
- Code worker
- Test worker
- Retrieval worker
- Critique worker
Failure Modes
- Orchestrator micromanages every detail
- Workers overlap and duplicate effort
- No shared state contract
- Replan loop never ends
- Worker outputs too verbose to combine
- Orchestrator hides uncertainty
Practical Checklist
- Dynamic planning actually needed
- Worker roles distinct
- Input/output contract per worker
- Shared state store defined
- Max rounds set
- Escalation rule for stuck state
- Synthesis step grounded in worker outputs
- Trace of plan, tasks, results kept
Decision Rule
Use orchestrator-workers when task decomposition must happen during execution. If job graph is known upfront, prefer chaining or parallelization.
More from flpbalada/fb-skills
progressive-disclosure
Reduce complexity by revealing information progressively. Use when designing
7discuss-task
Clarify ambiguous tasks before action. Use when goal, scope, success criteria, constraints, or risks are unclear.
4cognitive-fluency-psychology
Apply cognitive fluency principles to improve clarity, trust, and conversion.
4react-useeffect-avoid
Guides when NOT to use useEffect and suggests better alternatives. Use when reviewing React code, troubleshooting performance, or considering useEffect for derived state or form resets.
4discuss-code
Critically discuss code issues with compact findings. Use when code needs review for logic, simplicity, structure, naming, or maintainability.
4learn
Extract reusable patterns from the current session. Use when errors, debugging techniques, workarounds, or project conventions should become skills.
3