Installation
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.
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:
Upgrade CrewAI
To upgrade CrewAI and CrewAI Tools to the latest version, run the following command
-
If you’re using an older version of CrewAI, you may receive a warning about using
Poetry
for dependency management. -
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 -
After running the command above, you should see the following output:
-
You’re all set! You can now proceed to the next step! 🎉
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.
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/Directory | Description |
---|---|
my_project/ | Root directory of the project |
├── .gitignore | Specifies files and directories to ignore in Git |
├── pyproject.toml | Project configuration and dependencies |
├── README.md | Project documentation |
├── .env | Environment variables |
└── src/ | Source code directory |
└── my_project/ | Main application package |
├── __init__.py | Marks the directory as a Python package |
├── main.py | Main application script |
├── crew.py | Crew-related functionalities |
├── tools/ | Custom tools directory |
│ ├── custom_tool.py | Custom tool implementation |
│ └── __init__.py | Marks tools directory as a package |
└── config/ | Configuration files directory |
├── agents.yaml | Agent configurations |
└── tasks.yaml | Task 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.
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.
Was this page helpful?