Skip to content

Environment Variable Config Registry ​

This is a best-effort reference for declared environment variables, grouped by area. LemonCore.Env.all_declared/0 aggregates the app registries configured under :env_registries; undeclared direct environment reads may not appear here. The owning app and declaration describe each variable; a declaration does not prove that every build reads it.

As of this writing, LemonCore.Env is a registry and typed accessor, not yet the only way these variables are read. Call sites still read most of these directly via System.get_env/1 or LemonCore.Config.Helpers; migrating them to LemonCore.Env.get/2 is tracked as follow-up work (see "Migration order" below). New code should prefer LemonCore.Env.get/2 for anything declared here, and add a declaration for anything new.

Regenerate the tables from the umbrella root with mix run --no-start scripts/generate_config_registry.exs; add --check to detect drift without writing. The generator starts no applications and reads declaration metadata only, never environment values or secret stores.

Naming convention ​

  • New variables MUST be named LEMON_<AREA>_<NAME> (e.g. LEMON_GATEWAY_MAX_CONCURRENT_RUNS, LEMON_ARENA_<DOMAIN>_MODELS). This keeps LEMON_-prefixed variables greppable and namespaced away from third-party tooling.
  • Provider/vendor credentials keep their ecosystem-standard names and are not renamed to the LEMON_ scheme -- e.g. ANTHROPIC_API_KEY, OPENAI_API_KEY, AWS_ACCESS_KEY_ID, GOOGLE_APPLICATION_CREDENTIALS, TWILIO_ACCOUNT_SID. Renaming these would break compatibility with the SDKs/CLIs/docs the ecosystem already documents them against.
  • Standard platform/BEAM release variables are never renamed -- HOME, SHELL, TERM, MIX_ENV, RELEASE_NAME, RELEASE_NODE, RELEASE_VSN, PHX_SERVER.
  • Every other pre-existing non-conforming name below is grandfathered and listed with its conforming replacement (if one exists) as an aliases: entry in its LemonCore.Env declaration -- the conforming name is checked first, then the legacy name, so existing deployments keep working. Grandfathered names in this registry: VOICE_PUBLIC_URL, VOICE_RECORDINGS_DIR, WEREWOLF_ARENA_MODELS / WEREWOLF_ARENA_ENABLED / WEREWOLF_ARENA_PLAYER_COUNT / WEREWOLF_ARENA_GAME_DELAY_MS / WEREWOLF_LEAGUE_DIR (superseded by the generalized LEMON_ARENA_WEREWOLF_* names), LEMON_OPENAI_COMPAT_TOKEN (superseded by LEMON_OPENAI_COMPAT_API_TOKEN), LEMON_OPENAI_COMPAT_IMAGE_HOST_ALLOWLIST (superseded by LEMON_OPENAI_COMPAT_IMAGE_URL_ALLOWED_HOSTS), LEMON_GATEWAY_COOKIE (superseded by LEMON_GATEWAY_NODE_COOKIE), and the INTEGRATION_* / legacy ANTHROPIC_API_KEY fallbacks for the LEMON_EVAL_* family.

Secrets ​

Variables flagged secret below hold credentials or tokens. LemonCore.Env.snapshot/0 resolves every declared variable's current value for reporting/diagnostics tooling, and its Inspect output (LemonCore.Env.Resolved) redacts any secret value automatically -- so it's safe to IO.inspect/1 or log a snapshot without leaking a credential.

Migration order (proposed) ​

Call-site migration to LemonCore.Env.get/2 is out of scope for this pass and is tracked as follow-up work. Suggested order, roughly least-to-most risky:

  1. LemonCore.Config.* modules (Agent, Tools, Gateway, Logging, TUI) -- already funnel through LemonCore.Config.Helpers, so swapping the call site is mechanical and low-risk.
  2. Single-app leaf config (lemon_browser, lemon_skills, lemon_evals, terminal backends) -- self-contained modules with few callers.
  3. config/runtime.exs -- the always-on arena block and prod endpoint block are dynamic (LEMON_ARENA_<DOMAIN>_<SUFFIX>, <PREFIX>_{HOST,PORT,SECRET_KEY_BASE}); migrate once LemonCore.Env gets a documented pattern for iterating a family of declared names.
  4. Provider credential resolution (LemonAgent.ProviderConfigResolver, LemonAgent.ModelRuntime.Credentials) -- highest blast radius (every provider call), migrate last and behind the existing architecture_rules_check.ex boundary tests.

Variables by area ​

Agent ​

Env VarTypeDefaultSecretAppsDescription
LEMON_BASE_DELAY_MSinteger1000lemon_coreBase backoff delay (ms) between retry attempts.
LEMON_BUDGET_MAX_CHILDRENinteger5lemon_coreDefault max concurrent delegated sub-agent children per run.
LEMON_COMPACTION_ENABLEDbooleantruelemon_coreWhether context compaction runs automatically as the transcript grows.
LEMON_COMPACTION_KEEP_RECENT_TOKENSinteger20000lemon_coreRecent-token window kept verbatim (uncompacted) at the tail of the transcript.
LEMON_COMPACTION_RESERVE_TOKENSinteger16384lemon_coreToken budget reserved (not compacted away) during compaction.
LEMON_DEFAULT_MODELstringclaude-sonnet-4-20250514lemon_coreDefault model id used when no per-run model is specified.
LEMON_DEFAULT_PROVIDERstringanthropiclemon_coreDefault LLM provider id used when no per-run provider is specified.
LEMON_DEFAULT_THINKING_LEVELstringmediumlemon_coreDefault reasoning/thinking effort level for the agent loop.
LEMON_EXTENSIONS_AUTO_LOAD_DEFAULT_PATHSbooleanfalselemon_coreWhether default extension search paths are auto-loaded.
LEMON_EXTENSIONS_ENABLEDbooleantruelemon_coreWhether the extensions subsystem is enabled.
LEMON_EXTENSION_PATHSlist (comma-separated)[]lemon_coreComma-separated list of extra extension directories to load.
LEMON_MAX_RETRIESinteger3lemon_coreMaximum retry attempts for a failing LLM call.
LEMON_PROVIDER_FALLBACK_PROVIDERSlist (comma-separated)[]lemon_coreComma-separated fallback provider ids tried after the primary provider fails.
LEMON_PROVIDER_ROUTING_DEFAULT_POOLstring(none)lemon_coreDefault credential pool name used for provider routing.
LEMON_PROVIDER_ROUTING_DEFAULT_PROFILEstring(none)lemon_coreDefault provider routing profile name.
LEMON_PROVIDER_ROUTING_ENABLEDbooleantruelemon_coreWhether multi-provider routing/fallback is enabled.
LEMON_PROVIDER_ROUTING_REQUIRE_CREDENTIALSbooleantruelemon_coreWhether provider routing requires resolvable credentials before selecting a provider.
LEMON_RETRY_ENABLEDbooleantruelemon_coreWhether transient LLM call failures are retried.
LEMON_SECRET_OBFUSCATION_ENABLEDbooleanfalselemon_coreWhether secrets are replaced with placeholders in provider-visible session text.
LEMON_SHELL_COMMAND_PREFIXstring(none)lemon_coreCommand prefix prepended to every shell tool invocation.
LEMON_SHELL_PATHstring(none)lemon_coreShell executable path used by the bash/shell tool.

