Sequential order works when the steps are fixed, but some jobs need a plan that changes as results come in. With Process.hierarchical, a manager agent plans the work, delegates tasks to the specialist agents, and reviews what comes back.
Before you start
You need a CrewAI project with at least two specialist agents and a job that needs planning, for example research that may need a second round. A fixed two-step job does not need a manager.
Set the hierarchical process and define the manager
In crew.py, create the Crew with process set to Process.hierarchical and add a manager agent with a planning role. Give the manager the goal of breaking the job into tasks and checking each result before the next step. Keep the specialists narrow: one researcher, one writer, each with one job.
Run once and read the delegation in the log
Run the crew with verbose on and read the log: the manager should delegate, the specialists should report back, and the manager should decide whether the result is good enough. If the manager delegates everything to one agent, the specialist roles are too broad.
Worked example: A managed crew for a fictional product launch
Maple Shop is a fictional online shop planning a product launch. Its crew has a manager, a researcher and a writer. The table shows the delegation.
| Agent | Job | Reports to |
|---|---|---|
| manager | Plan the launch brief and check each part | The crew result |
| researcher | Find the product facts and prices | Manager |
| writer | Write the brief from the research | Manager |
Expected result (UNTESTED): the log shows the manager delegating to the researcher first, then to the writer, and the brief quotes the researched facts. We checked the CrewAI documentation summary, which describes Process.hierarchical, but we did not run the crew on this machine.
Limits
A manager agent costs extra model calls on every delegation, and a weak manager can delegate in circles. Use hierarchical order only when the plan genuinely depends on intermediate results. For a fixed sequence, sequential order is cheaper and easier to trace.
