Skip to main content
Deploy agents, teams, and flows as production-ready APIs.

Quick Start

1

Install

pip install praisonai[os]
2

Python Code

from praisonai import AgentOS
from praisonaiagents import Agent

app = AgentOS(agents=[
    Agent(instructions="You are a helpful assistant")
])
app.serve(port=8080)
3

CLI

praisonai app --port 8080

What AgentOS Creates

EndpointMethodPurpose
/GETApp status
/healthGETHealth check
/api/agentsGETList agents
/api/chatPOSTChat with agent
/docsGETAPI documentation

Configuration

from praisonai import AgentOS
from praisonaiagents import Agent

app = AgentOS(agents=[Agent(instructions="Help me")])
app.serve()  # Port 8000

All Configuration Options

OptionTypeDefaultDescription
namestr"PraisonAI App"Application name
hoststr"0.0.0.0"Host address
portint8000Port number
reloadboolFalseAuto-reload (dev mode)
cors_originslist[str]["*"]Allowed CORS origins
api_prefixstr"/api"API route prefix
docs_urlstr"/docs"API docs URL
openapi_urlstr"/openapi.json"OpenAPI schema URL
debugboolFalseDebug mode
log_levelstr"info"Logging level
workersint1Worker processes
timeoutint60Request timeout (seconds)

CLI Commands

CommandDescription
praisonai appStart with defaults
praisonai app --port 9000Custom port
praisonai app --host 127.0.0.1Custom host
praisonai app --config agents.yamlLoad agents from file
praisonai app --reloadDev mode with auto-reload
praisonai app --debugEnable debug logging
praisonai app --name "My API"Custom app name

YAML Config File

agents.yaml
agents:
  - name: Assistant
    instructions: You are a helpful assistant
    llm: gpt-4o-mini
    
  - name: Researcher
    instructions: You research topics thoroughly
    llm: gpt-4o
praisonai app --config agents.yaml --port 8080

Architecture


Deployment Patterns

from praisonai import AgentOS
from praisonaiagents import Agent

app = AgentOS(agents=[
    Agent(name="support", instructions="Customer support agent")
])
app.serve(port=8000)

Chat API Request

curl -X POST http://localhost:8000/api/chat \
  -H "Content-Type: application/json" \
  -d '{"message": "Hello!", "agent_name": "support"}'
Response:
{
  "response": "Hello! How can I help you today?",
  "agent_name": "support",
  "session_id": null
}

Best Practices

Even for single agents, AgentOS provides proper API structure, CORS, health checks, and auto-generated docs.
Use --reload during development. Disable in production for better performance.
Replace ["*"] with specific origins in production: cors_origins=["https://myapp.com"]
Increase workers for production: workers=4 (typically 2-4x CPU cores)