Skip to content

Environment Variables

KaaS supports environment variables to override configuration values. This is useful for containerized deployments where you want to keep secrets out of config files.

Variable Reference

Environment VariableOverridesDefaultDescription
LLM_API_KEY[llm] api_key(empty)OpenAI-compatible API key
LLM_BASE_URL[llm] base_urlhttps://api.openai.com/v1API endpoint URL
LLM_MODEL[llm] modelgpt-4o-miniModel name
LLM_SUMMARIZE_MODEL[llm] summarize_model(same as model)Summarization model
KAAS_MCP_ENABLED[ai.mcp] enabledfalseEnable MCP endpoint
KAAS_MCP_TOKEN[ai.mcp] token(empty)MCP bearer token
KAAS_WEB_DIR[server] web_dir/app/web/distStatic web assets path
KAAS_AI_MCP_URL[ai] mcp_url(empty)Deprecated — use KAAS_MCP_ENABLED
KAAS_KB_DIR./dataKnowledge base directory (for kb-ai CLI)
KAAS_DAEMON_MAX_WORKERS8Daemon thread pool size

Priority

Environment variables take precedence over values in kaas.toml. The resolution order is:

  1. Environment variable (highest priority)
  2. Config file (kaas.toml)
  3. Built-in default