Skip to main content
Deploy agents to API servers, Docker containers, or cloud providers using praisonai deploy.

Quick Start

pip install praisonai
export OPENAI_API_KEY="your-key"

# Initialize deploy config
praisonai deploy init --file agents.yaml --type api

# Deploy
praisonai deploy run --file agents.yaml

Subcommands

CommandDescription
praisonai deploy runExecute deployment
praisonai deploy initGenerate sample agents.yaml with deploy config
praisonai deploy validateValidate agents.yaml deploy configuration
praisonai deploy planShow deployment plan without executing
praisonai deploy doctorCheck deployment readiness
praisonai deploy statusShow deployment status
praisonai deploy destroyDestroy/delete deployment

Deploy Types

TypeDescriptionPage
apiLocal API serverAPI Deploy
dockerDocker containerDocker Deploy
cloudCloud providers (AWS, Azure, GCP)AWS, Azure, GCP

praisonai deploy run

praisonai deploy run [OPTIONS]
FlagTypeDefaultDescription
--file, -fstringagents.yamlPath to agents.yaml
--typechoicefrom YAMLapi, docker, or cloud
--providerchoicefrom YAMLaws, azure, or gcp (for cloud type)
--backgroundflagfalseRun in background (API only)
--jsonflagfalseOutput as JSON

praisonai deploy init

Generate sample agents.yaml with deploy configuration.
praisonai deploy init --file agents.yaml --type api
praisonai deploy init --file agents.yaml --type docker
praisonai deploy init --file agents.yaml --type cloud --provider aws
FlagTypeDefaultDescription
--file, -fstringagents.yamlOutput file path
--typechoiceapiapi, docker, or cloud
--providerchoice-aws, azure, or gcp (for cloud type)

praisonai deploy validate

Validate agents.yaml deploy configuration.
praisonai deploy validate --file agents.yaml
Expected Output:
🔍 Validating agents.yaml...

✅ Configuration is valid!

Deploy Type: api
  Host: 127.0.0.1
  Port: 8005
  Workers: 1

praisonai deploy plan

Show deployment plan without executing.
praisonai deploy plan --file agents.yaml
Expected Output:
📋 Generating deployment plan...

╭──────────────────────────────────────────────────────────────────────────────╮
│                              Deployment Plan                                  │
│                                                                              │
│ type: api                                                                    │
│ host: 127.0.0.1                                                              │
│ port: 8005                                                                   │
│                                                                              │
│ Steps:                                                                       │
│   1. Load agents from agents.yaml                                            │
│   2. Start API server on 127.0.0.1:8005                                      │
│   3. Register agent endpoints                                                │
╰──────────────────────────────────────────────────────────────────────────────╯

To execute this plan, run:
  praisonai deploy run --file agents.yaml

agents.yaml Deploy Section

Add a deploy section to your agents.yaml:
framework: praisonai
topic: helpful assistant
roles:
  assistant:
    role: Assistant
    goal: Help users
    backstory: You are helpful
    tasks:
      help_task:
        description: Answer questions
        expected_output: Helpful response

deploy:
  type: api
  api:
    host: "127.0.0.1"
    port: 8005
    workers: 1

Deploy Configuration Options

API Config

deploy:
  type: api
  api:
    host: "127.0.0.1"
    port: 8005
    workers: 1
    cors_enabled: true
    auth_enabled: false
    reload: false

Docker Config

deploy:
  type: docker
  docker:
    image_name: "praisonai-app"
    tag: "latest"
    base_image: "python:3.11-slim"
    expose: [8005]
    push: false

Cloud Config (AWS)

deploy:
  type: cloud
  cloud:
    provider: aws
    region: "us-east-1"
    service_name: "praisonai-service"
    cpu: "256"
    memory: "512"
    min_instances: 1
    max_instances: 10

Troubleshooting

IssueFix
No deploy sectionRun praisonai deploy init
Invalid configRun praisonai deploy validate
Missing depsRun praisonai deploy doctor
Deploy failedCheck praisonai deploy status