Python Version Requirements

CrewAI requires Python >=3.10 and <3.13. Here’s how to check your version:

python3 --version

If you need to update Python, visit python.org/downloads

CrewAI uses the uv as its dependency management and package handling tool. It simplifies project setup and execution, offering a seamless experience.

If you haven’t installed uv yet, follow step 1 to quickly get it set up on your system, else you can skip to step 2.

1

Install uv

  • On macOS/Linux:

    Use curl to download the script and execute it with sh:

    curl -LsSf https://astral.sh/uv/install.sh | sh
    

    If your system doesn’t have curl, you can use wget:

    wget -qO- https://astral.sh/uv/install.sh | sh
    
  • On Windows:

    Use irm to download the script and iex to execute it:

    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    

    If you run into any issues, refer to UV’s installation guide for more information.

2

Install CrewAI πŸš€

  • Run the following command to install crewai CLI:

    uv tool install crewai
    

    If you encounter a PATH warning, run this command to update your shell:

    uv tool update-shell
    
  • To verify that crewai is installed, run:

    uv tool list
    
  • You should see something like:

    crewai v0.102.0
    - crewai
    
  • If you need to update crewai, run:

    uv tool install crewai --upgrade
    
Installation successful! You’re ready to create your first crew! πŸŽ‰

Creating a CrewAI Project

We recommend using the YAML template scaffolding for a structured approach to defining agents and tasks. Here’s how to get started:

1

Generate Project Scaffolding

  • Run the crewai CLI command:

    crewai create crew <your_project_name>
    
  • This creates a new project with the following structure:

    my_project/
    β”œβ”€β”€ .gitignore
    β”œβ”€β”€ knowledge/
    β”œβ”€β”€ pyproject.toml
    β”œβ”€β”€ README.md
    β”œβ”€β”€ .env
    └── src/
        └── my_project/
            β”œβ”€β”€ __init__.py
            β”œβ”€β”€ main.py
            β”œβ”€β”€ crew.py
            β”œβ”€β”€ tools/
            β”‚   β”œβ”€β”€ custom_tool.py
            β”‚   └── __init__.py
            └── config/
                β”œβ”€β”€ agents.yaml
                └── tasks.yaml
    
2

Customize Your Project

  • Your project will contain these essential files:

    FilePurpose
    agents.yamlDefine your AI agents and their roles
    tasks.yamlSet up agent tasks and workflows
    .envStore API keys and environment variables
    main.pyProject entry point and execution flow
    crew.pyCrew orchestration and coordination
    tools/Directory for custom agent tools
    knowledge/Directory for knowledge base
  • Start by editing agents.yaml and tasks.yaml to define your crew’s behavior.

  • Keep sensitive information like API keys in .env.

3

Run your Crew

  • Before you run your crew, make sure to run:
    crewai install
    
  • If you need to install additional packages, use:
    uv add <package-name>
    
  • To run your crew, execute the following command in the root of your project:
    crewai run
    

Next Steps