This guide will walk you through the installation process for CrewAI and its dependencies. CrewAI is a flexible and powerful AI framework that enables you to create and manage AI agents, tools, and tasks efficiently. Let’s get started! 🚀

Make sure you have Python >=3.10 <=3.13 installed on your system before you proceed.

1

Install CrewAI

Install the main CrewAI package with the following command:

You can also install the main CrewAI package and the tools package that include a series of helpful tools for your agents:

Alternatively, you can also use:

2

Upgrade CrewAI

To upgrade CrewAI and CrewAI Tools to the latest version, run the following command

  1. If you’re using an older version of CrewAI, you may receive a warning about using Poetry for dependency management.

  2. In this case, you’ll need to run the command below to update your project. This command will migrate your project to use UV and update the necessary files.

    Terminal
    crewai update
    
  3. After running the command above, you should see the following output:

  4. You’re all set! You can now proceed to the next step! 🎉

3

Verify the installation

To verify that crewai and crewai-tools are installed correctly, run the following command

You should see the version number of crewai and crewai-tools.

If you see the version number, then the installation was successful! 🎉

Create a new CrewAI project

The next step is to create a new CrewAI project. We recommend using the YAML Template scaffolding to get started as it provides a structured approach to defining agents and tasks.

1

Create a new CrewAI project using the YAML Template Configuration

To create a new CrewAI project, run the following CLI (Command Line Interface) command:

This command creates a new project folder with the following structure:

File/DirectoryDescription
my_project/Root directory of the project
├── .gitignoreSpecifies files and directories to ignore in Git
├── pyproject.tomlProject configuration and dependencies
├── README.mdProject documentation
├── .envEnvironment variables
└── src/Source code directory
    └── my_project/Main application package
        ├── __init__.pyMarks the directory as a Python package
        ├── main.pyMain application script
        ├── crew.pyCrew-related functionalities
        ├── tools/Custom tools directory
        │ ├── custom_tool.pyCustom tool implementation
        │ └── __init__.pyMarks tools directory as a package
        └── config/Configuration files directory
            ├── agents.yamlAgent configurations
            └── tasks.yamlTask configurations

You can now start developing your crew by editing the files in the src/my_project folder. The main.py file is the entry point of the project, the crew.py file is where you define your crew, the agents.yaml file is where you define your agents, and the tasks.yaml file is where you define your tasks.

2

Customize your project

To customize your project, you can:

  • Modify src/my_project/config/agents.yaml to define your agents.
  • Modify src/my_project/config/tasks.yaml to define your tasks.
  • Modify src/my_project/crew.py to add your own logic, tools, and specific arguments.
  • Modify src/my_project/main.py to add custom inputs for your agents and tasks.
  • Add your environment variables into the .env file.

Next steps

Now that you have installed crewai and crewai-tools, you’re ready to spin up your first crew!

  • 👨‍💻 Build your first agent with CrewAI by following the Quickstart guide.
  • 💬 Join the Community to get help and share your feedback.