skip to content

In CrewAI, what changes when a Crew runs Process.hierarchical instead of Process.sequential?

level: middleimportance: must knowfreq 85%

answer

  1. one list versus one boss
  2. who picks the next agent
  3. an extra agent you never wrote
  4. delegation turns are billable
  5. determinism versus dynamic routing

basics

~20 s

Process.sequential executes the Crew's tasks in the order you listed them, each task seeing earlier output. Process.hierarchical inserts a manager agent that decides which worker gets which task and reviews the result, adding LLM calls, latency and nondeterminism.

solid answer

~50 s

A CrewAI `Crew` bundles agents, tasks and a `process`. Under `Process.sequential` the runtime simply walks the `tasks` list in order: each task runs on the agent assigned to it, and prior task output is threaded in as context, so control flow is fully deterministic and the token cost is roughly the sum of the tasks. Under `Process.hierarchical` CrewAI puts a manager agent on top. You must supply `manager_llm` (CrewAI builds a manager for you) or `manager_agent` (your own `Agent`). The manager is given delegation tools and drives the run: it reads the task, picks a coworker, hands off the work, can ask that coworker follow-up questions, and reviews what comes back before moving on. So hierarchical buys you dynamic assignment and a review step, and it costs you extra manager LLM calls per task, higher latency, and a run whose exact path differs between executions.

code

python · 20 lines
python
from crewai import Agent, Crew, Task, Process

researcher = Agent(role="Researcher", goal="Find facts", backstory="Careful analyst")
writer = Agent(role="Writer", goal="Write a brief", backstory="Concise editor")

research = Task(description="Research {topic}", expected_output="5 bullet facts", agent=researcher)
write = Task(description="Write a brief on {topic}", expected_output="200 words", agent=writer)

sequential_crew = Crew(
    agents=[researcher, writer],
    tasks=[research, write],
    process=Process.sequential,
)

hierarchical_crew = Crew(
    agents=[researcher, writer],
    tasks=[research, write],
    process=Process.hierarchical,
    manager_llm="gpt-4o",
)

go deeper

for a junior

Know that a Crew takes agents, tasks and a process, and that the default sequential process runs the tasks in the order you listed them. Be able to name hierarchical as the other option and say it adds a manager.

for a middle

Explain what the manager actually does in hierarchical mode: it is a real agent with delegation tools, it needs manager_llm or manager_agent, and it adds LLM turns around every task. Say plainly that sequential threads earlier output forward as context.

for a senior

Show production judgment: default to sequential, justify hierarchical only when routing genuinely depends on content, and describe how you would measure the manager's token and latency overhead before keeping it.

for a principal

Own the framing that sequential puts the plan in code while hierarchical puts it in a prompt, and reason about what that means for reproducibility, evaluation noise, injection surface and cost predictability across a fleet of crews.

