Hierarchical Agents: Managers and Workers
You'll learn to
- -Describe a hierarchical design in which a manager plans and workers execute
- -Explain what a hierarchy buys, mainly context isolation, and what it costs in extra calls
- -Find the point where a hierarchy starts to read fewer tokens than one agent doing everything
- -Add the limits a hierarchy needs: a depth limit, partial results and least-privilege tools
Tip: the highlighter is on - just select any text below to mark it. Use the highlighter button up top to change color or turn it off. Highlights are saved on this device only. Log in to save them to your account instead.
The multi-agent chapter showed several agents sharing a workspace. A hierarchical design is the most common way to organize them. One agent, the manager, takes the goal, splits it into subtasks and hands each to a specialist worker. The workers do the work and report back, and the manager combines their results. Anthropic describes this as the orchestrator-workers workflow: a central model breaks a task down dynamically, delegates it to worker models and synthesizes what they return.
An Analogy: A Project Manager and Specialists
A project manager does not write the code, draw the logo and run the numbers personally. They decide who does what, give each person only the information that person needs, and put the pieces together at the end. A researcher does not need the whole project history to find five sources. This is also why the pattern helps: each worker starts with a short, focused briefing instead of a long, crowded one.
When It Fits
- -The subtasks cannot be listed in advance. A coding change may touch two files or twenty, and the manager decides after reading the request.
- -Subtasks are independent enough to run in parallel or to keep apart, such as searching, calculating and writing.
- -One agent's context would otherwise grow too long to stay reliable.
- -If the steps are fixed and known, a plain workflow is simpler and cheaper, as the workflows versus agents chapter explained.
A hierarchy is not free. Every worker is another model call with its own instructions, and the manager makes at least two calls of its own, one to plan and one to combine. The code counts how many tokens each design reads. Both read made-up amounts: a 150 token instruction block per call, a 120 token result per subtask, and so on. A single agent re-reads everything produced so far at every step. In the hierarchy each worker reads only its own task.
With 2 subtasks, the single agent reads 513 tokens and the hierarchy 738, so the extra instruction blocks and the manager's two calls cost more than they save. By 4 subtasks the order flips: 1,566 against 1,128. At 32 subtasks the single agent reads 73,008 tokens and the hierarchy 6,588, because the single agent's history keeps growing while each worker stays small. The crossover depends on your numbers, but the shape is general: hierarchies pay off when there is a lot of work to separate, and not for two small steps.
The second part of the output shows the guardrails. One scripted worker failed, so the manager finished with status partial instead of pretending to be complete, and it knows exactly which result is missing. A request to go three levels deep was refused by a depth limit.
Limits a Hierarchy Needs
- -A depth limit and a step or token budget, so managers cannot spawn workers forever and run up the bill.
- -Partial results, reported honestly. A worker failure should not crash the whole run or be silently hidden.
- -Least privilege: give each worker only the tools it needs. A research worker should not be able to send email.
- -Human approval before any irreversible action, wherever in the hierarchy it comes from.
- -Traces that show the plan, each worker's task, result and cost, so you can evaluate the trajectory and not just the final answer.
Anthropic's own guidance is to find the simplest solution that works and add complexity only when needed, because agentic systems trade latency and cost for better task performance and can compound errors. Start with one agent or a fixed workflow, and add a manager when you can show the simple version failing.
Interview Signal is part of Pro
See a real weak answer next to a real strong one for this exact topic.
Quiz is part of Pro
Test what you just read with a short quiz, and bank the XP.
Discussion0
Join the Discussion
Sign in to leave comments, reply to others, or like insights.
No comments yet. Be the first to start the thread!