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
| Variable | Description | Example |
|---|---|---|
POSTGRES_PASSWORD | PostgreSQL database password | secure_pass_123 |
TELEGRAM_BOT_TOKEN | Bot token from @BotFather | 123456:ABCdef... |
DASHBOARD_SECRET | Dashboard 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.
| Variable | Provider | Notes |
|---|---|---|
OPENAI_API_KEY | OpenAI | GPT-4o, GPT-4, GPT-3.5 |
ANTHROPIC_API_KEY | Anthropic | Claude 3.5, Claude 3 |
GOOGLE_API_KEY | Google Gemini | Gemini 1.5 Pro/Flash |
XAI_API_KEY | xAI | Grok models |
MISTRAL_API_KEY | Mistral AI | Mistral Large, Codestral |
DEEPSEEK_API_KEY | DeepSeek | DeepSeek-V3, Coder |
OPENROUTER_API_KEY | OpenRouter | 200+ models via single API |
PERPLEXITY_API_KEY | Perplexity | Sonar models with web search |
HUGGINGFACE_API_KEY | HuggingFace | Inference Endpoints |
MOONSHOT_API_KEY | Kimi / Moonshot AI | moonshot-v1-128k |
LMSTUDIO_BASE_URL | LM Studio | e.g. http://host:1234/v1 |
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
| Variable | Description | Default |
|---|---|---|
TELEGRAM_BOT_TOKEN | Bot token from @BotFather | Required |
TELEGRAM_ALLOWED_USERS | Comma-separated Telegram user IDs | Empty (blocks all) |
If TELEGRAM_ALLOWED_USERS is empty, no users can interact with the bot. Set it to your numeric Telegram user ID.
Dashboard
| Variable | Description | Default |
|---|---|---|
DASHBOARD_SECRET | Login 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
| Variable | Description | Default |
|---|---|---|
TIMEZONE | Agent timezone (IANA format) | America/Santiago |
LOG_LEVEL | Logging verbosity | INFO |
SOVEREIGN_MODE | Enable Sovereign Mode (max autonomy) | true |
Scheduler Notifications
| Variable | Description | Default |
|---|---|---|
SCHEDULER_NOTIFY_CHAT_ID | Telegram chat ID for scheduler notifications | Empty |
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
| Variable | Description |
|---|---|
GMAIL_ADDRESS | Gmail address for the agent |
GMAIL_APP_PASSWORD | Gmail App Password (not your main password) |
To get a Gmail App Password:
- Enable 2-Factor Authentication on your Google account
- Go to Google Account → Security → App Passwords
- Generate a password for "Mail"
Optional Advanced Settings
These have sensible defaults and rarely need to be changed.
| Variable | Description | Default |
|---|---|---|
REDIS_URL | Redis connection URL | redis://agent-redis:6379/0 |
DATABASE_URL | PostgreSQL connection URL | Auto-set from POSTGRES_PASSWORD |
OLLAMA_BASE_URL | Ollama server URL | http://agent-ollama:11434 |
XAI_BASE_URL | xAI API base URL | https://api.x.ai/v1 |
Feature Flags
These are set in code (config.py) and can be overridden via environment variables:
| Variable | Description | Default |
|---|---|---|
PLAN_CRITIC_ENABLED | Enable dual-layer plan validation | true |
WORLD_MODEL_ENABLED | Enable world state tracking | true |
SKILL_EVOLUTION_ENABLED | Enable automatic skill synthesis | true |
TEMPORAL_REASONING_ENABLED | Enable temporal insight generation | true |
VECTOR_MEMORY_ENABLED | Enable semantic vector search | false |
META_AGENT_ENABLED | Enable meta-agent supervisor | false |
GOAL_ENGINE_ENABLED | Enable the goal execution engine | true |
AGENTS_ENABLED | Enable multi-agent orchestration | true |
INTEGRATIONS_ENABLED | Enable the integration platform | true |
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=