Installation
Get started with CrewAI - Install, configure, and build your first AI crew
Python Version Requirements
CrewAI requires Python >=3.10 and <3.13
. Hereβs how to check your 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.
Install uv
-
On macOS/Linux:
Use
curl
to download the script and execute it withsh
:If your system doesnβt have
curl
, you can usewget
: -
On Windows:
Use
irm
to download the script andiex
to execute it:If you run into any issues, refer to UVβs installation guide for more information.
Install CrewAI π
-
Run the following command to install
crewai
CLI:If you encounter a
PATH
warning, run this command to update your shell: -
To verify that
crewai
is installed, run: -
You should see something like:
-
If you need to update
crewai
, run:
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:
Generate Project Scaffolding
-
Run the
crewai
CLI command: -
This creates a new project with the following structure:
Customize Your Project
-
Your project will contain these essential files:
File Purpose agents.yaml
Define your AI agents and their roles tasks.yaml
Set up agent tasks and workflows .env
Store API keys and environment variables main.py
Project entry point and execution flow crew.py
Crew orchestration and coordination tools/
Directory for custom agent tools knowledge/
Directory for knowledge base -
Start by editing
agents.yaml
andtasks.yaml
to define your crewβs behavior. -
Keep sensitive information like API keys in
.env
.
Run your Crew
- Before you run your crew, make sure to run:
- If you need to install additional packages, use:
- To run your crew, execute the following command in the root of your project:
Next Steps
Was this page helpful?