Skip to content

Environment Variables

This page is the task-oriented "what must I set to get it running?" view. The full reference with every var is at Reference: Environment Variables.

Absolute minimum

env
# Database URLs — all three are required
DATABASE_URL=postgres://agentcy:agentcy@localhost:5432/agentcy
NEO4J_URI=bolt://localhost:7687
NEO4J_USER=neo4j
NEO4J_PASSWORD=neo4j
REDIS_URL=redis://localhost:6379

# Auth — pick one of the two providers
AUTH_PROVIDER=local
JWT_SECRET=<random 64+ chars>

# LLM — pick one provider at minimum
ANTHROPIC_API_KEY=sk-ant-...
# or
OPENAI_API_KEY=sk-...
# or
GOOGLE_API_KEY=...

With these set, cargo run -p agentcy-api starts an API on port 8080 with a default admin@localhost / admin user.

Common add-ons

env
# Workers (recommended for any non-dev usage)
AGENTCY_FEATURES_WORKERS=true
WORKER_TOKEN=<random 32+ chars>

# Policies
AGENTCY_FEATURES_POLICIES=true

# Voice
AGENTCY_FEATURES_VOICE=true
DEEPGRAM_API_KEY=...
ELEVENLABS_API_KEY=...

# Orchestrator (requires OpenFang sidecar)
AGENTCY_FEATURES_ORCHESTRATOR=true
OPENFANG_URL=http://localhost:8090

Data directories

env
AGENTCY_DATA_DIR=/var/lib/agentcy       # memvid, local artifacts, sandbox state
AGENTCY_ARTIFACT_BACKEND=local          # or s3
AGENTCY_S3_BUCKET=my-bucket             # if backend=s3
AGENTCY_S3_REGION=us-east-1

Ports

ServiceVarDefault
API HTTPPORT8080
Worker metricsWORKER_METRICS_PORT9091
WebSocketWS_PORTsame as API, /ws path

Logging

env
RUST_LOG=agentcy=info,sqlx=warn,tower_http=warn
RUST_LOG_FORMAT=json             # or "pretty" for dev

For Docker Compose

The compose files under docker/ already pass the above through .env. Copy docker/.env.example to .env and edit.

For Railway

Each service's railway.toml in this repo declares which vars to expose. Use railway variables set to set secrets — don't commit them.

Next

Built by AgentcyLabs. For in-house deployment or Agentcy Cloud (PaaS) access, visit agentcylabs.com.