Documentation Index
Fetch the complete documentation index at: https://docs.praison.ai/llms.txt
Use this file to discover all available pages before exploring further.
Docker Deployment
Deploy your agents using Docker containers.
Dockerfile
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
EXPOSE 8000
CMD ["python", "main.py"]
requirements.txt
main.py
from praisonaiagents import Agent
from praisonaiagents.api import serve
agent = Agent(
name="Production Agent",
instructions="You are a helpful assistant."
)
if __name__ == "__main__":
serve(agent, host="0.0.0.0", port=8000)
Build and Run
# Build
docker build -t my-agent .
# Run
docker run -p 8000:8000 \
-e OPENAI_API_KEY=$OPENAI_API_KEY \
my-agent
Docker Compose
version: '3.8'
services:
agent:
build: .
ports:
- "8000:8000"
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY}
- DATABASE_URL=postgresql://postgres:postgres@db:5432/praisonai
depends_on:
- db
db:
image: postgres:15
environment:
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=praisonai
volumes:
- postgres_data:/var/lib/postgresql/data
volumes:
postgres_data:
Run with Compose