Ai diagnostics ​

Env VarTypeDefaultSecretAppsDescription
LEMON_AI_DEBUGbooleanfalselemon_aiWhether raw Anthropic SSE traffic is logged to a debug file.
LEMON_AI_DEBUG_FILEstring/tmp/lemon_anthropic_sse.loglemon_aiFile path used for Anthropic SSE debug logging.
LEMON_AI_HTTP_TRACEbooleanfalselemon_aiWhether low-level HTTP request/response tracing is enabled for provider calls.
LEMON_AI_PROMPT_DIAGNOSTICSbooleanfalselemon_aiWhether prompt diagnostics logging is enabled.
LEMON_AI_PROMPT_DIAGNOSTICS_LOG_LEVELstring(none)lemon_aiLog level used for prompt diagnostics output.
LEMON_AI_PROMPT_DIAGNOSTICS_TOP_Ninteger(none)lemon_aiNumber of top prompt-diagnostics entries to report.
LEMON_KIMI_MAX_REQUEST_MESSAGESinteger(none)lemon_aiKimi message-count preflight compaction hint; provider requests preserve full history.
PI_CACHE_RETENTIONstring(none)lemon_aiWhen set to "long", requests 24h prompt-cache retention from OpenAI-compatible providers.

Arena ​

Env VarTypeDefaultSecretAppsDescription
LEMON_ARENA_LEAGUE_ROOTstring(none)lemon_sim_uiRoot directory under which each arena domain's league dir defaults to <domain>_league; must be absolute for the production sim UI.
LEMON_ARENA_POKER_ENABLEDbooleantruelemon_sim_uiWhether the poker arena is enabled (only checked once MODELS is set).
LEMON_ARENA_POKER_GAME_DELAY_MSinteger(none)lemon_sim_uiDelay between games (ms) for the poker arena.
LEMON_ARENA_POKER_LEAGUE_DIRstring(none)lemon_sim_uiLeague standings directory for the poker arena.
LEMON_ARENA_POKER_MODELSlist (comma-separated)[]lemon_sim_uiComma-separated provider:model specs enabling the poker arena.
LEMON_ARENA_POKER_PLAYER_COUNTinteger(none)lemon_sim_uiPlayer count for the poker arena.
LEMON_ARENA_WEREWOLF_ENABLED
(alias: WEREWOLF_ARENA_ENABLED)
booleantruelemon_sim_uiWhether the werewolf arena is enabled (only checked once MODELS is set).
LEMON_ARENA_WEREWOLF_GAME_DELAY_MS
(alias: WEREWOLF_ARENA_GAME_DELAY_MS)
integer(none)lemon_sim_uiDelay between games (ms) for the werewolf arena.
LEMON_ARENA_WEREWOLF_LEAGUE_DIR
(alias: WEREWOLF_LEAGUE_DIR)
string(none)lemon_sim_uiLeague standings directory for the werewolf arena.
LEMON_ARENA_WEREWOLF_MODELS
(alias: WEREWOLF_ARENA_MODELS)
list (comma-separated)[]lemon_sim_uiComma-separated provider:model specs enabling the werewolf arena.
LEMON_ARENA_WEREWOLF_PLAYER_COUNT
(alias: WEREWOLF_ARENA_PLAYER_COUNT)
integer(none)lemon_sim_uiPlayer count for the werewolf arena.
LEMON_GOAL_JUDGE_MODELstring(none)lemon_automationModel id used to judge automation goal completion.
LEMON_SIM_AUTO_LOOPbooleanfalselemon_sim_uiWhether the werewolf auto-loop starts automatically on boot.
LEMON_SIM_WEREWOLF_PLAYERSinteger6lemon_sim_uiPlayer count for the werewolf auto-loop.

Automation ​

Env VarTypeDefaultSecretAppsDescription
LEMON_CRON_ADMISSION_ALLOWED_ORIGINSstring(none)lemon_automationComma-separated exact origins allowed for private cron admission callbacks; HTTPS or literal-loopback HTTP only.
LEMON_CRON_DRIFT_GUARD_ENABLEDboolean(none)lemon_automationOverride the cron model drift guard (fail closed when the global default model changed under an unpinned job).
LEMON_CRON_PREFLIGHT_ENABLEDboolean(none)lemon_automationOverride the cron pre-dispatch preflight (provider/target readiness) toggle.

Browser ​

