Aragora Configuration Reference
Complete reference for all configuration options. For quick setup, see .env.example.
Quick Start
cp .env.example .env
echo "ANTHROPIC_API_KEY=sk-ant-..." >> .env
python -m aragora.server.unified_server
Production Checklist
Before deploying to production, ensure:
Verify configuration:
python -m aragora.cli doctor
1. AI Providers
Primary LLM APIs
At least one required for debates to function.
| Variable | Required | Description |
|---|
ANTHROPIC_API_KEY | Yes* | Anthropic Claude API key |
OPENAI_API_KEY | Yes* | OpenAI GPT API key |
GEMINI_API_KEY | Yes* | Google Gemini API key |
XAI_API_KEY | Yes* | xAI Grok API key |
MISTRAL_API_KEY | Yes* | Mistral AI API key |
OPENROUTER_API_KEY | Yes* | OpenRouter multi-model API (fallback) |
DEEPSEEK_API_KEY | No | DeepSeek direct API |
*At least one required
Local Models
| Variable | Default | Description |
|---|
OLLAMA_HOST | http://localhost:11434 | Ollama server URL |
LM_STUDIO_HOST | http://localhost:1234 | LM Studio server URL |
Embeddings & Vector Search
| Variable | Default | Description |
|---|
EMBEDDING_MODEL | text-embedding-3-small | Embedding model |
EMBEDDING_DIMENSIONS | 1536 | Vector dimensions |
VECTOR_BACKEND | memory | Vector store backend |
WEAVIATE_URL | http://localhost:8080 | Weaviate cluster URL |
WEAVIATE_API_KEY | - | Weaviate Cloud API key |
ARAGORA_WEAVIATE_ENABLED | false | Enable Weaviate |
2. Server Configuration
| Variable | Default | Description |
|---|
ARAGORA_PORT | 8080 | HTTP/WebSocket server port |
ARAGORA_BIND_HOST | 127.0.0.1 | Server bind address |
ARAGORA_ENVIRONMENT | development | Environment mode |
ARAGORA_DATA_DIR | .nomic | Data directory for databases |
ARAGORA_INSTANCE_COUNT | 1 | Number of server instances |
3. Database & Persistence
Database Backend
| Variable | Default | Description |
|---|
ARAGORA_DB_BACKEND | sqlite | Backend: sqlite or postgres |
DATABASE_URL | - | PostgreSQL connection string |
ARAGORA_POSTGRES_DSN | - | Legacy alias for DATABASE_URL |
ARAGORA_DATABASE_URL | - | Legacy alias for DATABASE_URL |
ARAGORA_SQLITE_PATH | aragora.db | SQLite file path |
ARAGORA_POLICY_STORE_BACKEND | auto | Policy store backend: sqlite or postgres (defaults to ARAGORA_DB_BACKEND) |
ARAGORA_AUDIT_STORE_BACKEND | auto | Audit log backend: sqlite or postgres (defaults to ARAGORA_DB_BACKEND) |
ARAGORA_INBOX_STORE_BACKEND | auto | Unified inbox backend: memory, sqlite, postgres (defaults to ARAGORA_DB_BACKEND) |
ARAGORA_REQUIRE_DISTRIBUTED | auto | Enforce distributed stores in production (fail closed on SQLite/file) |
ARAGORA_STORAGE_MODE | auto | Force storage mode: postgres, redis, sqlite, file |
ARAGORA_EXPLAINABILITY_STORE_BACKEND | auto | Explainability batch store backend: redis, postgres, sqlite, memory |
ARAGORA_EXPLAINABILITY_BATCH_TTL_SECONDS | 3600 | Explainability batch retention (seconds) |
ARAGORA_EXPLAINABILITY_DB | - | SQLite path override for explainability batch jobs |
ARAGORA_CONTROL_PLANE_POLICY_SOURCE | auto | Control plane policy source: compliance, inprocess |
Production recommendation: keep explainability batch jobs in Redis with TTL.
Set ARAGORA_EXPLAINABILITY_STORE_BACKEND=postgres only for long-term retention.
PostgreSQL Connection String Examples:
DATABASE_URL=postgresql://postgres.[ref]:[pass]@aws-0-us-west-1.pooler.supabase.com:6543/postgres
DATABASE_URL=postgresql://admin:[email protected]:5432/aragora
DATABASE_URL=postgresql://user:pass@localhost:5432/aragora
Distributed Store Enforcement:
- In production,
ARAGORA_REQUIRE_DISTRIBUTED=true will fail closed if a store falls back to SQLite or local files.
- Set
ARAGORA_STORAGE_MODE to pin a backend across stores when validating production readiness.
ARAGORA_REQUIRE_DISTRIBUTED_STATE is a legacy alias honored when ARAGORA_REQUIRE_DISTRIBUTED is unset.
Connection Pooling (PostgreSQL)
| Variable | Default | Description |
|---|
ARAGORA_DB_POOL_SIZE | 20 | Connection pool size |
ARAGORA_DB_POOL_MAX_OVERFLOW | 15 | Max overflow connections |
ARAGORA_DB_POOL_TIMEOUT | 30.0 | Acquisition timeout (seconds) |
Supabase
| Variable | Default | Description |
|---|
SUPABASE_URL | - | Supabase project URL |
SUPABASE_KEY | - | Supabase API key |
SUPABASE_SYNC_ENABLED | false | Enable background sync |
4. Redis (Caching & Sessions)
Required for multi-instance deployments and distributed rate limiting.
Basic Configuration
| Variable | Default | Description |
|---|
REDIS_URL | - | Redis connection URL |
ARAGORA_REDIS_URL | - | Alternative Redis URL |
ARAGORA_REDIS_HOST | localhost | Redis hostname |
ARAGORA_REDIS_PORT | 6379 | Redis port |
ARAGORA_REDIS_PASSWORD | - | Redis password |
ARAGORA_REDIS_DB | 0 | Redis database number |
ARAGORA_REDIS_MAX_CONNECTIONS | 50 | Max connections |
ARAGORA_REDIS_SOCKET_TIMEOUT | 5.0 | Socket timeout (seconds) |
ARAGORA_REDIS_SOCKET_CONNECT_TIMEOUT | 5.0 | Connection timeout (seconds) |
Redis High-Availability Modes
Aragora supports three Redis deployment modes for different scale and availability requirements:
| Variable | Default | Description |
|---|
ARAGORA_REDIS_MODE | standalone | Mode: standalone, sentinel, or cluster |
Mode auto-detection: If ARAGORA_REDIS_MODE is not set, the mode is auto-detected based on configuration:
- If
ARAGORA_REDIS_SENTINEL_HOSTS is set -> Sentinel mode
- If
ARAGORA_REDIS_CLUSTER_NODES is set -> Cluster mode
- Otherwise -> Standalone mode
Redis Sentinel (HA Failover)
Redis Sentinel provides automatic master/replica failover. Recommended for production deployments requiring high availability without data sharding.
| Variable | Default | Description |
|---|
ARAGORA_REDIS_SENTINEL_HOSTS | - | Comma-separated sentinel hosts (e.g., sentinel1:26379,sentinel2:26379) |
ARAGORA_REDIS_SENTINEL_MASTER | mymaster | Sentinel master name |
ARAGORA_REDIS_SENTINEL_PASSWORD | - | Sentinel authentication password |
ARAGORA_REDIS_SENTINEL_SOCKET_TIMEOUT | 5.0 | Sentinel socket timeout |
Example Sentinel setup:
ARAGORA_REDIS_MODE=sentinel
ARAGORA_REDIS_SENTINEL_HOSTS=sentinel1.example.com:26379,sentinel2.example.com:26379,sentinel3.example.com:26379
ARAGORA_REDIS_SENTINEL_MASTER=mymaster
ARAGORA_REDIS_SENTINEL_PASSWORD=sentinel-secret
ARAGORA_REDIS_PASSWORD=redis-secret
Redis Cluster (Horizontal Scaling)
Redis Cluster provides data sharding across multiple nodes. Recommended for enterprise deployments requiring both high availability and horizontal scaling.
| Variable | Default | Description |
|---|
ARAGORA_REDIS_CLUSTER_NODES | - | Comma-separated cluster nodes (e.g., node1:6379,node2:6379) |
ARAGORA_REDIS_CLUSTER_MODE | auto | Cluster mode detection |
ARAGORA_REDIS_CLUSTER_READ_FROM_REPLICAS | true | Enable read from replicas for scaling |
ARAGORA_REDIS_CLUSTER_SKIP_FULL_COVERAGE | false | Skip slot coverage check |
Example Cluster setup:
ARAGORA_REDIS_MODE=cluster
ARAGORA_REDIS_CLUSTER_NODES=redis1.example.com:6379,redis2.example.com:6379,redis3.example.com:6379
ARAGORA_REDIS_CLUSTER_READ_FROM_REPLICAS=true
ARAGORA_REDIS_PASSWORD=cluster-secret
SSL/TLS Configuration
| Variable | Default | Description |
|---|
ARAGORA_REDIS_SSL | false | Enable SSL/TLS connections |
ARAGORA_REDIS_SSL_CERT_REQS | - | SSL certificate requirements |
ARAGORA_REDIS_SSL_CA_CERTS | - | Path to CA certificates |
Distributed State (Horizontal Scaling)
For multi-instance deployments where debate state needs to be shared across servers.
| Variable | Default | Description |
|---|
ARAGORA_STATE_BACKEND | memory | Backend: memory (single instance) or redis (multi-instance) |
ARAGORA_REDIS_URL | redis://localhost:6379 | Redis URL for state storage |
ARAGORA_INSTANCE_ID | instance-\{pid\} | Unique instance identifier for event deduplication |
When to use Redis HA:
| Deployment | Recommended Mode | Use Case |
|---|
| Development/Test | Standalone | Single instance, local development |
| Production (small) | Standalone | Single server, moderate load |
| Production (HA) | Sentinel | Multi-server, automatic failover |
| Enterprise | Cluster | High scale, data sharding, global distribution |
Example multi-instance setup with Sentinel:
ARAGORA_STATE_BACKEND=redis
ARAGORA_REDIS_MODE=sentinel
ARAGORA_REDIS_SENTINEL_HOSTS=sentinel1:26379,sentinel2:26379,sentinel3:26379
ARAGORA_REDIS_SENTINEL_MASTER=mymaster
ARAGORA_INSTANCE_ID=server-1
ARAGORA_PORT=8081
ARAGORA_STATE_BACKEND=redis
ARAGORA_REDIS_MODE=sentinel
ARAGORA_REDIS_SENTINEL_HOSTS=sentinel1:26379,sentinel2:26379,sentinel3:26379
ARAGORA_REDIS_SENTINEL_MASTER=mymaster
ARAGORA_INSTANCE_ID=server-2
ARAGORA_PORT=8082
Health Check:
from aragora.storage.redis_ha import check_redis_health
health = check_redis_health()
print(f"Healthy: {health['healthy']}, Mode: {health['mode']}")
5. Authentication & Security
JWT Configuration
| Variable | Default | Description |
|---|
JWT_SECRET | - | Required in production (min 32 chars) |
ARAGORA_JWT_EXPIRY_HOURS | 24 | Token expiry |
ARAGORA_REFRESH_TOKEN_EXPIRY_DAYS | 30 | Refresh token expiry |
API Authentication
| Variable | Default | Description |
|---|
ARAGORA_API_TOKEN | - | Simple token auth (dev) |
ARAGORA_AUTH_REQUIRED | false | Require auth for WebSocket |
Content Security Policy
| Variable | Default | Description |
|---|
ARAGORA_ENABLE_CSP | true | Enable CSP header |
ARAGORA_CSP_MODE | standard | Mode: api, standard, development |
ARAGORA_CSP_REPORT_ONLY | true | Report-only mode |
CORS
| Variable | Default | Description |
|---|
ARAGORA_ALLOWED_ORIGINS | - | Comma-separated allowed origins |
ARAGORA_TRUSTED_PROXIES | 127.0.0.1,::1,localhost | Trusted proxy IPs |
6. Rate Limiting
| Variable | Default | Description |
|---|
ARAGORA_RATE_LIMIT | 60 | Requests per minute |
ARAGORA_IP_RATE_LIMIT | 120 | Per-IP rate limit |
ARAGORA_BURST_MULTIPLIER | 2.0 | Burst multiplier |
ARAGORA_RATE_LIMIT_FAIL_OPEN | false | Allow if Redis down |
WebSocket Rate Limiting
| Variable | Default | Description |
|---|
ARAGORA_WS_CONN_RATE | 30 | Connections per minute |
ARAGORA_WS_MAX_PER_IP | 10 | Max connections per IP |
ARAGORA_WS_MSG_RATE | 10 | Messages per second |
7. Timeouts
Request Timeouts
| Variable | Default | Description |
|---|
ARAGORA_REQUEST_TIMEOUT | 30 | Default request timeout |
ARAGORA_MAX_REQUEST_TIMEOUT | 600 | Maximum allowed timeout |
ARAGORA_SLOW_REQUEST_TIMEOUT | 120 | Slow request threshold |
Debate Timeouts
| Variable | Default | Description |
|---|
ARAGORA_SLOW_DEBATE_THRESHOLD | 30 | Slow debate detection (seconds) |
ARAGORA_CONTEXT_TIMEOUT | 150.0 | Context gathering timeout |
ARAGORA_EVIDENCE_TIMEOUT | 30.0 | Evidence collection timeout |
Debate Concurrency
| Variable | Default | Description |
|---|
ARAGORA_MAX_CONCURRENT_PROPOSALS | 5 | Max parallel proposal generations |
ARAGORA_PROPOSAL_STAGGER_SECONDS | 0.0 | Stagger delay between proposals (0=disabled) |
ARAGORA_AGENT_TIMEOUT_SECONDS | 60 | Per-agent timeout |
Note: Proposal generation uses bounded semaphores for true parallelism. Set stagger > 0 for legacy sequential behavior.
8. Observability
Logging
| Variable | Default | Description |
|---|
ARAGORA_LOG_LEVEL | INFO | Log level |
ARAGORA_LOG_FORMAT | json | Format: json or text |
ARAGORA_LOG_FILE | - | Log file path (stdout if not set) |
ARAGORA_LOG_MAX_BYTES | 10485760 | Max log file size |
ARAGORA_LOG_BACKUP_COUNT | 5 | Number of backups |
Prometheus Metrics
| Variable | Default | Description |
|---|
METRICS_ENABLED | true | Enable metrics endpoint |
METRICS_PORT | 9090 | Metrics server port |
ARAGORA_METRICS_TOKEN | - | Token to protect /metrics |
OpenTelemetry
| Variable | Default | Description |
|---|
OTEL_ENABLED | false | Enable tracing |
OTEL_EXPORTER_OTLP_ENDPOINT | http://localhost:4317 | OTLP collector |
OTEL_SERVICE_NAME | aragora | Service name |
OTEL_SAMPLE_RATE | 1.0 | Sampling rate (0.0-1.0) |
Sentry
| Variable | Default | Description |
|---|
SENTRY_DSN | - | Sentry DSN URL |
SENTRY_ENVIRONMENT | development | Environment tag |
SENTRY_TRACES_SAMPLE_RATE | 0.1 | Trace sampling |
9. Billing (Stripe)
| Variable | Default | Description |
|---|
STRIPE_SECRET_KEY | - | Stripe secret API key |
STRIPE_WEBHOOK_SECRET | - | Webhook signing secret |
STRIPE_PRICE_STARTER | - | Starter plan price ID |
STRIPE_PRICE_PROFESSIONAL | - | Professional plan price ID |
STRIPE_PRICE_ENTERPRISE | - | Enterprise plan price ID |
10. Chat Integrations
Slack
| Variable | Description |
|---|
SLACK_BOT_TOKEN | Bot token (xoxb-...) |
SLACK_APP_TOKEN | App token (xapp-...) |
SLACK_SIGNING_SECRET | Request signing secret |
Discord
| Variable | Description |
|---|
DISCORD_BOT_TOKEN | Bot token |
DISCORD_APPLICATION_ID | Application ID |
DISCORD_PUBLIC_KEY | Public key for verification |
Microsoft Teams
| Variable | Description |
|---|
TEAMS_APP_ID | Application ID |
TEAMS_APP_PASSWORD | Application password |
TEAMS_TENANT_ID | Tenant ID |
11. Enterprise Integrations
Snowflake
| Variable | Description |
|---|
SNOWFLAKE_USER | Username |
SNOWFLAKE_PASSWORD | Password |
SNOWFLAKE_PRIVATE_KEY_PATH | Key-pair auth path |
SNOWFLAKE_AUTHENTICATOR | Auth method |
Gmail
| Variable | Description |
|---|
GMAIL_CLIENT_ID | OAuth client ID |
GMAIL_CLIENT_SECRET | OAuth client secret |
12. Text-to-Speech
| Variable | Default | Description |
|---|
ARAGORA_TTS_BACKEND | - | TTS backend selection |
ARAGORA_TTS_ORDER | - | Backend priority order |
ARAGORA_ELEVENLABS_API_KEY | - | ElevenLabs API key |
ARAGORA_ELEVENLABS_VOICE_ID | - | Default voice ID |
13. Webhooks
| Variable | Default | Description |
|---|
ARAGORA_NOTIFICATION_WEBHOOK | - | Notification webhook URL |
ARAGORA_WEBHOOK_TIMEOUT | 30.0 | Delivery timeout |
ARAGORA_WEBHOOK_MAX_RETRIES | 3 | Max retries |
ARAGORA_WEBHOOK_ALLOW_LOCALHOST | false | Allow localhost targets |
Environment-Specific Configurations
Development
ARAGORA_ENVIRONMENT=development
ARAGORA_LOG_FORMAT=text
ARAGORA_LOG_LEVEL=DEBUG
ARAGORA_CSP_REPORT_ONLY=true
Production
ARAGORA_ENVIRONMENT=production
ARAGORA_LOG_FORMAT=json
ARAGORA_LOG_LEVEL=INFO
ARAGORA_CSP_REPORT_ONLY=false
JWT_SECRET=your-32-char-secret-here
ARAGORA_ALLOWED_ORIGINS=https://yourdomain.com
DATABASE_URL=postgresql://...
REDIS_URL=redis://...
Testing
ARAGORA_ENVIRONMENT=test
TESTING=1
ARAGORA_DB_BACKEND=sqlite
ARAGORA_DATA_DIR=/tmp/aragora-test
Validation
Run the configuration doctor to validate your setup:
python -m aragora.cli doctor
This checks:
- Required environment variables
- Database connectivity
- AI provider availability
- Redis connectivity (if configured)
- SSL certificate validity (if enabled)
See Also
.env.example - Quick-start configuration template
.env.starter - Minimal configuration for getting started
docs/ENVIRONMENT.md - Legacy environment documentation
aragora/config/settings.py - Pydantic settings schema