# CrewAI

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

- Category: Agents & Automation / Multi-Agent Systems
- Language: Python
- Licence: MIT
- Repository: https://github.com/crewAIInc/crewAI
- Website: https://crewai.com
- Canonical page: https://ai-tldr.dev/tools/crewai/

## In short

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 sits in the Multi-Agent Systems category of the Agents & Automation tools and is open-source, written in Python and licensed MIT.

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

1. Install CrewAI

   Install the core package with uv. Add the optional tools extra if you want the bundled tools.

```bash
uv pip install crewai
# with optional tools:
uv pip install 'crewai[tools]'
```

2. Create a new project

   Scaffold a project with agents and tasks. This generates the YAML config files and a crew.py.

```bash
crewai create crew <project_name>
```

3. Define agents and tasks

   Agents and tasks are configured in YAML and wired together in crew.py using the CrewBase decorators.

```python
@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)
```

4. Run the crew

   Run from your project root with the CLI, or call your main script directly.

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

## 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
