Before deploying to CrewAI AMP, it’s crucial to verify your project is correctly structured.
Both Crews and Flows can be deployed as “automations,” but they have different project structures
and requirements that must be met for successful deployment.
Understanding Automations
In CrewAI AMP, automations is the umbrella term for deployable Agentic AI projects. An automation can be either:- A Crew: A standalone team of AI agents working together on tasks
- A Flow: An orchestrated workflow that can combine multiple crews, direct LLM calls, and procedural logic
Crews vs Flows: Key Differences
Crew Projects
Standalone AI agent teams with
crew.py defining agents and tasks. Best for focused, collaborative tasks.Flow Projects
Orchestrated workflows with embedded crews in a
crews/ folder. Best for complex, multi-stage processes.| Aspect | Crew | Flow |
|---|---|---|
| Project structure | src/project_name/ with crew.py | src/project_name/ with crews/ folder |
| Main logic location | src/project_name/crew.py | src/project_name/main.py (Flow class) |
| Entry point function | run() in main.py | kickoff() in main.py |
| pyproject.toml type | type = "crew" | type = "flow" |
| CLI create command | crewai create crew name | crewai create flow name |
| Config location | src/project_name/config/ | src/project_name/crews/crew_name/config/ |
| Can contain other crews | No | Yes (in crews/ folder) |
Project Structure Reference
Crew Project Structure
When you runcrewai create crew my_crew, you get this structure:
Flow Project Structure
When you runcrewai create flow my_flow, you get this structure:
Both Crews and Flows use the
src/project_name/ structure.
The key difference is that Flows have a crews/ folder for embedded crews,
while Crews have crew.py directly in the project folder.Pre-Deployment Checklist
Use this checklist to verify your project is ready for deployment.1. Verify pyproject.toml Configuration
Yourpyproject.toml must include the correct [tool.crewai] section:
- For Crews
- For Flows
2. Ensure uv.lock File Exists
CrewAI usesuv for dependency management. The uv.lock file ensures reproducible builds and is required for deployment.
uv lock and commit it to your repository:
3. Validate CrewBase Decorator Usage
Every crew class must use the@CrewBase decorator. This applies to:
- Standalone crew projects
- Crews embedded inside Flow projects
4. Check Project Entry Points
Both Crews and Flows have their entry point insrc/project_name/main.py:
- For Crews
- For Flows
The entry point uses a
run() function:5. Prepare Environment Variables
Before deployment, ensure you have:- LLM API keys ready (OpenAI, Anthropic, Google, etc.)
- Tool API keys if using external tools (Serper, etc.)
Quick Validation Commands
Run these commands from your project root to quickly verify your setup:Common Setup Mistakes
| Mistake | Symptom | Fix |
|---|---|---|
Missing uv.lock | Build fails during dependency resolution | Run uv lock and commit |
Wrong type in pyproject.toml | Build succeeds but runtime fails | Change to correct type |
Missing @CrewBase decorator | ”Config not found” errors | Add decorator to all crew classes |
Files at root instead of src/ | Entry point not found | Move to src/project_name/ |
Missing run() or kickoff() | Cannot start automation | Add correct entry function |
Next Steps
Once your project passes all checklist items, you’re ready to deploy:Deploy to AMP
Follow the deployment guide to deploy your Crew or Flow to CrewAI AMP using
the CLI, web interface, or CI/CD integration.
