AI/TLDR

CrewAI

Build teams of role-playing AI agents that divide work and collaborate on a goal

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.

bashbash
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.

bashbash
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.

pythonpython
@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.

bashbash
crewai run
# or:
python src/my_project/main.py

Commands 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.

ToolStarsWhat it does
MetaGPT★ 68.9kA 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.1kMicrosoft Research's framework for building applications where multiple agents converse with each other and with tools to solve tasks.
CrewAI★ 54kBuild teams of role-playing AI agents that divide work and collaborate on a goal
OpenAI Agents SDK★ 27.3kOpenAI's lightweight Python SDK for building multi-agent workflows using explicit handoffs, tools, and guardrails.
AgentScope★ 27kA framework for building multi-agent applications with message passing, visual debugging tools, and distributed execution.
OpenAI Swarm★ 21.7kAn educational, lightweight framework from OpenAI for experimenting with multi-agent coordination through handoffs and routines.
PentAGI★ 17.8kPentAGI 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.2kA research-oriented framework for studying and building communicating agents that cooperate through role-playing conversations.