Env VarTypeDefaultSecretAppsDescription
BROWSERBASE_API_KEYstring(none)yeslemon_browserBrowserbase API key for hosted browser sessions.
BROWSERBASE_PROJECT_IDstring(none)lemon_browserBrowserbase project id for hosted browser sessions.
BROWSER_USE_API_KEYstring(none)yeslemon_browserBrowser Use Cloud API key for hosted browser sessions.
CAMOFOX_API_KEYstring(none)yeslemon_browserOptional bearer key for the configured Camofox server.
CAMOFOX_URLstring(none)lemon_browserBase URL for a Camofox REST/Firefox browser server.
LEMON_BROWSER_ATTACH_ONLYbooleanfalselemon_browserWhether the browser tool only attaches to an existing browser instead of launching one.
LEMON_BROWSER_BACKENDstringlocallemon_browserBrowser backend id: local, controller, hybrid, browserbase, browser_use, firecrawl, or camofox.
LEMON_BROWSER_CDP_ENDPOINTstring(none)lemon_browserChrome DevTools Protocol websocket endpoint to attach to instead of launching a browser.
LEMON_BROWSER_CDP_PORTinteger18800lemon_browserLocal CDP port used when launching a managed browser instance. Only positive integers are accepted (0/negative/unparseable fall back to the default); resolved with a bespoke parser in LemonBrowser.LocalServer, not the standard :integer cast.
LEMON_BROWSER_DRIVER_PATHstring(none)lemon_browserPath to the browser automation driver binary.
LEMON_BROWSER_HYBRID_LOCAL_BACKENDstringlocallemon_browserLocal/private backend selected by the hybrid browser router.
LEMON_BROWSER_HYBRID_PUBLIC_BACKENDstring(none)lemon_browserExplicit hosted backend selected by the hybrid router for public URLs.
LEMON_BROWSER_PROFILE_DIRECTORYstring(none)lemon_browserChrome profile directory within the managed user-data directory, such as Default or Profile 1.
LEMON_BROWSER_RELAY_PORTinteger9224lemon_browserLoopback port for the Manifest V3 existing-Chrome relay.
LEMON_BROWSER_RELAY_TOKENstring(none)yeslemon_browserRequired shared secret for the loopback extension and CDP relay.
LEMON_BROWSER_USER_DATA_DIRstring(none)lemon_browserDedicated Chrome user-data directory for managed launches; actions use its cookies and logins.

Computer use ​

Env VarTypeDefaultSecretAppsDescription
LEMON_BOT_PUBLIC_URLstring(none)lemon_computer_useThe Lemon Bot backend's public origin (owned by the Lemon Bot backend); computer use declines it because its web client shows approvals.
LEMON_COMPUTER_USE_DECLINED_ORIGINSstring(none)lemon_computer_useComma-separated website origins computer use always declines (for example a custom Lemon Bot web origin).
LEMON_COMPUTER_USE_ENABLEDbooleanfalselemon_computer_useOpt in to native app control (cua_js/cua_js_reset) through the locally installed LCU runtime.
LEMON_COMPUTER_USE_LCU_ROOTstring(none)lemon_computer_useInstalled LCU release directory. Defaults to ~/.local/share/lcu/current (or /opt/lcu/current).
LEMON_COMPUTER_USE_NODEstring(none)lemon_computer_useNode runtime for the LCU bridge. Defaults to LCU's own <root>/agent-tools/node/bin/node.

Endpoints ​

Env VarTypeDefaultSecretAppsDescription
LEMON_A2A_HOSTstring(none)lemon_control_planeHost address for the A2A peer listener.
LEMON_A2A_MAX_CONTEXT_TURNSinteger(none)lemon_control_planeMaximum accepted inbound turns per A2A context.
LEMON_A2A_PORTinteger(none)lemon_control_planePort for the A2A peer listener.
LEMON_A2A_PUBLIC_URLstring(none)lemon_control_planePublic A2A JSON-RPC URL advertised in Lemon's Agent Card.
LEMON_A2A_RATE_LIMIT_PER_MINUTEinteger(none)lemon_control_planePer-peer A2A JSON-RPC request limit per minute.
LEMON_A2A_REPLY_TIMEOUT_MSinteger(none)lemon_control_planeMaximum synchronous wait for an A2A peer run.
LEMON_ACP_API_TOKENstring(none)yeslemon_control_planeBearer token required for the ACP (agent control protocol) HTTP API.
LEMON_AGENT_PROFILES_CWDstring(none)lemon_routerWorking directory override used to resolve router agent profiles.
LEMON_CONTROL_PLANE_ALLOW_UNAUTHENTICATED_LOOPBACKbooleanfalselemon_control_planeExplicitly allow legacy tokenless WebSocket operator access from direct loopback peers.
LEMON_CONTROL_PLANE_OPERATOR_TOKENstring(none)yeslemon_control_planeShared operator credential required by control-plane WebSocket operator connections.
LEMON_CONTROL_PLANE_PORTinteger(none)lemon_control_planePort the control-plane HTTP server listens on.
LEMON_GATEWAY_ENABLE_A2Abooleanfalselemon_control_planeEnable the A2A peer listener.
LEMON_GATEWAY_HEALTH_PORTinteger(none)lemon_gatewayPort the gateway health-check endpoint listens on.
LEMON_OPENAI_COMPAT_API_TOKEN
(alias: LEMON_OPENAI_COMPAT_TOKEN)
string(none)yeslemon_control_planeBearer token required for the OpenAI-compatible HTTP API.
LEMON_OPENAI_COMPAT_IMAGE_URL_ALLOWED_HOSTS
(alias: LEMON_OPENAI_COMPAT_IMAGE_HOST_ALLOWLIST)
list (comma-separated)[]lemon_control_planeComma-separated hostname allowlist for OpenAI-compat image URL fetch.
LEMON_OPENAI_COMPAT_IMAGE_URL_FETCHbooleanfalselemon_control_planeWhether the OpenAI-compat endpoint is allowed to fetch image URLs from messages.
LEMON_ROUTER_HEALTH_PORTinteger(none)lemon_routerPort the router health-check endpoint listens on.
LEMON_SIM_UI_ACCESS_TOKENstring(none)yeslemon_sim_uiAdmin token; required with at least 32 bytes for a production Sim UI endpoint.
LEMON_SIM_UI_BIND_IPstring127.0.0.1lemon_sim_uiBind IP address for the LemonSimUi dev endpoint.
LEMON_SIM_UI_HOSTstringlocalhostlemon_sim_uiPublic hostname for the LemonSimUi prod endpoint; explicit in production.
LEMON_SIM_UI_PORTinteger4090lemon_sim_uiPort LemonSimUi listens on.
LEMON_SIM_UI_PUBLIC_VENDING_LAUNCHERbooleanfalselemon_sim_uiWhether the public VendingBench launcher page is exposed.
LEMON_SIM_UI_SECRET_KEY_BASEstring(none)yeslemon_sim_uiPhoenix secret_key_base; required with at least 64 bytes for a production Sim UI endpoint.
LEMON_SIM_UI_SUITE_ROOTSlist (comma-separated)[]lemon_sim_uiColon-separated extra suite root directories for LemonSimUi.
LEMON_SIM_UI_URL_PORTinteger443lemon_sim_uiPublic URL port for generated LemonSimUi links.
LEMON_SIM_UI_URL_SCHEMEstringhttpslemon_sim_uiPublic URL scheme for generated LemonSimUi links (http or https).
LEMON_WEB_HOSTstringlocalhostlemon_webPublic hostname for the LemonWeb prod endpoint.
LEMON_WEB_PORTinteger4080lemon_webPort LemonWeb listens on.
LEMON_WEB_SECRET_KEY_BASEstring(none)yeslemon_webPhoenix secret_key_base for the LemonWeb prod endpoint.
LEMON_WEB_UPLOADS_DIRstring(none)lemon_webDirectory used for LemonWeb file uploads.
LEMON_WEB_URL_PORTinteger443lemon_webPublic URL port for generated LemonWeb links.
LEMON_WEB_URL_SCHEMEstringhttpslemon_webPublic URL scheme for generated LemonWeb links (http or https).
PHX_SERVERbooleanfalselemon_web, lemon_sim_uiStandard Phoenix flag to start the HTTP server in a release (ecosystem-standard name).

