Skip to content
English
  • There are no suggestions because the search field is empty.

How to build a crew for crewAI+

Building crews with "crewai create name" CLI

Disclaimer: User crewAI version 0.30.11 or newer

1. Installation and Setup

Ensure that you have the latest version of crewAI installed.
If you're new to crewAI+, visit our official docs to download the software and find comprehensive installation instructions.

To install crewAI, you need to have Python >=3.10 and <=3.13 installed on your system:
Make sure you are using crewAI version 0.30.11 or newer!
# Install the mains crewAI package
pip install crewai


# Install the main crewAI package and the tools package
# that includes a series of helpful tools for your agents
pip install 'crewai[tools]'

2. Creating a New Project

To create a new project, open your terminal and execute the following command:

crewai create crew your_project_name

This command initializes a new project and automatically generates the necessary files for your crew, laying the groundwork for your AI-driven team-building process.

3. Understand your project files

You can now go into your project folder:
cd your_project_name

Within this folder you will find your initial crew project structure, these are the main files:

.
├── README.md
├── poetry.lock
├── pyproject.toml
├── .env
├── .gitignore
├── trained_agents_data.pkl (created after you run training mode)
├── training_data.pkl       (created after you run training mode)
├── src
│   └── your_project_name
│       ├── __init__.py
│       ├── config
│       │   ├── agents.yaml
│       │   └── tasks.yaml
│       ├── crew.py
│       ├── main.py
│       └── tools
│           ├── __init__.py
│           └── custom_tool.py
└── tests

Main files

- src/your_project_name/config/agents.yaml to define your agents
- src/your_project_name/config/tasks.yaml to define your tasks
- src/your_project_name/tools/custom_tool.py example of a custom tool
- src/your_project_name/crew.py to add your own logic, tools and specific args
- src/your_project_name/main.py runs your crew locally.
- src/your_project_name/.env holds your environment variables
 

4. Environment Variables

You will probably need environment variables to connect to your LLM provider or other tools, locally you can set them by using the src/your_project_name/.env file.

5. Installing Dependencies

First, if you haven't already, install Poetry:
pip install poetry
Next, install the dependencies (in your project directory):
poetry install

6. Running your crew locally

To kickstart your crew of AI agents and begin task execution, run this from the root folder of your project:
crewai run

OR

poetry run your_project_name
 

7. Deploy your crew to crewAI+

For learning more about deploying to crewAI+ check our help center article about it.

For further assistance or queries, feel free to contact our support team (support@crewai.com).


Welcome to the future of team building with CrewAI+!