Docs/Environment Variables

Environment Variables

Complete reference for all environment variables Hybrix reads at startup. Store these in a .env file in your project root.

LLM provider keys

VariableProviderRequired
ANTHROPIC_API_KEYAnthropic (Claude)If using Anthropic agents
OPENAI_API_KEYOpenAI (GPT)If using OpenAI agents
GOOGLE_AI_KEYGoogle (Gemini)If using Google agents
MISTRAL_API_KEYMistralIf using Mistral agents
OLLAMA_HOSTOllama (local)Only if non-default host

Channel tokens

VariableChannelNotes
DISCORD_BOT_TOKENDiscordFrom the Discord Developer Portal
SLACK_BOT_TOKENSlackxoxb- prefixed bot token
SLACK_SIGNING_SECRETSlackFor verifying request signatures
TELEGRAM_BOT_TOKENTelegramFrom @BotFather

Gateway and system

VariableDefaultDescription
HYBRIX_PORT3000HTTP port for the gateway
HYBRIX_HOST127.0.0.1Bind address for the gateway
HYBRIX_LOG_LEVELinfoLog verbosity: debug, info, warn, error
HYBRIX_CONFIG_PATH./hybrix.config.jsonPath to config file
HYBRIX_SECRET(generated)Session encryption secret

Example .env file

env
# LLM Providers
ANTHROPIC_API_KEY=sk-ant-api03-...
OPENAI_API_KEY=sk-proj-...

# Channels
DISCORD_BOT_TOKEN=MTIz...
SLACK_BOT_TOKEN=xoxb-...
SLACK_SIGNING_SECRET=abc123...

# Gateway
HYBRIX_PORT=3000
HYBRIX_LOG_LEVEL=info
Never commit your .env file to version control. The hybrix init command automatically adds it to .gitignore.
Use hybrix env check to verify all required environment variables are set before starting the gateway.