This repository has no description
0

Configure Feed

Select the types of activity you want to include in your feed.

niri / .env.example
4.1 kB 85 lines
1# ── Primary model (OpenAI-compatible) ──────────────────────────────────────── 2OPENAI_BASE_URL=https://api.openai.com/v1 3OPENAI_API_KEY= 4MODEL= 5# Enable/disable model reasoning traces (thinking) across requests + stream output. 6ENABLE_THINKING=true 7 8# Used when the primary endpoint is unreachable or rate-limited (429/5xx). 9# Supports any OpenAI-compatible provider (OpenRouter, LM Studio, etc.). 10FALLBACK_OPENAI_BASE_URL=http://localhost:1234/v1 11FALLBACK_OPENAI_API_KEY= 12FALLBACK_MODEL= 13# Tool call policy for fallback requests: required, auto, none 14FALLBACK_TOOL_CHOICE=required 15# Optional headers 16FALLBACK_OPENAI_REFERER= 17FALLBACK_OPENAI_TITLE= 18# Context window enforcement for fallback. Defaults to true for localhost, false otherwise. 19FALLBACK_ENFORCE_CONTEXT_LIMIT= 20FALLBACK_N_CTX=4096 21FALLBACK_CONTEXT_MARGIN=256 22FALLBACK_HARD_OVERFLOW_TOKENS=1024 23 24# Set to "local" to skip the primary model and route all requests to the fallback. 25NIRI_ENV=default 26 27# Must match the user created in the Dockerfile and the volume mount in docker-compose.yml. 28NIRI_USER=niri 29NIRI_CONTAINER=niri 30# UID/GID the container process runs as — match your host user to avoid permission issues. 31# On Linux this is usually `id -u` / `id -g` (often 1000:1000). 32AGENT_UID=1000 33AGENT_GID=1000 34 35PORT=3000 36# Used by the chat CLI to connect. Include the scheme, exclude the port. 37NIRI_HOST=http://localhost 38 39# ── Context & token limits ──────────────────────────────────────────────────── 40TOKEN_NUDGE_THRESHOLD=120000 41FALLBACK_TOKEN_NUDGE_THRESHOLD=50000 42CONTEXT_COMPACT_TARGET_TOKENS=65000 43CONTEXT_COMPACT_TRIGGER_TOKENS=90000 44CONTEXT_COMPACT_RECENT_MESSAGES=80 45CONTEXT_COMPACT_CHUNK_MESSAGES=32 46CONTEXT_COMPACT_SUMMARY_MAX_CHARS=16000 47 48# ── Runner safety guardrails ────────────────────────────────────────────────── 49# Hard cap on assistant turns in a single wake cycle. 50RUNNER_MAX_TURNS=120 51# Stop if the same assistant tool call + result pattern repeats. 52RUNNER_MAX_IDENTICAL_TOOL_TURNS=6 53 54# ── Tools ───────────────────────────────────────────────────────────────────── 55# Max bytes accepted by image_tool before rejecting the file. 56IMAGE_TOOL_MAX_BYTES=150000 57# Override the image directory exposed to the agent (default: /home/$NIRI_USER/images). 58IMAGE_ROOT= 59 60# ── Discord ─────────────────────────────────────────────────────────────────── 61DISCORD_BOT_TOKEN= 62# Optional — auto-detected from the gateway on first connect if left blank. 63DISCORD_BOT_USER_ID= 64# Enable the built-in gateway listener (messageCreate → ingest pipeline). 65DISCORD_GATEWAY_ENABLED=true 66# Log every ingest decision (verbose, for debugging). 67DISCORD_GATEWAY_TRACE=false 68# Also ingest raw MESSAGE_CREATE packets — recommended for DM reliability. 69DISCORD_GATEWAY_RAW_FALLBACK=true 70# Comma-separated channel IDs scanned by discord_scan when no channel_ids arg is passed. 71DISCORD_SCAN_CHANNEL_IDS= 72# Wake the agent immediately on any new Discord event (leave false to avoid spam). 73DISCORD_WAKE_ON_EVENT=false 74# Wake immediately on DMs even when DISCORD_WAKE_ON_EVENT is false. 75DISCORD_WAKE_ON_DM=true 76# How often to batch pending Discord events into a single harness message. 77DISCORD_BATCH_INTERVAL_MS=60000 78# Restrict batch digests to configured scan channels + DMs (recommended). 79DISCORD_BATCH_ONLY_CONFIGURED=true 80# Auto-demote pending inbox items to seen after N minutes (0 = disabled). 81DISCORD_PENDING_AUTO_SEEN_MINUTES=10 82# Include a channel scan snapshot in each batch payload. 83DISCORD_BATCH_SCAN=true 84# Max messages included in a single batch digest. 85DISCORD_BATCH_MAX_MESSAGES=40