Deployment Overview
Options for deploying agents to production
Deploy your PraisonAI agents to production environments.
from praisonaiagents import Agent
agent = Agent(
name="Production Agent",
instructions="Handle production workloads.",
)
agent.start("Ready for production deployment")The user chooses a hosting pattern, configures secrets and scaling, then points clients at the running agent.
Quick Start
- Simple Usage
Start with an agent-centric approach:
python from praisonaiagents import Agent # Create production-ready agent agent = Agent( name="Production Agent", instructions="Handle production workloads", ) # Deploy to production agent.start("Ready for production deployment") - With Configuration
Choose between different deployment options based on your needs.
Deployment Methods
24/7 Production Setup
Start here for always-on deployment with process supervision
Advanced ProductionComprehensive production guide with monitoring and scaling
Deployment Options
| Option | Best For | Complexity | Guide |
|---|---|---|---|
| Production Minimal | Always-on 24/7 operation | Low | 📖 Guide |
| Compose Stack | Local API + Postgres, one command | Low | 📖 Guide |
| Docker Compose | Containerized deployments | Low | 📖 Guide |
| Fly.io | One-command PaaS deploy | Low | 📖 Guide |
| Railway | One-command PaaS deploy | Low | 📖 Guide |
| Render | One-command PaaS deploy | Low | 📖 Guide |
| Kubernetes (Agents API chart) | Scalable production + Postgres | Medium | 📖 Guide |
| Cloud Functions | Serverless | Low | 📖 Guide |
| API Server | REST/WebSocket APIs | Medium | 📖 Guide |
Quick Deploy with CLI
# Deploy as API server
praisonai deploy --type api
# Deploy as Docker container
praisonai deploy --type docker
# Deploy to cloud
praisonai deploy --type cloud --provider aws
# Run the local API + Postgres compose stack
praisonai deploy compose up
# Scaffold and deploy to Fly.io in one line
praisonai deploy create --template fly && praisonai deploy flyAPI Server
from praisonaiagents import Agent
from praisonaiagents.api import serve
agent = Agent(name="API Agent")
# Start API server
serve(agent, host="0.0.0.0", port=8000)Environment Variables
# Required
export OPENAI_API_KEY="sk-..."
# Optional
export PRAISONAI_LOG_LEVEL="INFO"
export PRAISONAI_DB_URL="postgresql://..."