Skip to main content

Environment Variables

WASP is configured via .env (loaded by Docker Compose) and validated at startup by Pydantic Settings (src/config.py). The container refuses to start if a required value is missing or weak.

Auto-generated by the installer

These three are filled with openssl rand values by install.sh. Don't edit unless you know what you're doing.

VariablePurpose
POSTGRES_PASSWORDPostgres password. Changing this without resetting the DB volume will lock you out.
DASHBOARD_SECRETHMAC signing key for dashboard sessions (≥ 32 chars).
MEDIA_SIGNING_SECRETHMAC signing key for /chat/media/* URLs (≥ 64 hex chars).

Configured by the wizard

VariablePurpose
TIMEZONEIANA timezone (America/Santiago, Europe/Berlin, …). Default UTC.
DASHBOARD_USER / DASHBOARD_PASSWORDDashboard login. If unset on first boot, a temporary password is generated and printed to stderr.
DASHBOARD_PUBLIC_URLExternal URL when behind a reverse proxy. Empty = http://<host>:8080.
DEFAULT_PROVIDERanthropic (default) / openai / xai / google / local (for Ollama).
WASP_HOST_DIRPath on the host where WASP is installed. The wizard sets this from --install-dir. The agent reads it so its self-repair commands point to the right rebuild directory.

Telegram bridge

VariablePurpose
TELEGRAM_BOT_TOKENFrom @BotFather. Empty = bridge exits cleanly, no bot.
TELEGRAM_ALLOWED_USERSRequired if TELEGRAM_BOT_TOKEN is set. Comma-separated numeric Telegram user IDs. Empty + token set = bridge refuses to start (fail-closed; there is no public-bot mode).
SCHEDULER_NOTIFY_CHAT_IDChat ID where the scheduler sends proactive notifications. The wizard replicates TELEGRAM_ALLOWED_USERS here.

LLM providers

You need at least one of:

VariableProvider
ANTHROPIC_API_KEYAnthropic Claude
OPENAI_API_KEYOpenAI
XAI_API_KEYxAI Grok
GOOGLE_API_KEYGoogle Gemini

Or set DEFAULT_PROVIDER=local and pull a model with docker exec agent-ollama ollama pull <model>.

Integrations (optional)

VariablePurpose
SMTP_HOST / SMTP_PORT / SMTP_USER / SMTP_PASSWORD / SMTP_FROMEmail (SMTP). Leave blank to disable.
GMAIL_RECIPIENT_ALLOWLISTComma-separated allowed addresses (alice@example.com) or domains (@company.com). When set, the gmail send skill refuses to email anyone not on the list — defense-in-depth against prompt injection. Empty = no restriction.

Per-connector credentials (Slack, Discord, GitHub, Notion, Binance, Coinbase, etc.) are stored encrypted in the SecretVault (Postgres) rather than in .env. Add them at runtime via the dashboard's /integrations page or with integration_skill(action="configure", ...).

Operational

VariableDefaultPurpose
LOG_LEVELINFOstructlog level — DEBUG, INFO, WARNING, ERROR.
SOVEREIGN_MODEtrueRaises MAX_SKILL_ROUNDS to 12 and injects the operator prime block at the top of every system prompt.
DASHBOARD_PORT8080Host-facing port for the dashboard.
DASHBOARD_BIND127.0.0.1Host interface the dashboard listens on. Default 127.0.0.1 means loopback only — the dashboard is reachable from the host itself but not from the public internet. Set to 0.0.0.0 to expose publicly (only do this behind a TLS reverse proxy). See Dashboard Access for the three supported access patterns.

Feature flags (Pydantic settings)

These default to true and can be overridden at runtime via the dashboard /config page (persisted to Redis key config:overrides and re-applied on restart):

FlagEffect
vector_memory_enabledEmbedding-based memory retrieval
knowledge_graph_enabledKG extraction + injection into the system prompt
dream_enabledDream cycle (gated by user inactivity)
autonomous_goal_enabledAutonomous goal generator job
perception_enabledBackground crypto/web perception
behavioral_learning_enabledBehavioral rule learning from corrections
plan_critic_enabledLLM validation of TaskGraphs before execution
skill_evolution_enabledComposite-skill synthesis from recurring patterns
cpi_monitor_enabledCognitive Pressure Index monitoring
integrity_monitor_enabledSelf-Integrity Monitor
opportunity_engine_enabledProactive automation suggestions
goal_meta_reflection_enabledPer-goal post-mortem reflections

Resource governance

VariableDefaultPurpose
goals_per_day_cap10Daily user-goal creation limit
concurrent_agents_cap5Max parallel sub-agents
tasks_per_hour_cap50Max scheduled-task fires per hour
llm_calls_per_minute_cap30LLM rate limit
api_calls_per_minute_cap60External-API rate limit
goal_budget_max_replans5Max replans before goal fails

Validation rules

config.py Pydantic validators enforce at startup:

  • DASHBOARD_SECRET ≥ 16 chars (≥ 32 recommended; the installer generates 64).
  • MEDIA_SIGNING_SECRET minimum entropy unless media_signing_debug=true (the validator checks character distribution).
  • POSTGRES_PASSWORD non-empty.
  • At least one model API key present, OR DEFAULT_PROVIDER=local.
  • If TELEGRAM_BOT_TOKEN is set, TELEGRAM_ALLOWED_USERS must also be set (fail-closed; checked in the Telegram bridge container, not core).

A failed validation prints the error and exits non-zero.

Loading order

  1. Docker Compose loads .env into the container environment.
  2. Pydantic Settings reads env vars at startup.
  3. After init_db(), the config:overrides Redis key is read and supported flag overrides are applied via setattr() — this is how the /config dashboard page persists changes across restarts.

Setting model API keys after start

You can add or rotate keys without restarting:

  • Dashboard: /models page → "Add API Key".
  • Telegram: /api set <provider> <key> (e.g. /api set anthropic sk-ant-...).

Keys are encrypted by the SecretVault and persisted to the integration_secrets table. They survive container restarts.

See also