Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Deploy agents with Docker
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"]
praisonaiagents>=0.1.0
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 docker build -t my-agent . # Run docker run -p 8000:8000 \ -e OPENAI_API_KEY=$OPENAI_API_KEY \ my-agent
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:
docker-compose up -d