Error reporting ​

Env VarTypeDefaultSecretAppsDescription
SENTRY_DSNstring(none)yeslemon_coreSentry DSN; error reporting is dormant unless this is set.
SENTRY_ENVIRONMENTstring(none)lemon_coreSentry environment name override (falls back to LEMON_ENV, then Mix env).

Evals live ​

Env VarTypeDefaultSecretAppsDescription
LEMON_EVAL_API_KEY
(alias: INTEGRATION_API_KEY, ANTHROPIC_API_KEY)
string(none)yeslemon_evalsLive-eval provider API key.
LEMON_EVAL_API_KEY_SECRET
(alias: INTEGRATION_API_KEY_SECRET)
string(none)yeslemon_evalsSecrets-store key name resolving to the live-eval API key.
LEMON_EVAL_API_TYPE
(alias: INTEGRATION_API_TYPE)
string(none)lemon_evalsLive-eval LemonAi.Types.Model.api atom override (default: anthropic_messages).
LEMON_EVAL_BASE_URL
(alias: INTEGRATION_BASE_URL)
string(none)lemon_evalsLive-eval API base URL override.
LEMON_EVAL_MODEL
(alias: INTEGRATION_MODEL)
string(none)lemon_evalsLive-eval model id (default: kimi-for-coding).
LEMON_EVAL_PROVIDER
(alias: INTEGRATION_PROVIDER)
string(none)lemon_evalsLive-eval provider atom override (default: kimi).

Execution nodes ​

Env VarTypeDefaultSecretAppsDescription
LEMON_CONTROL_PLANE_PUBLIC_WS_URLstring(none)lemon_control_planeReachable secure control-plane WebSocket URL embedded in node invitations; ws is allowed only for loopback.
LEMON_NODE_INSTALL_BASE_URLstring(none)lemon_control_planeHTTPS operator-supported pinned node artifact base URL passed to the existing installer; never defaults to published artifacts.
LEMON_NODE_INSTALL_VERSIONstring(none)lemon_control_planeExact operator-supported node artifact CalVer; requires an HTTPS node install base URL and actual feature checks.
LEMON_NODE_SOURCE_CHECKOUTstring(none)lemon_control_planeAbsolute destination-local integrated source checkout used by node invite commands.

Gateway ​

Env VarTypeDefaultSecretAppsDescription
DISCORD_BOT_TOKENstring(none)yeslemon_channelsDiscord bot token (ecosystem-standard name).
LEMON_GATEWAY_AUTO_RESUMEbooleanfalselemon_core, lemon_gatewayWhether the gateway auto-resumes interrupted runs on boot.
LEMON_GATEWAY_DEFAULT_CWDstring(none)lemon_core, lemon_gatewayDefault working directory for gateway-initiated runs.
LEMON_GATEWAY_ENABLE_DISCORDbooleanfalselemon_channelsWhether the Discord transport is enabled.
LEMON_GATEWAY_ENABLE_TELEGRAMbooleanfalselemon_channelsWhether the Telegram transport is enabled.
LEMON_GATEWAY_ENABLE_WEBHOOKbooleanfalselemon_core, lemon_gatewayWhether the generic webhook transport is enabled.
LEMON_GATEWAY_ENABLE_XMTPbooleanfalselemon_channelsWhether the XMTP transport is enabled.
LEMON_GATEWAY_ENGINE_LOCK_TIMEOUT_MSinteger60000lemon_core, lemon_gatewayEngine lock acquisition timeout, in milliseconds.
LEMON_GATEWAY_MAX_CONCURRENT_RUNSinteger2lemon_core, lemon_gatewayMaximum concurrent agent runs the gateway will schedule.
LEMON_GATEWAY_REQUIRE_ENGINE_LOCKbooleantruelemon_core, lemon_gatewayWhether an engine lock is required before starting a gateway run.
LEMON_LOCK_DIRstring(none)lemon_channelsDirectory used for gateway/channel file locks.
LEMON_TELEGRAM_COMPACTION_CONTEXT_WINDOWinteger400000lemon_channelsContext window size (tokens) used for Telegram compaction triggers.
LEMON_TELEGRAM_COMPACTION_ENABLEDbooleantruelemon_channelsWhether Telegram session transcripts are auto-compacted.
LEMON_TELEGRAM_COMPACTION_RESERVE_TOKENSinteger16384lemon_channelsToken budget reserved during Telegram session compaction.
LEMON_TELEGRAM_COMPACTION_TRIGGER_RATIOfloat0.9lemon_channelsContext-window fill ratio that triggers Telegram compaction.
LEMON_TELEGRAM_POLLER_LOCK_STALE_MSinteger(none)lemon_channelsAge (ms) after which a Telegram poller lock is considered stale and reclaimed.

Gateway sms ​

