How to build a crew for CrewAI Enterprise
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.
# 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
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 agentssrc/your_project_name/config/tasks.yaml
to define your taskssrc/your_project_name/tools/custom_tool.py
example of a custom toolsrc/your_project_name/crew.py
to add your own logic, tools and specific argssrc/your_project_name/main.py
runs your crew locally.src/your_project_name/.env
holds your environment variables4. 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
pip install poetry
poetry install
6. Running your crew locally
crewai run
OR
poetry run your_project_name
7. Deploy your crew to crewAI Enterprise
For learning more about deploying to crewAI Enterprise check our help center article about it.
Welcome to the future of team building with CrewAI Enterprise