Why deploy CrewAI to production?
Running CrewAI locally works for development, but production workloads need more. Your crew needs to be accessible via API, handle concurrent requests, manage secrets securely, and stay available 24/7.
Self-hosting means setting up Docker, managing infrastructure, building an API layer, and handling scaling yourself. Crewship handles all of this with a single command — you keep writing Python, we handle the infrastructure.
Prerequisites
- Python 3.10+ installed on your machine
- A CrewAI project — either a crew or a flow
- A Crewship account — sign up free
Deploy in 6 steps
From zero to a live production API. Each step builds on the previous one.
Install the CLI
One-line install on macOS and Linux.
curl -fsSL https://www.crewship.dev/install.sh | bashConfigure crewship.toml
Add a configuration file to your project root. This tells Crewship your framework, entrypoint, Python version, and build profile.
[deployment]
framework = "crewai"
entrypoint = "example_crew.crew:ExampleCrew"
profile = "slim"
python = "3.10"
[build]
exclude = [ "tests" ]Set environment variables
Add API keys your agents need. Secrets are encrypted and injected at runtime.
crewship env set OPENAI_API_KEY sk-...
crewship env set SERPER_API_KEY ...Deploy
A single command packages your code, builds the image, and deploys it.
$ crewship deploy
📦 Packaging crew...
⬆️ Uploading build context...
🔨 Building image...
✅ Deployed successfully!
Deployment: dep_abc123xyz
Version: 1
Console: console.crewship.dev/deployments/dep_abc123xyzRun via API
Trigger a stateless execution with a POST request.
curl -X POST https://api.crewship.dev/v1/runs \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deployment_id": "dep_abc123",
"input": { "topic": "AI agents in 2025" }
}'Stream execution with SSE
Add stream=true to watch agent output in real-time via Server-Sent Events.
curl -N -X POST https://api.crewship.dev/v1/runs?stream=true \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"deployment_id": "dep_abc123",
"input": { "topic": "AI agents in 2025" }
}'
# SSE events:
# data: {"type":"agent_action","agent":"researcher","content":"Searching..."}
# data: {"type":"task_output","task":"research_task","content":"..."}
# data: {"type":"run_complete","output":"Final report..."}Production features included
Every Crewship deployment comes with tools to monitor, debug, and extend your crews in production.
Execution Traces
See every agent action, tool call, and LLM interaction in a timeline view.
Versioning
Track every deployment version. Roll back instantly if something breaks.
Threads
Multi-turn conversations with persistent state across messages.
Webhooks
Get notified when runs complete, fail, or hit milestones.
Artifacts
Collect files generated by your crew — reports, data, images.
Advanced configuration
Customize your deployment with these crewship.toml options.
Build profiles
Choose "slim" for lightweight crews or "browser" for agents that need Playwright and Chromium to scrape websites.
profile = "browser"Python versions
Specify Python 3.10, 3.11, or 3.12 depending on your dependencies.
python = "3.12"Flow entrypoints
Deploy CrewAI Flows by pointing to your Flow class instead of a Crew class.
entrypoint = "my_project.flows.chat_flow:ChatFlow"Build exclusions
Keep your build lean by excluding test files, data, and other non-essential directories.
exclude = [ "tests", "data", "notebooks" ]FAQ
Deployment questions
Ready to deploy your crew?
Get started for free. No credit card required.