Configuration
Diminuendo is configured entirely through environment variables, loaded at startup via Effect’sConfig module. There are no configuration files, no YAML, no JSON. Every configurable value has a sensible default, and the gateway will start with zero environment variables set (in dev mode).
Environment Variables
| Variable | Type | Default | Description |
|---|---|---|---|
PORT | number | 8080 | HTTP/WebSocket server port |
HOSTNAME | string | 0.0.0.0 | Server bind address |
NODE_ENV | string | development | Environment identifier |
DEV_MODE | boolean | false | Enable dev mode (overrides NODE_ENV check) |
AUTH_CLIENT_ID | string | "" | Auth0 client ID for JWT verification |
AUTH_CLIENT_SECRET | Redacted | "" | Auth0 client secret |
AUTH_URL | string | "" | Auth0 domain URL |
ALLOWED_ORIGINS | string | "" | Comma-separated list of allowed CORS/CSRF origins |
PODIUM_URL | string | http://localhost:5082 | Podium coordinator base URL |
PODIUM_API_KEY | Redacted | "" | Podium API bearer token |
PODIUM_ADMIN_API_KEY | Redacted | "" | Podium admin key for agent deployment |
PODIUM_SECRETS_KEY | Redacted | "" | Podium encryption key for secrets management |
ENSEMBLE_URL | string | http://localhost:5180 | Ensemble inference proxy base URL |
ENSEMBLE_API_KEY | Redacted | "" | Ensemble API bearer token |
E2B_API_KEY | Redacted | "" | E2B sandbox API key |
E2B_DOMAIN | string | e2b-dev.igent.dev | E2B sandbox domain |
DATA_DIR | string | ./data | Root directory for SQLite databases |
LOG_LEVEL | string | info | Minimum log level (trace, debug, info, warning, error, fatal) |
OTEL_EXPORTER_OTLP_ENDPOINT | string | (none) | OpenTelemetry collector endpoint. Tracing is disabled if unset |
OTEL_SERVICE_NAME | string | diminuendo-gateway | Service name for OTel spans |
Dev Mode
Dev mode is enabled when eitherDEV_MODE=true or NODE_ENV=development. It activates several behaviors that simplify local development:
Auth Bypass
Authentication is bypassed entirely. Every WebSocket connection is automatically authenticated with a dev identity (
dev-user-001, developer@example.com, tenant dev).All Origins Allowed
CSRF and origin checks are disabled. The gateway accepts WebSocket upgrades from any origin, enabling connections from
localhost dev servers on any port.Pretty Logging
Log output uses Effect’s pretty-print logger instead of JSON, making log lines readable in a terminal.
Insecure Protocol Warnings Suppressed
Warnings about using HTTP (vs HTTPS) for upstream service URLs are relaxed.
Secrets Management
Five configuration values are stored as EffectRedacted<string> values: AUTH_CLIENT_SECRET, PODIUM_API_KEY, PODIUM_ADMIN_API_KEY, PODIUM_SECRETS_KEY, and ENSEMBLE_API_KEY. The Redacted wrapper prevents accidental logging — if the config object is logged (intentionally or via error serialization), redacted fields render as <redacted> rather than exposing the secret value.
Data Directory Structure
TheDATA_DIR environment variable (default: ./data) defines the root directory for all persistent storage. The gateway creates the following directory structure on startup:
Registry Database
Each tenant has aregistry.db containing:
- sessions table — session metadata: id, name, agent type, status, timestamps, archived flag
- tenant_members table — membership records: user ID, role, timestamps
Session Database
Each session has asession.db containing:
- messages table — conversation history: role, content, metadata, turn ID, timestamps
- events table — persistent gateway events: type, sequence number, payload JSON, timestamps
- turn_usage table — per-turn token usage: model, input/output tokens, cached tokens, cost
Databases are created lazily on first access. A newly created tenant has no
registry.db until the first session is created. A newly created session has no session.db until the first message or event is persisted.Configuration Loading
The configuration is loaded as an EffectLayer, meaning it participates in the dependency injection graph:
AppConfig as a dependency. The Layer graph wires it in at composition time. No service reads environment variables directly — all access goes through the typed AppConfigShape interface.
Validation
The configuration layer performs validation during construction:- If
ENSEMBLE_URLis set to a non-default value butENSEMBLE_API_KEYis empty, a warning is logged - If
PODIUM_URLuses HTTP (not HTTPS) in non-dev mode, a warning is logged - Invalid values for typed fields (e.g., non-numeric
PORT) cause the Effect config to fail, which prevents the gateway from starting with misconfigured values