CrewAI Multi-Agents

Course Content

CrewAI Multi-Agents

9 sections · 53 lessons

How does CrewAI enable planning across multiple agents?


Where the plan comes from, most to least inspectablePlan as data — typed Plan, checked by codeplanning=True — one plan added to every taskplanning_config — each agent plans its own taskHierarchical manager — plans while delegating
The lower the level, the later the plan is made and the less of it you can check before the expensive run starts.

What you need to know

Without planning, each agent sees only its own task. It does not know what the next agent needs, so it may research the wrong depth or skip a fact a later task depends on. Planning gives every task a shared view of the whole job.

Level 1: crew-level planning

Python
from crewai import Crew, Processcrew = Crew(    agents=[researcher, analyst, writer],    tasks=[research, analyse, write],    process=Process.sequential,    planning=True,                   # run the AgentPlanner first    planning_llm="openai/gpt-4.1",   # defaults to gpt-4o-mini if not set)

Before each crew run, an internal AgentPlanner reads all agents, tasks, tools and expected outputs, writes a numbered plan for each task, and appends it to that task's description. The workers then execute with the plan in their prompt. Cost: one extra LLM call per kickoff, and every task prompt gets longer.

Level 2: agent-level planning

Python
from crewai import Agent, PlanningConfiganalyst = Agent(    role="Market Analyst", goal="...", backstory="...",    planning_config=PlanningConfig(        max_attempts=2,           # refine the plan at most twice        reasoning_effort="low",   # no extra LLM check after each step    ),)

Passing a PlanningConfig turns planning on for that agent. Before it acts, the agent writes a plan for its task and refines it until it is ready, or until max_attempts. reasoning_effort controls what happens during the task: "low" skips extra checks, "medium" (the default) checks each step with an LLM call and replans on failure, and "high" can also refine the plan or stop early when the goal is met. Higher effort adapts better and costs more calls per step. This helps one hard task. It does not coordinate agents with each other.

Older code and answers use Agent(reasoning=True, max_reasoning_attempts=2). In CrewAI 1.15 that form is deprecated: it still works, with a warning, and is converted into a PlanningConfig. Use planning_config in new code.

Level 3: a manager that plans as it goes

Process.hierarchical with a manager_llm or manager_agent lets a manager decide which coworker does what, in what order, using the built-in delegation tools. It adapts best to surprising inputs, and it is the least predictable: two runs on the same input can take different paths.

Level 4: plan as data

A planner task returns a Pydantic Plan, and ordinary code (usually a Flow) runs the steps. Now the plan is an object you can validate ("no more than 6 steps", "every step names a known agent"), store, show to a human, and test.

LevelWho plansPredictabilityExtra cost
planning=TrueAgentPlanner, once per runhigh1 call + longer prompts
planning_config on an agenteach agent, for itselfhigh1–N calls per agent, more at higher effort
Hierarchicalmanager, during the runlowmanager loop + delegations
Plan as dataplanner task, checked by codehighest1 call

A real-life example

A consulting team builds a market-research crew for questions like "Should we launch a ₹299/month meal-kit plan in Pune?". It has a researcher (web search), a data analyst (census and pricing data) and a writer.

Without planning, the researcher returned 20 generic articles about meal kits in the US, and the analyst had nothing about Pune to work with. With planning=True, the plan told the researcher to find Pune-specific competitors and prices because task 2 would compare prices. Relevant sources went from 4 of 20 to 15 of 20, for one extra call costing about ₹2 per run.

For their client-facing version they moved to plan as data: the planner returns Plan(steps=[...]), code rejects any plan with more than 6 steps or an unknown agent, and a manager reviews the plan in the UI before the ₹60 research run starts.

Follow-up questions to expect

  • "Is crew planning=True the same as agent-level planning?" — No. Crew planning makes one plan for the whole crew and adds it to every task. An agent's planning_config (formerly reasoning=True, now deprecated) makes that one agent plan its own task.
  • "When would you not turn planning on?" — On a fixed pipeline that already runs well, such as a nightly report with the same three tasks. The plan adds tokens to every task and rarely changes the result.
  • "Does the hierarchical manager use the AgentPlanner?" — Not by default; the manager plans through delegation. You can combine both, but it adds cost and makes runs harder to trace.