Env VarTypeDefaultSecretAppsDescription
LEMON_SMS_INBOX_TTL_MSinteger(none)lemon_gatewayTTL (ms) for deduplicated inbound SMS message tracking.
LEMON_SMS_WEBHOOK_BINDstring(none)lemon_gatewayBind address for the SMS webhook server.
LEMON_SMS_WEBHOOK_ENABLEDboolean(none)lemon_gatewayWhether the inbound SMS webhook server is enabled.
LEMON_SMS_WEBHOOK_PORTinteger(none)lemon_gatewayPort the SMS webhook server listens on.
TWILIO_ACCOUNT_SIDstring(none)yeslemon_gatewayTwilio account SID (ecosystem-standard name, grandfathered).
TWILIO_AUTH_TOKENstring(none)yeslemon_gatewayTwilio auth token (ecosystem-standard name, grandfathered).
TWILIO_INBOX_NUMBERstring(none)lemon_gatewayTwilio inbox phone number used for inbound SMS routing.
TWILIO_PHONE_NUMBERstring(none)lemon_gatewayTwilio sending phone number (ecosystem-standard name, grandfathered).
TWILIO_VALIDATE_WEBHOOKbooleantruelemon_gatewayWhether inbound Twilio webhook signatures are validated.
TWILIO_WEBHOOK_URLstring(none)lemon_gatewayPublic URL Twilio uses to reach the SMS webhook.

Gateway voice ​

Env VarTypeDefaultSecretAppsDescription
DEEPGRAM_API_KEYstring(none)yeslemon_gatewayDeepgram API key for voice transcription (ecosystem-standard name).
ELEVENLABS_API_KEYstring(none)yeslemon_gatewayElevenLabs API key for voice synthesis (ecosystem-standard name).
ELEVENLABS_VOICE_IDstring21m00Tcm4TlvDq8ikWAMlemon_gatewayElevenLabs voice id used for voice synthesis.
VOICE_PUBLIC_URLstring(none)lemon_gatewayPublic URL for the voice websocket endpoint (grandfathered, no LEMON_ prefix).
VOICE_RECORDINGS_DIRstring(none)lemon_gatewayDirectory where downloaded call recordings are stored.

Honcho ​

Env VarTypeDefaultSecretAppsDescription
HONCHO_AI_PEERstringlemonlemon_honchoPeer id representing the assistant side of the conversation.
HONCHO_API_KEYstring(none)yeslemon_honchoHoncho API key. Presence of this (or HONCHO_BASE_URL) enables the integration.
HONCHO_BASE_URLstring(none)lemon_honchoBase URL of the Honcho API. Set this to point at a self-hosted deployment.
HONCHO_ENVIRONMENTstringproductionlemon_honchoHoncho deployment to talk to when no base URL is given (production, demo, local).
HONCHO_PEERstring(none)lemon_honchoPeer id representing the human. Defaults to the sanitized $USER, then "user".
HONCHO_TIMEOUT_MSinteger30000lemon_honchoTimeout for one attempt at a Honcho HTTP call, in milliseconds. A turn-path call may retry a transient failure twice; the diagnostics in mix lemon.honcho do not, so there it is the whole bound.
HONCHO_WORKSPACEstringlemonlemon_honchoHoncho workspace that owns every peer, session and conclusion Lemon writes.
LEMON_HONCHO_CONTEXT_CADENCEinteger1lemon_honchoRefresh the injected session context every N turns (1 = every turn).
LEMON_HONCHO_CONTEXT_TOKENSinteger(none)lemon_honchoToken budget asked of Honcho for session context. Unset lets Honcho decide.
LEMON_HONCHO_DIALECTIC_CADENCEinteger2lemon_honchoRun the (slower, reasoned) dialectic query every N turns.
LEMON_HONCHO_DIALECTIC_MAX_CHARSinteger600lemon_honchoHard cap on the dialectic answer spliced into the prompt, in characters.
LEMON_HONCHO_ENABLEDbooleantruelemon_honchoMaster switch, on by default: a key or base URL alone activates the integration. Set false to ignore a key that stays exported.
LEMON_HONCHO_FIRST_TURN_WAIT_MSinteger3000lemon_honchoHow long a session's cold first turn may block waiting for memory. The value plus a 200ms margin is clamped to prompt assembly's 3000ms contributor ceiling, so values above 2800 buy no more time; 0 disables the wait.
LEMON_HONCHO_INJECT_IN_SUBAGENTSbooleanfalselemon_honchoWhether subagent runs also get memory injected. Off by default; subagents are cheap.
LEMON_HONCHO_MESSAGE_MAX_CHARSinteger25000lemon_honchoPer-message truncation applied before a turn is uploaded to Honcho.
LEMON_HONCHO_OBSERVATION_MODEstringdirectionallemon_honchoPeer observation preset: directional (both peers observe) or unified (one model).
LEMON_HONCHO_PIN_USER_PEERbooleanfalselemon_honchoUse the configured human peer for every channel sender.
LEMON_HONCHO_REASONING_LEVELstringlowlemon_honchoReasoning budget Honcho spends on dialectic queries: minimal, low, medium, high, max.
LEMON_HONCHO_RECALL_MODEstringhybridlemon_honchoHow memory reaches the model: hybrid (injection + tools), context (injection only; the honcho_* tools are inactive), or tools (tools only; nothing injected).
LEMON_HONCHO_RUNTIME_PEER_PREFIXstring``lemon_honchoPrefix for channel-qualified non-owner sender peer ids; empty uses the runtime id.
LEMON_HONCHO_SAVE_MESSAGESbooleantruelemon_honchoWhether turns are written back to Honcho. False makes the integration read-only: no uploads, and the profile write and conclusion create/delete are refused.
LEMON_HONCHO_SESSION_STRATEGYstringper-directorylemon_honchoWhat a Honcho session maps to: per-session, per-directory, per-repo, or global.
LEMON_HONCHO_USER_PEER_ALIASESstring(none)lemon_honchoJSON map of channel-qualified runtime ids to Honcho peer ids.

Logging ​

