TL;DR
- Open-source Python framework by João Moura that organises multi-agent systems around the metaphor of a crew — agents with named roles, goals, backstories, and tools.
- Released in 2023, MIT-licensed, with a deliberately opinionated API designed for production use rather than research flexibility.
- Supports sequential and hierarchical task processes, parallel task execution, and a managed enterprise plane (CrewAI Enterprise / Plus) for deployment, observability, and human-in-the-loop.
- Ships independent of LangChain since the 0.30 line, with its own tool, memory, and event abstractions — earlier versions wrapped LangChain primitives.
The Crew Metaphor#
CrewAI's design choice is to lean hard into the metaphor of human teams. You define `Agent` objects with a role ("Senior Research Analyst"), a goal ("Find the three best recent papers on retrieval augmented generation"), and a backstory (a paragraph of context that conditions the system prompt). You define `Task` objects that describe what needs to be done, assign each to an agent, and bundle them into a `Crew` that runs them in a process — sequential, hierarchical, or parallel.
The metaphor is more than cosmetic. The role-goal-backstory triple is structured into the system prompt automatically, which gives a more focused agent than a free-form prompt. And the explicit separation of agents from tasks means agents are reusable across crews while tasks remain crew-specific.
Processes#
- Sequential — tasks run in declaration order, output of each task is appended to the context of the next. The default; predictable and easy to debug.
- Hierarchical — a manager agent (LLM-driven) decides which crew member tackles each task. More flexible but less predictable; budget tokens carefully.
- Parallel — independent tasks execute concurrently via async, useful when tasks have no inter-dependencies.
Tools and Memory#
CrewAI ships a `BaseTool` class and a library of pre-built tools — web search via Serper, file read/write, code interpreter, vector store retrieval, browser automation, and dozens more. Custom tools are Python functions wrapped with `@tool` or subclasses of `BaseTool` for richer behaviour.
Memory is provided at three levels: short-term (in-task context), long-term (a persisted vector store across runs), and entity memory (extracted entities and relationships). Memory is opt-in per crew; enable it when the application benefits from cross-run continuity, leave it off for stateless workflows.
Minimal Crew Example#
from crewai import Agent, Task, Crew, Process
from crewai_tools import SerperDevTool
researcher = Agent(
role="Senior Research Analyst",
goal="Find recent advances in retrieval augmented generation",
backstory="You have ten years of experience surveying ML literature.",
tools=[SerperDevTool()],
verbose=True,
)
writer = Agent(
role="Technical Writer",
goal="Produce a concise briefing from research notes",
backstory="You write for senior engineers who want signal, not hype.",
verbose=True,
)
research = Task(
description="Find the three best papers on RAG from the last six months.",
expected_output="A bulleted list with citations.",
agent=researcher,
)
brief = Task(
description="Write a one-page briefing from the research notes.",
expected_output="Markdown, no marketing language.",
agent=writer,
)
crew = Crew(agents=[researcher, writer], tasks=[research, brief], process=Process.sequential)
print(crew.kickoff())CrewAI Enterprise#
The commercial CrewAI Enterprise plane provides deployment, scheduled runs, an inspection UI for traces, human-in-the-loop approval steps, and team-level access control. Open-source CrewAI is fully usable on its own; the enterprise plane is aimed at organisations running crews in production with audit and approval requirements.
When to Pick CrewAI#
Pick CrewAI when role-based decomposition matches the problem and you want an opinionated, batteries-included framework rather than a flexible primitive set. Pick AutoGen when you need conversational multi-agent patterns with a code-executing agent in the loop. Pick LangGraph when you want fine-grained control of the agent runtime as a graph. Pick a single-agent tool-calling loop with the provider SDK if the problem does not actually need multiple agents — many tasks do not.
Multi-agent frameworks introduce coordination cost — extra LLM calls, longer traces, more failure modes. Use them when a task genuinely benefits from role specialisation, not by default.
References
- CrewAI Documentation · CrewAI
- CrewAI on GitHub · GitHub