# === Telegram (required) === BOT_TOKEN=your-telegram-bot-token ALLOWED_USERS=your-telegram-user-id # === AI Provider (choose one) === # Options: groq | nvidia-llama-3.3-70b | gemini-2.5-flash | gpt-4o | openrouter | claude-sdk | ollama # Free providers: groq, nvidia-llama-3.3-70b, gemini-2.5-flash # Claude SDK: Premium — full agent with tool use, needs `claude login` (Max subscription) PRIMARY_PROVIDER=groq # Fallback chain (comma-separated, tried in order if primary fails) # FALLBACK_PROVIDERS=nvidia-llama-3.3-70b,gemini-2.5-flash # === API Keys (set the one for your chosen provider) === # Groq — free at console.groq.com (also enables voice transcription) GROQ_API_KEY= # Google Gemini — free tier at aistudio.google.com GOOGLE_API_KEY= # NVIDIA NIM — free tier at build.nvidia.com NVIDIA_API_KEY= # OpenAI — paid, platform.openai.com OPENAI_API_KEY= # Anthropic API — direct Claude access (Opus, Sonnet, Haiku) ANTHROPIC_API_KEY= # OpenRouter — openrouter.ai (100+ models) OPENROUTER_API_KEY= # === Agent === WORKING_DIR=~ # Optional hard daily-spend cap (OFF by default — the bot is never blocked). # To enable a runaway-cost brake, set BOTH a positive limit AND BUDGET_ENFORCE=1. # Leaving these unset/commented means no budget blocking at all. # MAX_BUDGET_USD=5.0 # BUDGET_ENFORCE=1 # === Web UI === WEB_PORT=3100 # WEB_PASSWORD=your-password # === Optional Platforms === # WHATSAPP_ENABLED=true # DISCORD_TOKEN=your-discord-bot-token # SIGNAL_API_URL=http://localhost:8080 # SIGNAL_NUMBER=+491234567890 # === Custom Chrome (for WhatsApp, if not auto-detected) === # CHROME_PATH=/usr/bin/google-chrome # =================================================================== # OPTIONAL — Security & Auth # =================================================================== # Auth mode for new users trying to talk to the bot. # allowlist (default) — only ALLOWED_USERS can use the bot # pairing — new users get a 6-digit pairing code; owner approves # open — anyone can chat (for public bots) # AUTH_MODE=allowlist # Session isolation (how context is scoped): # per-user (default) — each user gets their own session # per-channel — everyone in the same channel shares a session # per-channel-peer — per (channel, user) pair # SESSION_MODE=per-user # =================================================================== # OPTIONAL — Text-to-Speech (TTS) # =================================================================== # TTS backend: "edge" (free, default) or "elevenlabs" (paid, higher quality) # TTS_PROVIDER=edge # ElevenLabs — set all three to use ElevenLabs TTS # ELEVENLABS_API_KEY= # ELEVENLABS_VOICE_ID=iP95p4xoKVk53GoZ742B # ELEVENLABS_MODEL_ID=eleven_v3 # =================================================================== # OPTIONAL — Webhooks # =================================================================== # Enable inbound webhook endpoint (POST /api/webhook) for external triggers # WEBHOOK_ENABLED=false # WEBHOOK_TOKEN=change-me-to-a-random-secret # =================================================================== # OPTIONAL — Sub-Agents & Compaction # =================================================================== # Maximum number of sub-agents that can run in parallel (default: 4) # MAX_SUBAGENTS=4 # Sub-agent hard timeout in ms. -1 = unlimited (default: -1) # SUBAGENT_TIMEOUT=-1 # Context compaction threshold in tokens (default: 80000) # COMPACTION_THRESHOLD=80000 # =================================================================== # OPTIONAL — Browser Automation # =================================================================== # Connect to an existing Chrome DevTools Protocol endpoint instead of # launching a new browser instance. # CDP_URL=ws://localhost:9222 # Port for the optional browser HTTP gateway (default: 3800) # BROWSE_SERVER_PORT=3800 # =================================================================== # OPTIONAL — Data Directory # =================================================================== # Override where alvin-bot stores its data (default: ~/.alvin-bot) # ALVIN_DATA_DIR=/custom/path/to/data # Live steering — inject follow-up instructions mid-generation (default: on) # STEERING_ENABLED=true # =================================================================== # POWER / OWNER OPT-INS — unlock full capability # # These are safe-by-default for unconfigured installs. As the owner # you can opt in to the full power mode for each feature. # =================================================================== # Shell & Python execution security: # allowlist (default) — only a curated set of safe binaries (ls, cat, git, # python3, node, etc.) can be executed by the bot # full — unrestricted shell/Python — full agent power mode; set this # when you want the bot to run arbitrary commands on your machine # deny — block all exec/python tool calls (read-only agent) # EXEC_SECURITY=allowlist # Web UI host binding: # 127.0.0.1 (default) — loopback only, not reachable from LAN or internet # 0.0.0.0 — listen on all interfaces (expose to LAN/VPS/remote) # If you set WEB_HOST=0.0.0.0 (or any non-loopback address), also set # WEB_PASSWORD to protect the UI: # WEB_HOST=127.0.0.1 # WEB_PASSWORD=your-strong-password # Allow the bot to fetch localhost / LAN / internal URLs (SSRF guard): # unset or 0 (default) — private IPs and loopback are blocked to prevent # SSRF attacks from untrusted prompt content # 1 — enable, so the bot can reach your local services, dev # servers, and internal APIs (owner workflow on your own machine) # ALLOW_PRIVATE_FETCH=0