Env VarTypeDefaultSecretAppsDescription
LEMON_LOG_COMPRESS_ON_ROTATEboolean(none)lemon_coreWhether rotated log files are gzip-compressed.
LEMON_LOG_FILEstring(none)lemon_corePath to the log file (nil disables file logging).
LEMON_LOG_FILESYNC_REPEAT_INTERVALinteger(none)lemon_coreLog file sync interval, in milliseconds.
LEMON_LOG_LEVELstring(none)lemon_coreGlobal log level override (debug/info/notice/warning/error/critical/alert/emergency).
LEMON_LOG_MAX_NO_BYTESinteger(none)lemon_coreLog file rotation size threshold, in bytes. Plain integer only -- unlike LEMON_WASM_DEFAULT_MEMORY_LIMIT, this one does not accept "10MB"-style suffixes.
LEMON_LOG_MAX_NO_FILESinteger(none)lemon_coreNumber of rotated log files retained.

Omp ​

Env VarTypeDefaultSecretAppsDescription
LEMON_OMP_APPROVALSstringbridgelemon_ompTool approval prompts: bridge to Lemon approvals (default), or decline.
LEMON_OMP_APPROVAL_TIMEOUT_MSinteger600000lemon_ompMaximum wait for an omp tool approval, capped by the omp dialog timeout.
LEMON_OMP_BINstring(none)lemon_ompPath or name of the omp executable. Defaults to the first omp on PATH.
LEMON_OMP_IDLE_TIMEOUT_MSinteger1800000lemon_ompClose an idle omp process after this many milliseconds (0 disables). Sessions stay resumable.
LEMON_OMP_MAX_SESSIONSinteger4lemon_ompMaximum number of live omp processes Lemon supervises at once.
LEMON_OMP_SESSION_DIRstring(none)lemon_ompLemon's omp history directory (default: Lemon state dir/omp/sessions). Set to omp to use omp's own default.
PI_CODING_AGENT_DIRstring(none)lemon_ompomp's agent directory; Lemon reads <dir>/sessions for read-only session discovery.
PI_CONFIG_DIRstring.omplemon_ompomp's config directory name under HOME, used when PI_CODING_AGENT_DIR is unset.

Platform ​

Env VarTypeDefaultSecretAppsDescription
HOMEstring(none)lemon_core, lemon_ai, coding_agentStandard POSIX home directory; used for default .lemon locations and OAuth token caches.
MIX_ENVstring(none)lemon_coreStandard Mix environment (dev/test/prod).
RELEASE_NAMEstring(none)lemon_coreStandard Elixir release name; selects which endpoint(s) boot in a multi-app release.
RELEASE_NODEstring(none)lemon_coreStandard Elixir release node name; presence indicates a running release (vs. mix).
RELEASE_VSNstring(none)lemon_coreStandard Elixir release version.
SHELLstring/bin/shlemon_simStandard POSIX shell path, used as a fallback shell for the external decider.
TERMstring(none)lemon_cliStandard terminal type variable; used to detect non-interactive/dumb terminals.

Provider ​

Env VarTypeDefaultSecretAppsDescription
OPENAI_BASE_URLstring(none)lemon_aiOpenAI API base URL override (ecosystem-standard name).

Provider secrets ​

Env VarTypeDefaultSecretAppsDescription
ANTHROPIC_API_KEYstring(none)yeslemon_aiAnthropic API key.
AWS_ACCESS_KEY_IDstring(none)yeslemon_core, lemon_agentAWS access key id for Bedrock (ecosystem-standard name).
AWS_DEFAULT_REGIONstring(none)lemon_coreAWS region fallback (ecosystem-standard AWS CLI name).
AWS_PROFILEstring(none)lemon_agentNamed AWS CLI credentials profile to resolve Bedrock credentials from.
AWS_REGIONstringus-east-1lemon_coreAWS region for Bedrock (ecosystem-standard name).
AWS_SECRET_ACCESS_KEYstring(none)yeslemon_core, lemon_agentAWS secret access key for Bedrock (ecosystem-standard name).
AWS_SESSION_TOKENstring(none)yeslemon_coreAWS temporary session token for Bedrock (ecosystem-standard name).
AZURE_OPENAI_API_KEYstring(none)yeslemon_aiAzure OpenAI API key.
AZURE_OPENAI_API_VERSIONstring(none)lemon_coreAzure OpenAI API version.
AZURE_OPENAI_BASE_URLstring(none)lemon_coreAzure OpenAI resource base URL.
AZURE_OPENAI_DEPLOYMENT_NAME_MAPstring(none)lemon_coreJSON map of model id to Azure OpenAI deployment name.
AZURE_OPENAI_RESOURCE_NAMEstring(none)lemon_coreAzure OpenAI resource name.
CHATGPT_TOKENstring(none)yeslemon_aiChatGPT/Codex session token (fallback for OPENAI_CODEX_API_KEY).
GCLOUD_PROJECTstring(none)lemon_ai, lemon_cli, lemon_coreGoogle Cloud project id (gcloud CLI convention name).
GEMINI_API_KEYstring(none)yeslemon_aiGemini API key (alt name).
GITHUB_COPILOT_CLIENT_IDstring(none)lemon_aiGitHub Copilot OAuth client id override.
GOOGLE_API_KEYstring(none)yeslemon_aiGoogle Generative AI API key (alt name).
GOOGLE_APPLICATION_CREDENTIALSstring(none)yeslemon_ai, lemon_agentPath to a Google service-account JSON credentials file (ecosystem-standard name).
GOOGLE_APPLICATION_CREDENTIALS_JSONstring(none)yeslemon_coreInline Google service-account JSON credentials.
GOOGLE_CLOUD_LOCATIONstring(none)lemon_coreGoogle Cloud / Vertex AI region.
GOOGLE_CLOUD_PROJECTstring(none)lemon_ai, lemon_cli, lemon_coreGoogle Cloud project id (ecosystem-standard name).
GOOGLE_CLOUD_PROJECT_IDstring(none)lemon_ai, lemon_cli, lemon_coreGoogle Cloud project id (alt ecosystem name).
GOOGLE_GEMINI_CLI_OAUTH_CLIENT_IDstring(none)lemon_aiGoogle Gemini CLI OAuth client id override.
GOOGLE_GEMINI_CLI_OAUTH_CLIENT_SECRETstring(none)yeslemon_aiGoogle Gemini CLI OAuth client secret override.
GOOGLE_GENERATIVE_AI_API_KEYstring(none)yeslemon_aiGoogle Generative AI API key (primary name).
LEMON_GEMINI_PROJECT_IDstring(none)lemon_ai, lemon_cli, lemon_coreLemon-specific override for the Gemini/Vertex project id, checked before the GOOGLE_CLOUD_* names.
MISTRAL_API_KEYstring(none)yeslemon_aiMistral API key.
OPENAI_API_KEYstring(none)yeslemon_aiOpenAI API key.
OPENAI_CODEX_API_KEYstring(none)yeslemon_aiOpenAI Codex API key.
OPENAI_CODEX_OAUTH_CLIENT_IDstring(none)lemon_aiOpenAI Codex OAuth client id override.
OPENCODE_API_KEYstring(none)yeslemon_aiOpenCode provider API key.

