Deployment Overview

Options for deploying agents to production

Deploy your PraisonAI agents to production environments.

python
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.

Diagram

Input

Agent

Output

Quick Start

  1. 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")
  2. With Configuration

    Choose between different deployment options based on your needs.

Deployment Methods

Deployment Options

OptionBest ForComplexityGuide
Production MinimalAlways-on 24/7 operationLow📖 Guide
Compose StackLocal API + Postgres, one commandLow📖 Guide
Docker ComposeContainerized deploymentsLow📖 Guide
Fly.ioOne-command PaaS deployLow📖 Guide
RailwayOne-command PaaS deployLow📖 Guide
RenderOne-command PaaS deployLow📖 Guide
Kubernetes (Agents API chart)Scalable production + PostgresMedium📖 Guide
Cloud FunctionsServerlessLow📖 Guide
API ServerREST/WebSocket APIsMedium📖 Guide

Quick Deploy with CLI

bash
# 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 fly

API Server

python
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

bash
# Required
export OPENAI_API_KEY="sk-..."

# Optional
export PRAISONAI_LOG_LEVEL="INFO"
export PRAISONAI_DB_URL="postgresql://..."

Related