Complete reference for every environment variable Nuggets reads at startup, organized by subsystem.
Nuggets reads its configuration from environment variables. Copy .env.example to .env in the project root and set the values you need. Variables you leave blank use the defaults listed here.
Comma-separated list of WhatsApp JIDs allowed to message the bot. When empty, the gateway accepts messages from any JID.
An empty GATEWAY_ALLOWLIST means anyone who has your number can talk to the bot. Set this to your own JID before exposing the gateway to external networks.
Bot token from the Discord developer portal. Required to enable the Discord channel.
DISCORD_ALLOWED_USER_IDS
string
"" (closed)
Comma-separated list of Discord user IDs allowed to message the bot. When empty, all messages are denied.
DISCORD_REQUIRE_MENTION
boolean
true
When true, the bot only responds in servers if the message includes an @mention. Has no effect in DMs.
Discord’s allowlist defaults to closed — unlike WhatsApp and Telegram, an empty DISCORD_ALLOWED_USER_IDS denies all messages. You must add at least one user ID to receive replies.
Comma- or newline-separated list of absolute paths to additional skill files or skill directories to load. These are loaded before the built-in skills/ registry and .pi/skills/ fallbacks.
# ── Messaging Channels ─────────────────────────────────────────# Configure at least one channel (WhatsApp, Telegram, or Discord).# WhatsApp (optional — skip if only using Telegram)# Get your JID by sending a message and checking gateway logs.GATEWAY_ALLOWLIST=[email protected]# Telegram (optional — skip if only using WhatsApp)# Create a bot via @BotFather, paste the token here.TELEGRAM_BOT_TOKEN=123456:ABC-DEF...# Your Telegram chat ID (send /start to @userinfobot to find it).TELEGRAM_ALLOWLIST=123456789# Discord (optional — skip if only using Telegram/WhatsApp)# Zero-dependency Discord support uses Node.js 22+ for built-in WebSocket/fetch APIs.DISCORD_BOT_TOKEN=# Comma-separated Discord user IDs allowed to talk to the bot.DISCORD_ALLOWED_USER_IDS=# In servers, require an @mention before the bot responds.DISCORD_REQUIRE_MENTION=true# ── Agent Backend ─────────────────────────────────────────────# Choose one: pi, codex, localAGENT_BACKEND=piAGENT_PROVIDER=anthropicAGENT_MODEL=# Legacy Pi compatibility (safe to keep)PI_PROVIDER=anthropicPI_MODEL=# Pi provider credentialsANTHROPIC_API_KEY=sk-ant-...OPENAI_API_KEY=# Codex backendCODEX_USE_OSS=falseCODEX_LOCAL_PROVIDER=CODEX_FULL_AUTO=true# Local OpenAI-compatible backend (Ollama / MLX)LOCAL_MODEL_PROVIDER=LOCAL_MODEL_BASE_URL=LOCAL_MODEL_API_KEY=# ── Agent Session Pool ────────────────────────────────────────PI_IDLE_TIMEOUT_MS=300000MAX_PI_PROCESSES=5# ── Proactive System ─────────────────────────────────────────HEARTBEAT_INTERVAL_MS=1800000QUIET_HOURS_START=22QUIET_HOURS_END=8CRON_EVAL_INTERVAL_MS=60000