Runtime ​

Env VarTypeDefaultSecretAppsDescription
EXA_API_KEYstring(none)yescoding_agentExa API key used by the registered Exa search and contents provider.
LEMON_AGENT_DIRstring(none)coding_agent, lemon_skillsOverride for the .lemon agent state directory.
LEMON_ALLOW_RESTART_TOOLbooleanfalsecoding_agentWhether the agent's self-restart tool is permitted to run.
LEMON_DEBUGbooleanfalselemon_coreGlobal debug flag checked at a few call sites in addition to LEMON_LOG_LEVEL.
LEMON_DOTENV_DIRstring(none)lemon_coreDirectory to load a .env file from at boot.
LEMON_ENVstring(none)lemon_coreDeployment environment label (used for Sentry environment tagging).
LEMON_GATEWAY_NODE_COOKIE
(alias: LEMON_GATEWAY_COOKIE)
string(none)yeslemon_coreDistributed Erlang cookie for the gateway node.
LEMON_GATEWAY_NODE_NAMEstringlemonlemon_coreDistributed Erlang node name for the gateway.
LEMON_PATHstring(none)lemon_coreLemon source checkout root, set by the source launchers; locates source-only assets such as the browser driver build.
LEMON_RELEASE_CHANNELstring(none)lemon_coreRelease channel label (stable/beta/etc), falls back to inferring from RELEASE_VSN.
LEMON_RUNTIME_PROFILEstring(none)lemon_coreNamed runtime profile selecting a bundle of feature defaults.
LEMON_TEST_ALLOW_LIVE_CREDENTIALSbooleanfalselemon_coreTest-only opt-in to allow hermetic tests to use real provider credentials.
PI_DEBUGstring(none)coding_agentSet to 1 to enable CodingAgent.Config debug mode (DEBUG=1 also enables it).

Skills ​

Env VarTypeDefaultSecretAppsDescription
LEMON_AGENT_IDstringdefaultlemon_skillsDefault agent id used by mix lemon.skill CLI operations.
LEMON_HARNESS_SKILLS_DIRstring(none)lemon_skillsOverride directory for harness/eval skill fixtures.
LEMON_MCP_DISABLEDbooleanfalselemon_skillsKill switch to disable all MCP tool sources.
LEMON_MCP_EXTERNAL_DISCOVERYbooleantruelemon_skillsSet to 0/false/no to stop importing MCP servers from other tools' config files.
LEMON_MCP_EXTERNAL_USER_DISCOVERYbooleanfalselemon_skillsSet to 1/true/yes to also import MCP servers from other tools' user-level (~/) configs.
LEMON_MCP_SERVERSstring(none)lemon_skillsJSON-encoded list of MCP server configs, overriding the TOML/app config.

Store ​

Env VarTypeDefaultSecretAppsDescription
LEMON_STORE_DB_PATHstring(none)lemon_coreOverride path for the SQLite store database file.
LEMON_STORE_PATHstring(none)lemon_coreOverride path for the primary JSONL/SQLite data store; required and absolute for the production sim UI.

Terminal docker ​

Env VarTypeDefaultSecretAppsDescription
LEMON_DOCKER_TERMINAL_CPUSstring(none)lemon_coreCPU limit for the Docker terminal backend container.
LEMON_DOCKER_TERMINAL_IMAGEstring(none)lemon_coreDocker image used for the Docker terminal backend.
LEMON_DOCKER_TERMINAL_MEMORYstring(none)lemon_coreMemory limit for the Docker terminal backend container.
LEMON_DOCKER_TERMINAL_NETWORKstringnonelemon_coreDocker network mode for the Docker terminal backend container.
LEMON_DOCKER_TERMINAL_PIDS_LIMITstring(none)lemon_coreProcess count limit for the Docker terminal backend container.
LEMON_DOCKER_TERMINAL_READ_ONLY_ROOTFSbooleantruelemon_coreWhether the Docker terminal backend mounts a read-only root filesystem.
LEMON_DOCKER_TERMINAL_TMPFS_SIZEstring(none)lemon_coretmpfs size for the Docker terminal backend's writable /tmp mount.

Terminal ssh ​

Env VarTypeDefaultSecretAppsDescription
LEMON_SSH_TERMINAL_CONNECT_TIMEOUTstring10lemon_coreSSH connect timeout (seconds) for the SSH terminal backend.
LEMON_SSH_TERMINAL_IDENTITY_FILEstring(none)yeslemon_coreSSH identity (private key) file for the SSH terminal backend.
LEMON_SSH_TERMINAL_PORTstring22lemon_coreSSH port for the SSH terminal backend.
LEMON_SSH_TERMINAL_STRICT_HOST_KEY_CHECKINGstringyeslemon_coreSSH StrictHostKeyChecking setting for the SSH terminal backend.
LEMON_SSH_TERMINAL_TARGETstring(none)lemon_coreSSH target (user@host) for the SSH terminal backend.
LEMON_SSH_TERMINAL_USER_KNOWN_HOSTS_FILEstring(none)lemon_coreKnown-hosts file used by the SSH terminal backend.
LEMON_SSH_TERMINAL_WORKDIRstring(none)lemon_coreRemote working directory for the SSH terminal backend.

Tools browser ​

Env VarTypeDefaultSecretAppsDescription
LEMON_BROWSER_PROVIDERstringautolemon_coreBrowser provider id; auto prefers connected LCU, then relay, then local.

Tools disclosure ​

