Skip to main content

Docker Compose

The quickest path to a full stack:
docker-compose up -d
This starts:
  • AgentFlow API — Gunicorn + Uvicorn ASGI server
  • PostgreSQL 15 — with PGVector extension
  • Redis — for caching and rate limiting
  • Nginx — reverse proxy
  • Datadog Agent — APM and LLM observability (optional)

Environment

Set production environment variables:
ENVIRONMENT=production
DATABASE_URL=postgresql://user:pass@db:5432/agentflow
OPENAI_API_KEY=sk-...
CORS_ALLOWED_ORIGINS=https://app.yourcompany.com
LOG_LEVEL=WARNING
DD_TRACE_ENABLED=true

Database Migrations

Run Alembic migrations before starting the server:
alembic upgrade head
The migration history spans from 0001_baseline_schema through 0017_add_memory_blocks.

Health Check

curl http://localhost:8000/health
Returns 200 OK with system status including database connectivity and LLM provider availability.

Observability

AgentFlow integrates with Datadog for:
  • APM — distributed tracing across agent, tool, and sub-agent executions
  • LLM Observability — token usage, latency, and cost tracking per model
  • Structured logging — JSON logs with execution context