CrewAI Multi-Agents

Course Content

CrewAI Multi-Agents

9 sections · 53 lessons

What is the difference between sequential and hierarchical processes in CrewAI?


What the manager actually decidesNext task,still inlist orderManagerreceivesthe taskDelegatesto a workerReviews theworker's resultAccepts, ordelegates againIf the task names an agent, the manager can delegate only to that agent.
Hierarchical mode changes who does each task and how many rounds it takes, never the order of the task list.

What you need to know

Sequential

Python
crew = Crew(agents=[researcher, writer, editor],            tasks=[research, draft, edit],            process=Process.sequential)   # the default
  • Every task must have an agent.
  • Order = the tasks list.
  • Cost ≈ one agent loop per task.

Hierarchical

Python
from crewai import LLMcrew = Crew(agents=[researcher, writer, editor],            tasks=[research, draft, edit],            process=Process.hierarchical,            manager_llm=LLM(model="openai/gpt-4o"))
  • You must set manager_llm or manager_agent, or the crew fails validation.
  • CrewAI gives the manager the delegation tools and sets its allow_delegation=True. A custom manager must not have tools of its own and must not be in agents.
  • For each task, if the task names an agent, the manager can delegate only to that agent; if not, it can choose any worker.
  • The manager reviews the result and can delegate again, so one task can take several worker runs.

Side by side

SequentialHierarchical
Who picks the workeryou, per taskthe manager, at run time
Task orderlist orderstill list order
LLM callsone loop per taskmanager loop plus one or more worker loops per task
Repeatabilityhighlower; the manager may choose differently
Debuggingread the tasks in ordertrace every delegation

A real-life example

A B2B SaaS company handles inbound requests from its website form: some are sales leads, some are support problems, some are partnership offers. They tried a hierarchical crew with a manager and three workers (lead researcher, support triager, partnerships analyst), and one task with no agent: "Handle this inbound request".

It worked — the manager routed correctly about 92% of the time — but each request cost 3 to 5 LLM loops and 40 seconds, and the manager sometimes asked two workers for the same request.

They replaced it with a sequential design inside a Flow: a single cheap classification step labels the request, a @router sends it to one of three small sequential crews. Routing accuracy stayed about the same, cost fell by roughly 60%, and every run followed a path they could read in the logs. The hierarchical version stayed in use for the strategy team's open-ended research questions, where the right expert really is unclear.

Follow-up questions to expect

  • "Does the manager reorder tasks?" — No. Tasks are still taken in list order; the manager decides who does each one and whether the result is good enough.
  • "manager_llm or manager_agent?" — manager_llm uses CrewAI's default manager prompt; manager_agent lets you write the manager's role, goal and backstory, for example to enforce your quality standards.
  • "Which model should the manager use?" — A strong one, because its mistakes affect every task; workers doing narrow jobs can use cheaper models.