CrewAI (João Moura, 2023) is a Python framework for multi-agent orchestration whose marketing-friendly conceit is "build your AI crew": assemble a team of specialised role-playing agents, give them a goal, and let them execute.
Core abstractions
from crewai import Agent, Task, Crew, Process
researcher = Agent(
role="Senior Research Analyst",
goal="Uncover cutting-edge developments in AI",
backstory="You are a tenacious researcher at a top AI lab.",
tools=[search_tool],
verbose=True,
)
writer = Agent(
role="Tech Content Writer",
goal="Craft compelling technical articles",
backstory="You are a renowned writer for The Information.",
)
research_task = Task(
description="Investigate the latest agentic-AI trends",
agent=researcher,
expected_output="A bulleted list of 5 trends with sources.",
)
write_task = Task(
description="Write a 500-word article using the research",
agent=writer,
expected_output="A polished markdown article.",
)
crew = Crew(
agents=[researcher, writer],
tasks=[research_task, write_task],
process=Process.sequential, # or hierarchical
)
result = crew.kickoff()
Distinctive design choices
- Role/goal/backstory, every agent has these three string fields; the system prompt is constructed from them. The "backstory" trick consistently improves persona stability.
- Tasks are first-class, unlike AutoGen where everything is a message, CrewAI distinguishes structured Tasks with expected outputs from agents.
- Process types,
sequential(linear pipeline) orhierarchical(manager agent delegates). - Memory, built-in short-term, long-term, and entity memory subsystems with vector stores.
- Built on LangChain initially, gradually decoupled.
When CrewAI shines
- Content workflows (research → outline → draft → edit).
- Customer support pipelines (triage → resolve → respond).
- Tasks with clear human-org analogues ("a researcher and a writer").
Limitations
- The role/backstory pattern is essentially advanced prompt engineering; benefits are real but bounded.
- Same critique as all multi-agent orchestration: adding agents often degrades quality versus a single capable agent with good tools.
Modern relevance
By 2025 CrewAI has tens of thousands of GitHub stars and is widely adopted in enterprise PoCs because the "crew" metaphor maps cleanly onto how non-engineers think about delegation. Its real engineering contribution is the Task abstraction with explicit expected outputs.
Related terms: Multi-Agent Orchestration, AutoGen, MetaGPT, LangChain
Discussed in:
- Chapter 15: Modern AI, Modern AI