Skip to main content

Environment Variables Reference

All variables go in ~/.hermes/.env. You can also set them with hermes config set VAR value.

LLM Providers

VariableDescription
OPENROUTER_API_KEYOpenRouter API key (recommended for flexibility)
OPENAI_API_KEYAPI key for custom OpenAI-compatible endpoints (used with OPENAI_BASE_URL)
OPENAI_BASE_URLBase URL for custom endpoint (VLLM, SGLang, etc.)
HERMES_MODELPreferred model name (checked before LLM_MODEL, used by gateway)
LLM_MODELDefault model name (fallback when not set in config.yaml)
VOICE_TOOLS_OPENAI_KEYOpenAI key for TTS and voice transcription (separate from custom endpoint)
HERMES_HOMEOverride Hermes config directory (default: ~/.hermes)

Provider Auth (OAuth)

VariableDescription
HERMES_INFERENCE_PROVIDEROverride provider selection: auto, openrouter, nous (default: auto)
HERMES_PORTAL_BASE_URLOverride Nous Portal URL (for development/testing)
NOUS_INFERENCE_BASE_URLOverride Nous inference API URL
HERMES_NOUS_MIN_KEY_TTL_SECONDSMin agent key TTL before re-mint (default: 1800 = 30min)
HERMES_DUMP_REQUESTSDump API request payloads to log files (true/false)

Tool APIs

VariableDescription
FIRECRAWL_API_KEYWeb scraping (firecrawl.dev)
BROWSERBASE_API_KEYBrowser automation (browserbase.com)
BROWSERBASE_PROJECT_IDBrowserbase project ID
BROWSER_INACTIVITY_TIMEOUTBrowser session inactivity timeout in seconds
FAL_KEYImage generation (fal.ai)
ELEVENLABS_API_KEYPremium TTS voices (elevenlabs.io)
HONCHO_API_KEYCross-session user modeling (honcho.dev)
TINKER_API_KEYRL training (tinker-console.thinkingmachines.ai)
WANDB_API_KEYRL training metrics (wandb.ai)

Terminal Backend

VariableDescription
TERMINAL_ENVBackend: local, docker, ssh, singularity, modal
TERMINAL_DOCKER_IMAGEDocker image (default: python:3.11)
TERMINAL_DOCKER_VOLUMESAdditional Docker volume mounts (comma-separated host:container pairs)
TERMINAL_SINGULARITY_IMAGESingularity image or .sif path
TERMINAL_MODAL_IMAGEModal container image
TERMINAL_TIMEOUTCommand timeout in seconds
TERMINAL_LIFETIME_SECONDSMax lifetime for terminal sessions in seconds
TERMINAL_CWDWorking directory for all terminal sessions
SUDO_PASSWORDEnable sudo without interactive prompt

SSH Backend

VariableDescription
TERMINAL_SSH_HOSTRemote server hostname
TERMINAL_SSH_USERSSH username
TERMINAL_SSH_PORTSSH port (default: 22)
TERMINAL_SSH_KEYPath to private key

Container Resources (Docker, Singularity, Modal)

VariableDescription
TERMINAL_CONTAINER_CPUCPU cores (default: 1)
TERMINAL_CONTAINER_MEMORYMemory in MB (default: 5120)
TERMINAL_CONTAINER_DISKDisk in MB (default: 51200)
TERMINAL_CONTAINER_PERSISTENTPersist container filesystem across sessions (default: true)
TERMINAL_SANDBOX_DIRHost directory for workspaces and overlays (default: ~/.hermes/sandboxes/)

Messaging

VariableDescription
TELEGRAM_BOT_TOKENTelegram bot token (from @BotFather)
TELEGRAM_ALLOWED_USERSComma-separated user IDs allowed to use bot
TELEGRAM_HOME_CHANNELDefault channel for cron delivery
TELEGRAM_HOME_CHANNEL_NAMEDisplay name for home channel
DISCORD_BOT_TOKENDiscord bot token
DISCORD_ALLOWED_USERSComma-separated user IDs allowed to use bot
DISCORD_HOME_CHANNELDefault channel for cron delivery
DISCORD_HOME_CHANNEL_NAMEDisplay name for home channel
SLACK_BOT_TOKENSlack bot token (xoxb-...)
SLACK_APP_TOKENSlack app-level token (xapp-..., required for Socket Mode)
SLACK_ALLOWED_USERSComma-separated Slack user IDs
SLACK_HOME_CHANNELDefault Slack channel for cron delivery
WHATSAPP_ENABLEDEnable WhatsApp bridge (true/false)
WHATSAPP_MODEbot (separate number) or self-chat (message yourself)
WHATSAPP_ALLOWED_USERSComma-separated phone numbers (with country code)
MESSAGING_CWDWorking directory for terminal in messaging (default: ~)
GATEWAY_ALLOWED_USERSComma-separated user IDs allowed across all platforms
GATEWAY_ALLOW_ALL_USERSAllow all users without allowlist (true/false, default: false)

Agent Behavior

VariableDescription
HERMES_MAX_ITERATIONSMax tool-calling iterations per conversation (default: 60)
HERMES_TOOL_PROGRESSSend progress messages when using tools (true/false)
HERMES_TOOL_PROGRESS_MODEall (every call, default) or new (only when tool changes)
HERMES_HUMAN_DELAY_MODEResponse pacing: off/natural/custom
HERMES_HUMAN_DELAY_MIN_MSCustom delay range minimum (ms)
HERMES_HUMAN_DELAY_MAX_MSCustom delay range maximum (ms)
HERMES_QUIETSuppress non-essential output (true/false)
HERMES_EXEC_ASKEnable execution approval prompts in gateway mode (true/false)

Session Settings

VariableDescription
SESSION_IDLE_MINUTESReset sessions after N minutes of inactivity (default: 120)
SESSION_RESET_HOURDaily reset hour in 24h format (default: 4 = 4am)

Context Compression

VariableDescription
CONTEXT_COMPRESSION_ENABLEDEnable auto-compression (default: true)
CONTEXT_COMPRESSION_THRESHOLDTrigger at this % of limit (default: 0.85)
CONTEXT_COMPRESSION_MODELModel for summaries

Provider Routing (config.yaml only)

These go in ~/.hermes/config.yaml under the provider_routing section:

KeyDescription
sortSort providers: "price" (default), "throughput", or "latency"
onlyList of provider slugs to allow (e.g., ["anthropic", "google"])
ignoreList of provider slugs to skip
orderList of provider slugs to try in order
require_parametersOnly use providers supporting all request params (true/false)
data_collection"allow" (default) or "deny" to exclude data-storing providers
tip

Use hermes config set to set environment variables — it automatically saves them to the right file (.env for secrets, config.yaml for everything else).