CXB Core reads configuration from a .env file at the project root. Defaults are for local development. Production fleet hosts override the worker and storage values explicitly.
Core settings
| Variable | Default | Description |
|---|
CXB_API_CONFIG_URL | http://localhost:8080/api/v1/config | CXB API config API base URL |
CXB_API_URL | http://localhost:8080 | CXB API base URL for non-config internal endpoints |
CXB_CORE_SECRET | cxb-core-internal-secret | Shared secret for CXB API ↔ CXB Core auth |
ENVIRONMENT | development | Set to production on live hosts to enable startup safety checks |
MAX_CONCURRENT_CALLS | 5 | Local dev default. Production fleet workers should use 1 so one worker equals one call slot. |
CXB_CORE_WORKERS | 4 | Worker count reported in health endpoints. Production must match the actual systemd/container worker count. |
CXB_CORE_SOCKET | "" | Unix socket path for a single worker, set by the systemd template |
AUDIO_SAMPLE_RATE | 8000 | Default audio sample rate (Hz) |
LOG_LEVEL | INFO | Logging level (DEBUG, INFO, WARNING, ERROR) |
Do not use the local MAX_CONCURRENT_CALLS=5 default in production. Current production architecture is one call per worker, enforced by both MAX_CONCURRENT_CALLS=1 and nginx max_conns=1.
Object storage
| Variable | Default | Description |
|---|
MINIO_ENDPOINT | localhost:9000 | S3-compatible endpoint |
MINIO_ACCESS_KEY | minioadmin | Access key |
MINIO_SECRET_KEY | minioadmin | Secret key |
MINIO_BUCKET | recordings | Bucket for call recordings |
MINIO_SECURE | false | Use HTTPS for storage endpoint |
LiveKit (SIP transports)
| Variable | Default | Description |
|---|
LIVEKIT_URL | (empty) | LiveKit server URL (e.g., wss://livekit.example.com) |
LIVEKIT_API_KEY | (empty) | LiveKit API key |
LIVEKIT_API_SECRET | (empty) | LiveKit API secret |
LiveKit variables are only required if using LiveKit SIP inbound or outbound transports. The WebSocket and Exotel transports do not need them.
OpenTelemetry
| Variable | Default | Description |
|---|
OTEL_ENABLED | false | Enable OpenTelemetry tracing |
OTEL_ENDPOINT | http://localhost:4317 | OTLP exporter endpoint |
OTEL_SERVICE_NAME | cxb-core | Service name in traces |
API keys
STT, LLM, and TTS API keys can be set in environment variables but are typically provided through bot config from CXB API:
| Variable | Service |
|---|
STT_STREAMING_API_KEY | Streaming / turn-detecting STT engine |
STT_MULTILINGUAL_API_KEY | Multilingual STT engine |
LLM_PROVIDER_A_API_KEY | LLM provider A |
LLM_PROVIDER_B_API_KEY | LLM provider B |
TTS_ENGINE_A_API_KEY | TTS engine A |
TTS_ENGINE_B_API_KEY | TTS engine B |
LLM caching
| Variable | Default | Description |
|---|
CONTEXT_CACHE_TTL_SECONDS | 3600 | TTL (seconds) for the CachedContent used by live and post-call explicit caching on the explicit-cache LLM providers. Floored at 300s; workers proactively recreate caches after ~90% of TTL. |
TTS cache
| Variable | Default | Description |
|---|
TTS_CACHE_REDIS_URL | "" | Redis URL used by the TTS audio cache. Required only when a bot enables tts.cache_config.enabled. |
Durable outboxes
CXB Core persists result delivery and Agent Desk enqueue attempts before trying to send them to CXB API.
| Variable | Default | Description |
|---|
RESULT_OUTBOX_DIR | /tmp/cxb-core-result-outbox | Directory for pending call-result webhook payloads |
RESULT_OUTBOX_POLL_SECONDS | 30.0 | Background retry poll interval |
RESULT_OUTBOX_RETRY_SECONDS | 30.0 | Initial retry delay |
RESULT_OUTBOX_MAX_RETRY_SECONDS | 300.0 | Max retry delay |
AGENT_DESK_OUTBOX_DIR | /tmp/cxb-core-agent-desk-outbox | Directory for pending Agent Desk handoff payloads |
AGENT_DESK_OUTBOX_POLL_SECONDS | 10.0 | Background retry poll interval |
AGENT_DESK_OUTBOX_RETRY_SECONDS | 5.0 | Initial retry delay |
AGENT_DESK_OUTBOX_MAX_RETRY_SECONDS | 60.0 | Max retry delay |
AGENT_DESK_WAIT_ESTIMATE_SECONDS | 120 | Wait estimate sent with Agent Desk handoffs |
AGENT_DESK_WAIT_ANNOUNCEMENT_ENABLED | true | Whether the bot announces the wait before handoff |
When ENVIRONMENT=production, CXB Core refuses to start with default secrets or /tmp outbox directories. Use persistent disk paths for outboxes on live hosts.
Production example
CXB_API_CONFIG_URL=https://api.cxbridge.io/api/v1/config
CXB_CORE_SECRET=your-secret-here
ENVIRONMENT=production
MAX_CONCURRENT_CALLS=1
CXB_CORE_WORKERS=16
AUDIO_SAMPLE_RATE=8000
LOG_LEVEL=info
RESULT_OUTBOX_DIR=/var/lib/core/result-outbox
AGENT_DESK_OUTBOX_DIR=/var/lib/core/agent-desk-outbox
MINIO_ENDPOINT=sgp1.digitaloceanspaces.com
MINIO_BUCKET=cxbridge-recordings
MINIO_SECURE=true
LIVEKIT_URL=wss://livekit.cxbridge.io
OTEL_ENABLED=false