Environment variables give you a runtime escape hatch for every setting inDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/xantorres/engram/llms.txt
Use this file to discover all available pages before exploring further.
config.toml. They are the right tool when you need per-session overrides, CI/CD pipelines, Docker containers, or secret injection without touching a file on disk. An environment variable always wins over the corresponding config-file key — no restart required.
Precedence order (highest to lowest): environment variable → config file value → built-in default. Only the highest-precedence source that is set takes effect.
Variable reference
| Variable | Config equivalent | Type | Default | Description |
|---|---|---|---|---|
ENGRAM_CONFIG | (config file path) | string | ~/.config/engram/config.toml | Absolute path to the TOML config file Engram reads at startup. |
ENGRAM_STORE | store.dir | string | ~/.local/share/engram | Directory Engram uses to persist the memory store. |
ENGRAM_EXTRACTOR_URL | extractor.base_url | string | http://localhost:1234/v1 | Base URL of the OpenAI-compatible extraction endpoint. |
ENGRAM_EXTRACTOR_MODEL | extractor.model | string | local-model | Model identifier sent in every extraction request. |
ENGRAM_EXTRACTOR_KEY | extractor.api_key | string | (none) | API key sent in Authorization: Bearer. Never written to the store. |
ENGRAM_AUTOPROMOTE | bridge.autopromote | boolean string | false | When truthy, engram sync --apply writes facts instead of dry-running. |
ENGRAM_BRIDGE_KIND_ALLOWLIST | bridge.kind_allowlist | comma-separated string | (none) | Restrict automatic promotion to these memory kinds only. |
Variable details
ENGRAM_CONFIG
Overrides the config file path entirely. Engram will read — and validate — the file at the path you supply instead of the default ~/.config/engram/config.toml. Useful for maintaining separate profiles or running integration tests with a clean config.
ENGRAM_STORE
Redirects the entire memory store to a different directory. Engram creates the directory on first write if it does not exist. All store subdirectories and files inherit the 0700 / 0600 permission policy regardless of where the store is located.
ENGRAM_EXTRACTOR_URL
Sets the base URL of the OpenAI-compatible chat completions endpoint used during engram harvest. Common values:
| Inference server | Value |
|---|---|
| LM Studio (default) | http://localhost:1234/v1 |
| Ollama | http://localhost:11434/v1 |
| OpenAI | https://api.openai.com/v1 |
ENGRAM_EXTRACTOR_MODEL
Forwarded verbatim as the model field in every extraction API request. Must match an identifier the inference server recognises.
ENGRAM_EXTRACTOR_KEY
The API key for authenticated inference endpoints. Setting it via environment variable is the recommended approach — it avoids writing secrets to config.toml and keeps the key out of disk-backed files entirely. Engram reads this value at startup and holds it only in memory.
ENGRAM_AUTOPROMOTE
Controls whether engram sync --apply performs real writes or stays in dry-run mode. The default is false — a deliberate safety gate.
Accepted truthy values (case-insensitive):
| Value | Accepted as true |
|---|---|
1 | ✅ |
true | ✅ |
yes | ✅ |
on | ✅ |
0, false, no, off, (unset) | ❌ (dry-run) |
Even with
ENGRAM_AUTOPROMOTE=true, tier-3 (curated-kind) facts and conflict-detected facts are never written automatically. They remain in the review queue until you run engram queue review with --confirm.ENGRAM_BRIDGE_KIND_ALLOWLIST
A comma-separated list of memory-kind identifiers. When set, the bridge only auto-promotes facts whose kind appears in the list. Whitespace around commas is ignored.
Valid (auto-promotable) kinds:
ConfigError at startup):
Per-shell export examples
Add these to your~/.bashrc, ~/.zshrc, or equivalent to make settings permanent for your login shell.
.env file example
If you use a tool like direnv or load .env files in your workflow, the following snippet covers a typical cloud-provider setup: