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 server2agx serve --port 8000 --host 0.0.0.034# Or with uvicorn directly5uvicorn agenticx.server:app --host 0.0.0.0 --port 8000 --workers 4
Docker
dockerfile
1FROM python:3.11-slim23WORKDIR /app4COPY requirements.txt .5RUN pip install -r requirements.txt67COPY . .89ENV OPENAI_API_KEY=""10EXPOSE 80001112CMD ["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 up34# Core setup (app + PostgreSQL + Redis)5docker compose -f deploy/docker-compose.core.yml up67# Full stack (+ Neo4j + vector stores)8docker compose -f deploy/docker-compose.yml up
Environment Variables
bash
1cp deploy/env.example .env2# Edit .env with your values
| Variable | Description |
|---|---|
OPENAI_API_KEY | OpenAI API key |
DATABASE_URL | PostgreSQL connection string |
REDIS_URL | Redis connection string |
NEO4J_URI | Neo4j connection URI |
AGX_MAX_TOOL_ROUNDS | Max tool rounds per turn |
AGX_SECRET_KEY | Session signing key |
Nginx Reverse Proxy
nginx
1server {2 listen 80;3 server_name api.yourdomain.com;45 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/health2# {"status": "ok", "version": "0.x.x"}
Scaling
For high-throughput deployments:
- Run multiple workers:
uvicorn agenticx.server:app --workers 8 - Use Redis for session storage (instead of SQLite)
- Use PostgreSQL for persistent data
- Deploy behind a load balancer
- Use Kubernetes for orchestration