In CrewAI hierarchical mode, what does the manager LLM actually do?
CrewAI's manager LLM is a live coordinator. It routes Tasks to Agents, brokers delegation between Agents, and validates outputs against each Task's expected_output during the run.
Think of an editor running a small newsroom. The editor does not write the articles themselves; they read the assignment slip, pick the reporter best suited to it, and pass the work along. When the reporter needs a quote from the data-team colleague, the editor introduces them. When the draft comes back, the editor reads it against the original brief and decides whether to send it back for changes or move it forward. The editor is not just there at the morning meeting; they stay in the loop all day. Without them, every reporter would just file whatever they felt like writing.
Detailed answer & concept explanation~5 min readEverything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
5 minutes: the three live jobs of manager_llm, why expected_output matters as an acceptance test, and how routing failures masquerade as agent failures.
from crewai import Agent, Task, Crew, Process
researcher = Agent(role="Researcher", goal="Find primary sources",
backstory="You read papers and cite them precisely.",
tools=[search_tool])
writer = Agent(role="Writer", goal="Draft clear explanations",
backstory="You turn research into 200-word summaries.")
brief = Task(
description="Summarise the GenAI OpenTelemetry conventions.",
expected_output="A 200-word summary with at least 3 citation URLs.",
)
crew = Crew(
agents=[researcher, writer],
tasks=[brief],
process=Process.hierarchical,
manager_llm="claude-opus-4-7",
)
result = crew.kickoff()| Aspect | Sequential Process | Hierarchical Process |
|---|---|---|
| Task to Agent mapping | Pre-assigned in code | Decided at runtime by manager_llm |
| Delegation between agents | Not first-class | Brokered by manager via `delegate` tool |
| Output validation | Manual / downstream | Manager checks against `expected_output` |
| Orchestrator cost | Zero. No manager | One manager LLM call per routing decision |
| Best fit | Linear pipelines with known assignment | Dynamic routing across a roster |
Real products, models, and research that use this idea.
- CrewAI's own documentation positions Hierarchical Process as the upgrade path from Sequential when Task to Agent routing is non-trivial.
- Teams running CrewAI in production commonly pair Claude Opus 4.7 or GPT-5.5 as the `manager_llm` with Sonnet 4.6 or Haiku-class workers. The orchestrator pays the premium.
- CrewAI's `delegate` and `ask_question` tools are surfaced specifically because they only make sense when a manager is brokering the exchange between agents.
- AutoGen's GroupChatManager and LangGraph's Supervisor pattern are direct conceptual analogues to CrewAI's manager_llm. Every multi-agent framework converges on a router primitive.
What an interviewer would ask next. Try answering before peeking at the approach.
QHow would you write an `expected_output` that the manager can validate reliably?
QWhat happens if the manager keeps rejecting an agent's output in validation?
Don't say thisRed flags and common mistakes that signal junior thinking. Click to expand.
Red flags and common mistakes that signal junior thinking. Click to expand.
Skimping on the manager_llm by pointing it at a cheap model and then blaming the worker agents when the crew makes bad routing decisions or rubber-stamps weak output.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.
Same topic, related formats. Practice these next.