Env VarTypeDefaultSecretAppsDescription
LEMON_TOOL_DISCLOSURE_BUDGET_TOKENSinteger40000lemon_coreEstimated tool-schema token total above which long-tail tools are hidden behind tool_search/tool_invoke.
LEMON_TOOL_DISCLOSURE_CATALOG_TOKENSinteger2000lemon_coreToken budget for the hidden-tool catalog digest embedded in the tool_search description.
LEMON_TOOL_DISCLOSURE_ENABLEDbooleantruelemon_coreWhether tool-schema progressive disclosure may activate under the selected profile.
LEMON_TOOL_DISCLOSURE_PROFILEstringlegacylemon_coreTool disclosure profile: legacy defers only the MCP/extension/WASM long tail over budget; coding also defers optional built-ins outside the coding core.

Tools wasm ​

Env VarTypeDefaultSecretAppsDescription
LEMON_WASM_AUTO_BUILDbooleantruelemon_coreWhether WASM tools are auto-built from source on load.
LEMON_WASM_CACHE_COMPILEDbooleantruelemon_coreWhether compiled WASM modules are cached on disk.
LEMON_WASM_CACHE_DIRstring``lemon_coreDirectory used for the compiled WASM module cache.
LEMON_WASM_DEFAULT_FUEL_LIMITinteger10000000lemon_coreDefault WASM interpreter fuel (execution-step) limit.
LEMON_WASM_DEFAULT_MEMORY_LIMITbytes (B/KB/MB/GB)10485760lemon_coreDefault WASM tool memory limit (accepts B/KB/MB/GB suffixes).
LEMON_WASM_DEFAULT_TIMEOUT_MSinteger60000lemon_coreDefault WASM tool execution timeout, in milliseconds.
LEMON_WASM_ENABLEDbooleanfalselemon_coreWhether the WASM tool runtime is enabled.
LEMON_WASM_MAX_TOOL_INVOKE_DEPTHinteger4lemon_coreMaximum nested WASM tool invocation depth.
LEMON_WASM_RUNTIME_PATHstring``lemon_corePath to the WASM runtime executable/library.
LEMON_WASM_TOOL_PATHSlist (comma-separated)[]lemon_coreComma-separated extra directories to search for WASM tools.

Tools web ​

Env VarTypeDefaultSecretAppsDescription
LEMON_AUTO_RESIZE_IMAGESbooleantruelemon_coreWhether oversized images are auto-resized before being sent to a model.
LEMON_FIRECRAWL_API_KEYstring(none)yeslemon_coreFirecrawl API key.
LEMON_FIRECRAWL_BASE_URLstringhttps://api.firecrawl.devlemon_coreFirecrawl API base URL.
LEMON_FIRECRAWL_ENABLEDboolean(none)lemon_coreWhether Firecrawl is used as the webfetch backend. Tri-state (nil = undecided, falls through to TOML/default); recognizes "true"/"1"/"yes" and "false"/"0"/"no" only -- not the "on"/"off" spellings most other booleans in this registry accept. Resolved with bespoke logic in LemonCore.Config.Tools.resolve_firecrawl/1, not the standard :boolean cast.
LEMON_PERPLEXITY_API_KEYstring(none)yeslemon_corePerplexity API key used by the web search provider.
LEMON_PERPLEXITY_BASE_URLstring(none)lemon_corePerplexity API base URL override.
LEMON_PERPLEXITY_MODELstringperplexity/sonar-prolemon_corePerplexity model id used for web search.
LEMON_WEB_CACHE_MAX_ENTRIESinteger100lemon_core, coding_agentMaximum entries retained in the web cache.
LEMON_WEB_CACHE_PATHstring(none)lemon_core, coding_agentPath override for the persistent web cache file.
LEMON_WEB_CACHE_PERSISTENTbooleantruelemon_core, coding_agentWhether the webfetch/websearch cache persists to disk.
LEMON_WEB_FETCH_ALLOWED_HOSTNAMESlist (comma-separated)[]lemon_coreComma-separated hostname allowlist for webfetch.
LEMON_WEB_FETCH_ALLOW_PRIVATE_NETWORKbooleanfalselemon_coreWhether webfetch is allowed to reach private/internal network addresses.
LEMON_WEB_FETCH_CACHE_TTLinteger15lemon_coreWebfetch result cache TTL, in minutes.
LEMON_WEB_FETCH_ENABLEDbooleantruelemon_coreWhether the webfetch tool is enabled.
LEMON_WEB_FETCH_MAX_CHARSinteger50000lemon_coreMaximum characters of fetched page content returned to the model.
LEMON_WEB_FETCH_MAX_REDIRECTSinteger3lemon_coreMaximum HTTP redirects followed by webfetch.
LEMON_WEB_FETCH_READABILITYbooleantruelemon_coreWhether webfetch runs readability extraction on HTML pages.
LEMON_WEB_FETCH_TIMEOUTinteger30lemon_coreWebfetch request timeout, in seconds.
LEMON_WEB_FETCH_USER_AGENTstringMozilla/5.0 (Macintosh; Intel Mac OS X 14_7_2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36lemon_coreUser-Agent header sent by webfetch.
LEMON_WEB_SEARCH_API_KEYstring(none)yeslemon_coreAPI key for the configured web search provider.
LEMON_WEB_SEARCH_CACHE_TTLinteger15lemon_coreWeb search result cache TTL, in minutes.
LEMON_WEB_SEARCH_ENABLEDbooleantruelemon_coreWhether the web search tool is enabled.
LEMON_WEB_SEARCH_FAILOVER_ENABLEDbooleantruelemon_coreWhether web search falls over to a secondary provider on failure.
LEMON_WEB_SEARCH_FAILOVER_PROVIDERstring(none)lemon_coreSecondary web search provider id used on failover.
LEMON_WEB_SEARCH_MAX_RESULTSinteger5lemon_coreMaximum results returned per web search call.
LEMON_WEB_SEARCH_PROVIDERstringbravelemon_coreWeb search provider id (e.g. brave, perplexity).
LEMON_WEB_SEARCH_TIMEOUTinteger30lemon_coreWeb search request timeout, in seconds.

Tui ​

Env VarTypeDefaultSecretAppsDescription
LEMON_TUI_DEBUGbooleanfalselemon_core, lemon_cliWhether the terminal UI runs in debug mode.
LEMON_TUI_THEMEstringlemonlemon_core, lemon_cliTerminal UI theme name.

Released under the MIT License.