Skip to main content

Environment variables

The engine reads these at the moment it needs them, so a change applies to the next run.

Model providers​

VariableUsed for
ANTHROPIC_API_KEYmodel.anthropic(...)
OPENAI_API_KEYmodel.openai(...), and createEmbeddings({ provider: "openai" })
GEMINI_API_KEY or GOOGLE_API_KEYmodel.gemini(...)
MISTRAL_API_KEYmodel.mistral(...), and createEmbeddings() (Mistral is the default provider)
OPENROUTER_API_KEYmodel.openrouter(...)
MINIMAX_API_KEYmodel.minimax(...)
HF_TOKEN or HUGGINGFACE_API_KEYmodel.huggingface(...)
AILU_USE_OLLAMA=1, AILU_OLLAMA_BASE_URLTurn on model.ollama(...); the server URL (default http://localhost:11434/v1).
AILU_USE_LMSTUDIO=1, AILU_LMSTUDIO_BASE_URLTurn on model.lmstudio(...); the server URL (default http://localhost:1234/v1).
The variable you name in apiKeyEnvThe key for a model.openaiCompatible(...) endpoint.
AILU_LLM_MOCK=1Offline mode: calls without a key answer from the deterministic mock instead of failing. For tests and CI.
AILU_HTTP_READ_TIMEOUT_SECSHow long to wait for a model response. Default 600.

Governance​

VariableUsed for
AILU_SECRETS_POLICY=blockFail a model call that contains a secret, instead of masking the secret.
AILU_SECRETS_REDACTOR_URL, AILU_SECRETS_REDACTOR_TOKENAn extra secrets-detection service, after the built-in one.
AILU_PII_REDACTOR_URL, AILU_PII_REDACTOR_TOKENA personal-data redaction service.
AILU_PII_REDACTOR_FAIL_CLOSED=1Don't send the text when the redaction service is unreachable.
AILU_LLM_RECORD=1Record model calls and timestamps, for replay.

Agents and retrieval​

VariableUsed for
AILU_FS_BACKEND_URL, AILU_FS_BACKEND_TOKENA storage service for the agents' virtual filesystem, instead of memory.
AILU_RERANK_ENDPOINTA cross-encoder service for components.reranker.
AILU_LLMLINGUA_URL, AILU_LLMLINGUA_RATE, AILU_LLMLINGUA_MIN_CHARSA prompt-compression service for the compress middleware; the rate (default 0.5) and the shortest prompt it compresses.
TAVILY_API_KEYcomponents.webSearch.

Observability​

VariableUsed for
AILU_OTEL_EXPORTER_URLThe default endpoint of exportTracesToOtlp.