Skip to main content

Environment Variables

All configuration is passed via environment variables. These are defined in your .env file in the project root and injected into containers by Docker Compose.

Required Variables

VariableDescriptionExample
POSTGRES_PASSWORDPostgreSQL database passwordsecure_pass_123
TELEGRAM_BOT_TOKENBot token from @BotFather123456:ABCdef...
DASHBOARD_SECRETDashboard login password (min 16 chars)my_secure_secret_key

AI Provider Keys

At least one provider is required. WASP auto-detects which providers are configured.

VariableProviderNotes
OPENAI_API_KEYOpenAIGPT-4o, GPT-4, GPT-3.5
ANTHROPIC_API_KEYAnthropicClaude 3.5, Claude 3
GOOGLE_API_KEYGoogle GeminiGemini 1.5 Pro/Flash
XAI_API_KEYxAIGrok models
MISTRAL_API_KEYMistral AIMistral Large, Codestral
DEEPSEEK_API_KEYDeepSeekDeepSeek-V3, Coder
OPENROUTER_API_KEYOpenRouter200+ models via single API
PERPLEXITY_API_KEYPerplexitySonar models with web search
HUGGINGFACE_API_KEYHuggingFaceInference Endpoints
MOONSHOT_API_KEYKimi / Moonshot AImoonshot-v1-128k
LMSTUDIO_BASE_URLLM Studioe.g. http://host:1234/v1
Runtime API key configuration

You can also set API keys at runtime via the /api set <provider> <key> command in Telegram, without restarting containers. Keys are stored encrypted in Redis.

Telegram Configuration

VariableDescriptionDefault
TELEGRAM_BOT_TOKENBot token from @BotFatherRequired
TELEGRAM_ALLOWED_USERSComma-separated Telegram user IDsEmpty (blocks all)
warning

If TELEGRAM_ALLOWED_USERS is empty, no users can interact with the bot. Set it to your numeric Telegram user ID.

Dashboard

VariableDescriptionDefault
DASHBOARD_SECRETLogin password (min 16 chars)Required

The dashboard is available at https://your-domain.com and protected by session-based authentication with CSRF protection.

Core Agent Settings

VariableDescriptionDefault
TIMEZONEAgent timezone (IANA format)America/Santiago
LOG_LEVELLogging verbosityINFO
SOVEREIGN_MODEEnable Sovereign Mode (max autonomy)true

Scheduler Notifications

VariableDescriptionDefault
SCHEDULER_NOTIFY_CHAT_IDTelegram chat ID for scheduler notificationsEmpty
note

Set this to your Telegram chat ID to receive notifications from background jobs (health alerts, dream mode completions, autonomous goals, price alerts, etc.).

Gmail Integration

VariableDescription
GMAIL_ADDRESSGmail address for the agent
GMAIL_APP_PASSWORDGmail App Password (not your main password)

To get a Gmail App Password:

  1. Enable 2-Factor Authentication on your Google account
  2. Go to Google Account → Security → App Passwords
  3. Generate a password for "Mail"

Optional Advanced Settings

These have sensible defaults and rarely need to be changed.

VariableDescriptionDefault
REDIS_URLRedis connection URLredis://agent-redis:6379/0
DATABASE_URLPostgreSQL connection URLAuto-set from POSTGRES_PASSWORD
OLLAMA_BASE_URLOllama server URLhttp://agent-ollama:11434
XAI_BASE_URLxAI API base URLhttps://api.x.ai/v1

Feature Flags

These are set in code (config.py) and can be overridden via environment variables:

VariableDescriptionDefault
PLAN_CRITIC_ENABLEDEnable dual-layer plan validationtrue
WORLD_MODEL_ENABLEDEnable world state trackingtrue
SKILL_EVOLUTION_ENABLEDEnable automatic skill synthesistrue
TEMPORAL_REASONING_ENABLEDEnable temporal insight generationtrue
VECTOR_MEMORY_ENABLEDEnable semantic vector searchfalse
META_AGENT_ENABLEDEnable meta-agent supervisorfalse
GOAL_ENGINE_ENABLEDEnable the goal execution enginetrue
AGENTS_ENABLEDEnable multi-agent orchestrationtrue
INTEGRATIONS_ENABLEDEnable the integration platformtrue

Full .env.example

# === REQUIRED ===
POSTGRES_PASSWORD=change_me_strong_password
TELEGRAM_BOT_TOKEN=YOUR_BOT_TOKEN_HERE
TELEGRAM_ALLOWED_USERS=YOUR_TELEGRAM_USER_ID
DASHBOARD_SECRET=change_me_at_least_16_chars

# === AI PROVIDERS (at least one required) ===
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
GOOGLE_API_KEY=
XAI_API_KEY=
MISTRAL_API_KEY=
DEEPSEEK_API_KEY=
OPENROUTER_API_KEY=
PERPLEXITY_API_KEY=
MOONSHOT_API_KEY=

# === OPTIONAL ===
TIMEZONE=America/New_York
LOG_LEVEL=INFO
SOVEREIGN_MODE=true
SCHEDULER_NOTIFY_CHAT_ID=

# === GMAIL (optional) ===
GMAIL_ADDRESS=
GMAIL_APP_PASSWORD=