# Telegram bot token from @BotFather TELEGRAM_BOT_TOKEN= # Anthropic API key (https://console.anthropic.com/) ANTHROPIC_API_KEY= # PostgreSQL connection string # For docker-compose the host is "postgres"; for local dev use "localhost" DATABASE_URL=postgresql://chatbot:chatbot@localhost:5432/chatbot?schema=public # Default model id when a chat has no preference yet (see src/config/models.config.ts) DEFAULT_MODEL=claude-sonnet-5 # How many recent messages to keep verbatim before rolling them into a summary HISTORY_WINDOW=20 # Optional: override the default system prompt (bot personality) globally. # Per-chat overrides via /persona take precedence over this. # SYSTEM_PROMPT= # Smart group mode: let the bot decide on its own whether to chime in. # Requires privacy mode DISABLED in BotFather so the bot sees all group messages. GROUP_GATE_ENABLED=true # Debounce window (ms) to batch a burst of group messages before deciding. GATE_DEBOUNCE_MS=5000 # Minimum gap (ms) between self-initiated group replies, to avoid spam. GATE_COOLDOWN_MS=60000 # Web search: let the model look things up online when it needs fresh facts. # Anthropic server-side tool, billed ~$10 per 1000 searches. WEB_SEARCH_ENABLED=true # Max searches the model may run per single reply. WEB_SEARCH_MAX_USES=5 # Live streaming of replies via Telegram message drafts (private chats only). STREAM_ENABLED=true # Node env NODE_ENV=development