Grip supports full configuration via environment variables using the GRIP_ prefix. Nested configuration keys use double underscore (__) as a delimiter.
Environment variables override values in ~/.grip/config.json. This makes Docker and production deployments easier.
# Maximum tokens per response (1-200000)GRIP_AGENTS__DEFAULTS__MAX_TOKENS=8192# Sampling temperature (0.0-2.0)GRIP_AGENTS__DEFAULTS__TEMPERATURE=0.7# Max tool iterations (0=unlimited)GRIP_AGENTS__DEFAULTS__MAX_TOOL_ITERATIONS=0# Memory window (5-500 messages)GRIP_AGENTS__DEFAULTS__MEMORY_WINDOW=50
# Auto-consolidate when session exceeds 2x memory windowGRIP_AGENTS__DEFAULTS__AUTO_CONSOLIDATE=true# Model for summarization (empty = use main model)GRIP_AGENTS__DEFAULTS__CONSOLIDATION_MODEL="openrouter/google/gemini-flash-2.0"# Enable semantic cachingGRIP_AGENTS__DEFAULTS__SEMANTIC_CACHE_ENABLED=true# Cache TTL in seconds (60-86400)GRIP_AGENTS__DEFAULTS__SEMANTIC_CACHE_TTL=3600
# Enable Telegram channelGRIP_CHANNELS__TELEGRAM__ENABLED=true# Bot token from @BotFatherGRIP_CHANNELS__TELEGRAM__TOKEN="123456:ABC-DEF1234ghIkl-zyx57W2v1u123ew11"# Restrict to specific user IDs (JSON array, empty = allow all)GRIP_CHANNELS__TELEGRAM__ALLOW_FROM='["12345678","87654321"]'
# Enable Discord channelGRIP_CHANNELS__DISCORD__ENABLED=true# Bot token from Discord Developer PortalGRIP_CHANNELS__DISCORD__TOKEN="YOUR_DISCORD_BOT_TOKEN"# Restrict to specific user IDsGRIP_CHANNELS__DISCORD__ALLOW_FROM='["123456789012345678"]'
# DuckDuckGo (enabled by default, no API key needed)GRIP_TOOLS__WEB__DUCKDUCKGO__ENABLED=trueGRIP_TOOLS__WEB__DUCKDUCKGO__MAX_RESULTS=5# Brave SearchGRIP_TOOLS__WEB__BRAVE__ENABLED=trueGRIP_TOOLS__WEB__BRAVE__API_KEY="BSA..."GRIP_TOOLS__WEB__BRAVE__MAX_RESULTS=5# PerplexityGRIP_TOOLS__WEB__PERPLEXITY__ENABLED=trueGRIP_TOOLS__WEB__PERPLEXITY__API_KEY="pplx-..."
# Enable cost-aware routingGRIP_AGENTS__MODEL_TIERS__ENABLED=true# Low complexity model (greetings, lookups)GRIP_AGENTS__MODEL_TIERS__LOW="openrouter/google/gemini-flash-2.0"# Medium complexity model (empty = use default)GRIP_AGENTS__MODEL_TIERS__MEDIUM=""# High complexity model (architecture, debugging)GRIP_AGENTS__MODEL_TIERS__HIGH="openrouter/anthropic/claude-sonnet-4"