## The Crew object In CrewAI a `Crew` is the unit you actually execute. You construct it with a list of `agents`, a list of `tasks`, and a `process`, plus optional switches such as `verbose`, `memory`, `planning`, `max_rpm` and `cache`. Calling `crew.kickoff()` runs the whole thing and returns a `CrewOutput`. The `process` argument is the single biggest behavioural lever on that object, because it decides *who chooses what happens next*. ## Process.sequential `Process.sequential` is the default and the simplest model. The runtime iterates the `tasks` list in declaration order. Each task is executed by the agent bound to it, and the output of preceding work is passed forward as context, so a later task can build on an earlier one (you can override what a task sees by setting its explicit context). When the last task finishes, its output becomes the crew's headline result. Properties worth stating in an interview: - **Deterministic ordering.** The list *is* the plan. Reading the code tells you the execution order. - **Predictable cost.** Total tokens are roughly the sum of each agent's own loop; there is no coordinator overhead. - **Every task needs an agent.** Ordering is yours to get right; nothing re-plans if a task's output is poor. - **Sequential means sequential.** It is not parallelism. Fan-out inside a sequential crew comes from marking individual tasks async, not from the process itself. ## Process.hierarchical `Process.hierarchical` introduces a manager. Because that manager needs a brain, CrewAI validates at construction time that you supplied either `manager_llm` (a model identifier or LLM object, from which CrewAI creates a default manager agent) or `manager_agent` (an `Agent` you wrote yourself). Constructing a hierarchical crew with neither fails. At run time the manager, not the list, drives the work. It receives the task, selects a coworker from the crew's `agents`, and uses the delegation tools CrewAI attaches to it to hand work over or to ask a coworker a question. The worker runs its own loop, returns a result, and the manager evaluates it before continuing. Tasks in a hierarchical crew therefore do not have to name an agent — assignment is the manager's job. What this buys you: - **Dynamic routing.** The right specialist can be chosen from the task text rather than hard-wired. - **A review step.** The manager can reject weak output and re-delegate, which sequential mode never does on its own. - **A single point of coordination** for crews where you genuinely cannot precompute the order. What it costs you: - **Extra LLM calls per task** — at minimum a delegation decision and a review, often more when the manager asks clarifying questions. On a four-task crew this can double the run's token bill. - **Latency**, because manager turns are serialized in front of and behind every worker turn. - **Nondeterminism.** Two runs of the same inputs can route differently, which makes reproducing a bug harder and makes evaluation noisier. - **A new failure mode**: the manager mis-delegates, loops on the same coworker, or accepts an answer the specialist hedged. ## Choosing between them The honest default is sequential. Most production CrewAI crews are a pipeline — research, then analyse, then write — and a pipeline expressed as an ordered list is cheaper, faster, easier to test and easier to debug than the same pipeline expressed as a manager's improvisation. Reach for hierarchical when the assignment genuinely depends on content the code cannot see ahead of time, or when you want an explicit review gate in the loop and are willing to pay for it. A useful framing for an interviewer: *sequential puts the plan in your code; hierarchical puts the plan in a prompt.* Anything in a prompt is subject to model drift, prompt injection through retrieved content, and token cost that scales with how chatty the manager is. ## Debugging each With sequential, a bad result localises to one task: read that task's output and its context. With hierarchical, you first have to establish *which agent actually did the work* — turn on `verbose`, write a run log with `output_log_file`, and inspect `CrewOutput.tasks_output` and `CrewOutput.token_usage`. A manager that spends most of the budget talking to itself is a common and easily missed symptom. ## Version note This describes the CrewAI 0.x `Crew`/`Process` API. The `Process` enum's supported members in practice are `sequential` and `hierarchical`; do not promise consensus-style processes in an interview.

  • If sequential is deterministic, how do you get any concurrency out of a CrewAI crew?
    Not from the process. `Process.sequential` walks the task list one at a time; concurrency comes from marking individual tasks for async execution so the runtime can start the next one without waiting, and from running whole crews side by side with `kickoff_for_each_async`. Reaching for `Process.hierarchical` to get parallelism is a misconception — the manager still serialises delegation turns.
  • In a hierarchical crew, does a task still need its agent field set?
    No. Assignment is the manager's job, so tasks may be declared without an agent and the manager picks a coworker from the crew's `agents` list. If you do bind an agent, you have partly re-hard-wired the routing you paid the manager to do — which is sometimes what you want for one critical step, but it should be a deliberate choice.
  • How would you decide a hierarchical crew is not paying for itself?
    Compare a sequential baseline on the same inputs. Look at `CrewOutput.token_usage` for the ratio of manager tokens to worker tokens, and at wall-clock latency per task. If the manager consistently routes the same task to the same agent, the routing was static all along and you should encode it in the task list, keeping the tokens.

Sequential is an assembly line: each station does its step and passes the part on. Hierarchical is a team lead who reads the ticket, decides who takes it, and inspects the work before it moves.

saying these in an interview costs you the question

  • Says hierarchical runs tasks in parallel across agents
  • Thinks Process.hierarchical works without manager_llm or manager_agent
  • Claims hierarchical costs the same tokens as sequential
  • Believes the manager executes the tasks itself rather than delegating
  • Assumes sequential tasks each start with no prior context

context