Skip to main content

SDK Environment Variables

VariableDefaultDescription
AGENT_CONTROL_URLhttp://localhost:8000Server URL
AGENT_CONTROL_API_KEYAPI key for authentication
DB_URLpostgresql+psycopg://agent_control:agent_control@localhost:5432/agent_controlDatabase connection string (SQLite: sqlite+aiosqlite:///./agent_control.db)

Server Environment Variables

Core Settings

VariableDefaultDescription
HOST0.0.0.0Server bind address
PORT8000Server port
DEBUGfalseEnable debug mode
API_VERSIONv1API version prefix
API_PREFIX/apiAPI path prefix

CORS

VariableDefaultDescription
CORS_ORIGINS*Allowed origins (comma-separated)
ALLOW_METHODS*Allowed HTTP methods
ALLOW_HEADERS*Allowed headers

Database

VariableDefaultDescription
DATABASE_URLDatabase URL for Docker deployments
DB_HOSTlocalhostPostgreSQL host
DB_PORT5432PostgreSQL port
DB_USERagent_controlDatabase user
DB_PASSWORDagent_controlDatabase password
DB_DATABASEagent_controlDatabase name
DB_DRIVERpsycopgDatabase driver
DB_URLDatabase URL (legacy; overrides individual settings above)

Observability

VariableDefaultDescription
OBSERVABILITY_ENABLEDtrueEnable observability pipeline
OBSERVABILITY_FLUSH_INTERVAL_SECONDS10Flush interval for observability events

Evaluators

VariableDefaultDescription
GALILEO_API_KEYAPI key for Luna-2 evaluator
PROMETHEUS_METRICS_PREFIXagent_control_serverMetrics prefix for Prometheus exports

Authentication

Agent Control supports API key authentication for production deployments.

Configuration

VariableDefaultDescription
AGENT_CONTROL_API_KEY_ENABLEDfalseMaster toggle for authentication
AGENT_CONTROL_API_KEYSComma-separated list of valid API keys
AGENT_CONTROL_ADMIN_API_KEYSComma-separated list of admin API keys

Usage

Include the API key in the X-API-Key header:
curl -H "X-API-Key: your-api-key" http://localhost:8000/api/v1/agents
With the Python SDK:
from agent_control import AgentControlClient

# Via constructor

async with AgentControlClient(api_key="your-api-key") as client:
    await client.health_check()

# Or via environment variable

# export AGENT_CONTROL_API_KEY="your-api-key"

async with AgentControlClient() as client:
    await client.health_check()

Access Levels

EndpointRequired Level
/healthPublic (no auth)
All /api/v1/*API key required

Key Rotation

Agent Control supports multiple API keys for zero-downtime rotation:
  1. Add new key to AGENT_CONTROL_API_KEYS (e.g., key1,key2,new-key)
  2. Deploy the server
  3. Update clients to use the new key
  4. Remove the old key from the variable
  5. Redeploy

UI Environment Variables

VariableDefaultDescription
NEXT_PUBLIC_API_URLhttp://localhost:8000Backend API URL

Database Setup

Agent Control uses PostgreSQL. The easiest way to run it locally:
cd server
docker compose up -d          # Start PostgreSQL
make alembic-upgrade          # Run migrations
Default credentials in docker-compose:
  • User: agent_control
  • Password: agent_control
  • Database: agent_control
  • Port: 5432