Skip to content

swarm-hierarchical

Use when decomposing a complex task into structured subtasks with a coordinator agent managing worker agents. Also use when tasks have clear parent-child relationships or when centralized quality control is needed.

ModelSource
opuspack: swarms
Full Reference

Coordinator → Workers. One agent decomposes the task, dispatches workers, reviews results. Best for structured decomposition where a central authority decides task breakdown and integration. Coordinator runs on Opus 4.6; workers run on Sonnet for cost efficiency. Supports 3-8 parallel workers; beyond 8, batch into groups or use pipeline.


ItemValue
PatternCoordinator decomposes → workers execute → coordinator integrates
Coordinator modelOpus 4.6
Worker modelSonnet
Worker sweet spot3-8 workers
Worker limit>8 → batch or pipeline
Isolationisolation: "worktree" per worker

I want to…File
See the topology diagram and when to use vs other topologiesreference/topology.md
Implement coordinator logic, worker dispatch, and quality gatesreference/implementation.md

Usage: Read the reference file matching your current task from the index above. Each file is self-contained with code examples and inline gotchas.


┏━ ⚡ swarm-hierarchical ━━━━━━━━━━━━━━━━━━━━━━━━┓ ┃ [one-line description of what’s being decomposed] ┃ ┗━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