Installation
Based on the official Installation guide (treat that page as source of truth). CrewAI uses uv for the CLI and project deps; the library also installs with pip install crewai.
Requirements
- Python
>=3.10and<3.14 uv(official) or pip- At least one LLM provider API key
Coding-agent skills (optional)
In Cursor, Claude Code, Codex, and similar:
If npx is missing, skip this and use docs.crewai.com plus llms.txt.
Official path: uv and the CLI
macOS / Linux:
Windows:
Install the global CLI:
Upgrade the CLI with uv tool install crewai --upgrade. That upgrades the global tool only; project venv upgrades are documented under “Upgrading CrewAI in a project”.
Windows chroma-hnswlib / missing float.h: install Visual Studio Build Tools with Desktop development with C++.
Alternative: pip
In a uv project: uv add crewai or uv add 'crewai[tools]'. Some providers have extras such as uv add "crewai[openai]". Other LiteLLM-backed providers: uv add 'crewai[litellm]' — see LLMs.
API keys
Never hardcode secrets. Use .env (gitignored).
Model IDs are provider/model-id (e.g. openai/gpt-4o-mini, anthropic/claude-sonnet-4-6). Or from crewai import LLM → LLM(model="openai/gpt-4o-mini").
Create a project
JSON-first Crew (current default):
Agents live in agents/*.jsonc; tasks, process, and default inputs live in crew.jsonc. {placeholder} values are filled from inputs or CLI prompts.
Classic Python / YAML (crew.py + config/agents.yaml):
Flow project (the official Quickstart’s production entry):
Add packages with uv add <package-name>. CrewAI internal packages may set exclude-newer; your direct dependencies are unaffected.
Enterprise (awareness)
- CrewAI AMP (SaaS) — hosted console, including no-code crews
- CrewAI Factory — self-hosted containers
This tutorial stays on the local SDK / CLI.
Troubleshooting
crewai not found? uv tool update-shell and open a new terminal.
Python 3.14? Official requirement is currently <3.14; use 3.12 or 3.13.
Scripts only, no scaffold? pip install crewai then from crewai import Agent, Task, Crew — see Quick Start.