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. New crews are JSON-first with
crew.jsonc and agents/; classic crews can still use crew.py.Flow Projects
Orchestrated workflows with embedded crews in a
crews/ folder. Best for complex, multi-stage processes.| Aspect | Crew | Flow |
|---|---|---|
| Project structure | Project root with crew.jsonc and agents/ | src/project_name/ with crews/ folder |
| Main logic location | crew.jsonc (classic: src/project_name/crew.py) | src/project_name/main.py (Flow class) |
| Entry point function | Loaded from crew.jsonc (classic: 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 | crew.jsonc, agents/, optional tools/ | src/project_name/crews/crew_name/config/ or embedded JSON crew folders |
| Can contain other crews | No | Yes (in crews/ folder) |
Project Structure Reference
Crew Project Structure
When you runcrewai create crew my_crew, you get the JSON-first structure:
Classic projects created with
crewai create crew my_crew --classic use the older
src/project_name/crew.py, src/project_name/config/agents.yaml, and
src/project_name/config/tasks.yaml layout. That layout remains supported for
decorator-based Python crews.Flow Project Structure
When you runcrewai create flow my_flow, you get this structure:
JSON-first standalone crews use project-root JSON files. Flows still use
src/project_name/ and can contain either classic embedded crews or embedded
JSON crew folders loaded with crewai.project.load_crew.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 the Crew Definition
- JSON-first Crews
- Classic Python/YAML Crews
JSON-first crews must have a Custom tools are referenced as
crew.jsonc or crew.json file at the project root.
The agents array must reference files in agents/, and each task should reference
a valid agent name.crew.jsonc
"custom:<name>" and must be implemented in
tools/<name>.py with a BaseTool subclass.4. Check Project Entry Points
JSON-first standalone crews do not need a hand-writtensrc/project_name/main.py; crewai run
and deployment packaging load crew.jsonc directly. Classic crews and Flows use Python entry
points:
- JSON-first Crews
- Classic Crews
- For Flows
Run locally from the project root:
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.)
If your project depends on packages from a private PyPI registry, you’ll also need to configure
registry authentication credentials as environment variables. See the
Private Package Registries guide for details.
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 crew.jsonc or agents/ in a JSON-first crew | Crew definition not found | Keep crew.jsonc and agents/ at the project root |
Missing @CrewBase decorator in a classic crew | ”Config not found” errors | Add decorator to all classic crew classes |
Classic files at root instead of src/ | Entry point not found | Move classic Python files 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.
