Overview
CrewAI is a Python framework for building multi-agent systems. You give each agent a role, a goal, and a backstory, then group several of them into a "crew" that splits a job into tasks and works through them together. It is written from scratch and does not depend on LangChain or other agent frameworks.
It is aimed at Python developers who want more than a single LLM call but don't want to wire up agent orchestration by hand. CrewAI offers two main building blocks: Crews, which lean toward agent autonomy and collaboration, and Flows, an event-driven model for more precise, step-by-step control.
As a multi-agent framework, it sits between low-level LLM SDKs and full hosted platforms. You scaffold a project with the CLI, describe agents and tasks in YAML, and run the crew locally or connect it to your own model and tools.
What it does
- Role-based agents defined by a role, goal, and backstory
- Crews that coordinate multiple agents across a set of tasks
- Flows for event-driven, step-by-step orchestration with single LLM calls
- CLI to scaffold a project (crewai create) and run it (crewai run)
- YAML configuration for agents and tasks, kept separate from Python code
- Standalone framework, independent of LangChain or other agent libraries
Getting started
You need Python >=3.10 <3.14. Install the package, scaffold a project with the CLI, then run your crew.
Install CrewAI
Install the core package with uv. Add the optional tools extra if you want the bundled tools.
uv pip install crewai
# with optional tools:
uv pip install 'crewai[tools]'Create a new project
Scaffold a project with agents and tasks. This generates the YAML config files and a crew.py.
crewai create crew <project_name>Define agents and tasks
Agents and tasks are configured in YAML and wired together in crew.py using the CrewBase decorators.
@CrewBase
class ExampleCrew():
@agent
def researcher(self) -> Agent:
return Agent(config=self.agents_config['researcher'])
@task
def research_task(self) -> Task:
return Task(config=self.tasks_config['research_task'])
@crew
def crew(self) -> Crew:
return Crew(agents=self.agents, tasks=self.tasks)Run the crew
Run from your project root with the CLI, or call your main script directly.
crewai run
# or:
python src/my_project/main.pyCommands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Splitting a research-and-write workflow across a researcher agent and a writer agent
- Automating multi-step business processes that need several specialized agents
- Building event-driven pipelines with Flows when you need precise control over each step
- Prototyping multi-agent ideas locally before connecting them to your own models and tools
How CrewAI compares
CrewAI alongside other open-source multi-agent systems tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| MetaGPT | ★ 68.9k | A multi-agent framework that models a software company, assigning roles like product manager, architect, and engineer to generate code from a single prompt. |
| AutoGen | ★ 59.1k | Microsoft Research's framework for building applications where multiple agents converse with each other and with tools to solve tasks. |
| CrewAI | ★ 54k | Build teams of role-playing AI agents that divide work and collaborate on a goal |
| OpenAI Agents SDK | ★ 27.3k | OpenAI's lightweight Python SDK for building multi-agent workflows using explicit handoffs, tools, and guardrails. |
| AgentScope | ★ 27k | A framework for building multi-agent applications with message passing, visual debugging tools, and distributed execution. |
| OpenAI Swarm | ★ 21.7k | An educational, lightweight framework from OpenAI for experimenting with multi-agent coordination through handoffs and routines. |
| PentAGI | ★ 17.8k | PentAGI is a self-hosted AI security platform that plans and runs penetration tests autonomously using a team of agents and 20+ built-in pentesting tools. |
| CAMEL | ★ 17.2k | A research-oriented framework for studying and building communicating agents that cooperate through role-playing conversations. |