Security advisory — Malicious litellm versions 1.82.7 and 1.82.8 were removed from PyPI (potential API key exfiltration). Uninstall them, rotate exposed credentials, and upgrade to a safe release (e.g. 1.82.9+ per upstream). Run pip show litellm to verify. PyPI · README

Deployment

Deploy AgenticX in production.

Deployment

Overview

AgenticX can be deployed as:

  • A standalone API server
  • A Docker container
  • A Docker Compose stack (with databases and vector stores)

API Server

bash
1# Start the Studio API server
2agx serve --port 8000 --host 0.0.0.0
3
4# Or with uvicorn directly
5uvicorn agenticx.server:app --host 0.0.0.0 --port 8000 --workers 4

Docker

dockerfile
1FROM python:3.11-slim
2
3WORKDIR /app
4COPY requirements.txt .
5RUN pip install -r requirements.txt
6
7COPY . .
8
9ENV OPENAI_API_KEY=""
10EXPOSE 8000
11
12CMD ["agx", "serve", "--port", "8000", "--host", "0.0.0.0"]
bash
1docker build -t agenticx-app .
2docker run -p 8000:8000 -e OPENAI_API_KEY=sk-... agenticx-app

Docker Compose

The repo ships with ready-to-use Compose files:

bash
1# Minimal setup (app + SQLite)
2docker compose -f deploy/docker-compose.minimal.yml up
3
4# Core setup (app + PostgreSQL + Redis)
5docker compose -f deploy/docker-compose.core.yml up
6
7# Full stack (+ Neo4j + vector stores)
8docker compose -f deploy/docker-compose.yml up

Environment Variables

bash
1cp deploy/env.example .env
2# Edit .env with your values
VariableDescription
OPENAI_API_KEYOpenAI API key
DATABASE_URLPostgreSQL connection string
REDIS_URLRedis connection string
NEO4J_URINeo4j connection URI
AGX_MAX_TOOL_ROUNDSMax tool rounds per turn
AGX_SECRET_KEYSession signing key

Nginx Reverse Proxy

nginx
1server {
2 listen 80;
3 server_name api.yourdomain.com;
4
5 location / {
6 proxy_pass http://localhost:8000;
7 proxy_http_version 1.1;
8 proxy_set_header Upgrade $http_upgrade;
9 proxy_set_header Connection "upgrade";
10 proxy_set_header Host $host;
11 proxy_set_header X-Real-IP $remote_addr;
12 }
13}

Health Check

bash
1curl http://localhost:8000/health
2# {"status": "ok", "version": "0.x.x"}

Scaling

For high-throughput deployments:

  1. Run multiple workers: uvicorn agenticx.server:app --workers 8
  2. Use Redis for session storage (instead of SQLite)
  3. Use PostgreSQL for persistent data
  4. Deploy behind a load balancer
  5. Use Kubernetes for orchestration