This public reference tracks the complete memtomem 0.7.13 configuration surface. Options are intentionally mirrored here rather than reduced to a curated subset. STM settings (prefix MEMTOMEM_STM_) are listed in STM Environment Variables.
Local ONNX precision: fp32, int8-arm64, int8-avx2, int8-avx512, or int8-avx512-vnni. Changing it requires a restart and an explicit index migration.
"fp32"
MEMTOMEM_EMBEDDING__ONNX_ARTIFACT_PATH
Directory holding a locally exported quantized artifact with a checksummed manifest.json. Required for every non-fp32 variant; there is no automatic fallback.
""
MEMTOMEM_EMBEDDING__BASE_URL
Ollama / OpenAI-compatible endpoint
""
MEMTOMEM_EMBEDDING__API_KEY
API key for paid providers
""
MEMTOMEM_EMBEDDING__BATCH_SIZE
Texts per embedding batch
64
MEMTOMEM_EMBEDDING__ONNX_BATCH_SIZE
Texts per local FastEmbed/ONNX inference batch; runtime-mutable
8
MEMTOMEM_EMBEDDING__MAX_SEQUENCE_TOKENS
Actual-token cap per local ONNX input; 0 restores the model limit, except under the E5 profile noted below. Restart after changing it and force-reindex existing content so vectors use one policy.
1024
MEMTOMEM_EMBEDDING__ONNX_CPU_MEM_ARENA
Reuse ONNX CPU allocations. Restart required; this allocator-only switch does not require re-indexing.
false
MEMTOMEM_EMBEDDING__MAX_CONCURRENT_BATCHES
Max parallel embedding batches
4
MEMTOMEM_EMBEDDING__THREADS
ONNX Runtime thread cap (0 = ORT default)
4
MEMTOMEM_EMBEDDING__PROGRESS_THRESHOLD
Emit per-chunk progress only when a file produces more chunks than this threshold; 0 always emits
32
Effective defaults under the ONNX E5 profile. With PROVIDER=onnx and no MODEL, Core selects multilingual-e5-small and fills in DIMENSION=384, MAX_SEQUENCE_TOKENS=512, THREADS=2 and ONNX_BATCH_SIZE=4 for every one of those you leave unset. The Default column above is the declared default, which is what applies outside that profile. Inside it, a DIMENSION other than 384 and a MAX_SEQUENCE_TOKENS other than 512 are rejected at startup rather than adjusted — including the declared 0 and 1024, if you set them explicitly.
Directories reactively re-indexed by the long-running memtomem-server file watcher (JSON list). Pre-existing files are not auto-scanned — seed them once with mm index <dir>, then the watcher picks up further edits. Populated by mm init when you opt in to AI agent memory enrollment.
["~/.memtomem/memories"]
MEMTOMEM_INDEXING__PROJECT_MEMORY_DIRS
Project-tier memory roots under .memtomem/memories or .memtomem/memories.local
[]
MEMTOMEM_INDEXING__READ_ONLY_MEMORY_DIRS
Roots memtomem indexes and searches but never rewrites. Must be disjoint from the writable roots.
[]
MEMTOMEM_INDEXING__RETAIN_MISSING_DIRS
Directories whose files other tools delete on their own (Claude Code plans, Codex memories), where the indexed chunks are the only copy left. A missing source under one of these that is also under an index root stays searchable instead of being held, and is not offered for purge. Not an index root itself, and a source held for another reason (redaction_blocked, scan_unavailable) stays held. (JSON list, APPEND merge)
Deprecated one-shot migration trigger. Existing configs convert detected provider directories into explicit memory_dirs, persist them, and flip this field to false; new installs skip the migration. Use mm init --include-provider ... for new configuration.
true
MEMTOMEM_INDEXING__EXCLUDE_PATTERNS
.gitignore-syntax patterns (JSON list) that stack on top of the built-in credential denylist (oauth_creds.json, credentials*, id_rsa*, *.pem, *.key, .ssh/**, …). User !negation cannot override the built-in secret patterns.
[]
MEMTOMEM_INDEXING__INDEX_MASKING_MANIFEST_PATH
Owner-reviewed masking manifest naming exact source paths, content SHA-256 values, and complete-block line spans. A changed source or an invalid manifest falls back to the normal privacy guard, and masked chunks are read-only. It does not enable automatic masking.
""
MEMTOMEM_INDEXING__TARGET_CHUNK_TOKENS
Greedy semantic-pack target for short sibling sections. Set 0 to disable the pack pass.
384
MEMTOMEM_INDEXING__CHUNK_OVERLAP_TOKENS
Token overlap between adjacent chunks
0
MEMTOMEM_INDEXING__CHUNK_MODEL_TOKENS
Composed retrieval-input ceiling, including special tokens
8192
MEMTOMEM_INDEXING__CHUNK_CONTEXT_TOKENS
Separate budget for the heading and description prefix
512
MEMTOMEM_INDEXING__HARD_MAX_CHUNK_TOKENS
Exact body ceiling; 0 disables hard-budget mode. Requires a matching local tokenizer.
0
MEMTOMEM_INDEXING__CHUNK_TOKENIZER_PATH
Local tokenizer.json for the embedding model, so hard-budget mode downloads no model
""
MEMTOMEM_INDEXING__CHUNK_INPUT_PREFIX
Exact model-role prefix counted in the final input token budget (E5 uses passage: ). Restart required.
""
MEMTOMEM_INDEXING__ENRICH_CHUNK_CONTEXT
Add cached LLM descriptions to the chunk context. Requires hard-budget mode.
false
MEMTOMEM_INDEXING__STRUCTURED_CHUNK_MODE
JSON/YAML/TOML chunking mode: original or recursive
"original"
MEMTOMEM_INDEXING__PARAGRAPH_SPLIT_THRESHOLD
Split long prose into paragraphs above this token count
800
MEMTOMEM_INDEXING__STARTUP_BACKFILL
On server start, run a one-shot scan over memory_dirs to catch files added while the server was down
false
MEMTOMEM_INDEXING__WATCHER_BACKEND
Watch backend: auto polls on macOS and uses native events elsewhere; native or polling override it
"auto"
MEMTOMEM_INDEXING__WATCHER_POLL_INTERVAL_MS
How often the polling backend rescans the watched directories, 100–60000 ms; the native backend ignores it. A shorter interval picks an edit up sooner and costs more CPU while idle, in every server process that watches. A change undone between two scans is not seen. Restart the server to apply a change
10000
MEMTOMEM_INDEXING__WATCHER_DEBOUNCE_MS
Quiet period before automatic re-indexing, 1–30000 ms
5000
MEMTOMEM_INDEXING__WATCHER_MAX_WAIT_MS
Maximum event-collection window, 1–30000 ms, even under continuous edits
30000
MEMTOMEM_INDEXING__AUTO_SUMMARIZE
Generate AI per-source summaries when LLM is configured
Path-glob → namespace mappings that auto-tag files at index time, so you don’t pass namespace= on every mem_index call.
Variable
Description
Default
MEMTOMEM_NAMESPACE__RULES
JSON list of {path_glob, namespace} objects. pathspec.GitIgnoreSpec patterns, case-insensitive. {parent} and {ancestor:N} placeholders expand from the matched file path. Resolution order when a file is indexed: explicit namespace= param → the namespace its stored rows share → the namespace its day-file name declares (0.7.5+) → session binding → rules (first match) → enable_auto_ns → default_namespace. Since 0.7.2, a rule whose expanded namespace contains , or *, is !system, is blank, or is an agent-runtime: name the agent tools refuse is skipped like a rule whose placeholder expands to nothing, and resolution moves on.
[]
MEMTOMEM_NAMESPACE__DEFAULT_NAMESPACE
Default namespace for new chunks. Since 0.7.2, a value that fails the same check stores chunks untagged (default), and mm config set refuses it
"default"
MEMTOMEM_NAMESPACE__ENABLE_AUTO_NS
Derive namespace from a file’s immediate parent folder when no explicit namespace or rule applies
false
Example (via config.d/namespace.json, APPEND-merged):
Cross-encoder reranking runs fully locally by default — no external API required.
Variable
Description
Default
MEMTOMEM_RERANK__ENABLED
Enable reranking of hybrid search results; runtime-mutable
false
MEMTOMEM_RERANK__PROVIDER
fastembed (local ONNX) / cohere (external API) / local (sentence-transformers CrossEncoder, local). local needs sentence-transformers installed separately; no memtomem extra includes it. MEMTOMEM_RERANK__MODEL then takes a sentence-transformers model name (e.g. cross-encoder/ms-marco-MiniLM-L-6-v2). fastembed is usually preferable
"fastembed"
MEMTOMEM_RERANK__MODEL
Model name; its form depends on the provider (a fastembed catalog ID, a Cohere Rerank model, or a sentence-transformers model name). With fastembed, for non-English content use onnx-community/gte-multilingual-reranker-base (341 MB; memtomem registers it with fastembed itself, so it needs no setup). jinaai/jina-reranker-v2-base-multilingual still works but is 1.1 GB and its model license (CC-BY-NC-4.0) does not allow commercial use. No mm init preset turns reranking on, so pair the model with MEMTOMEM_RERANK__ENABLED=true
"Xenova/ms-marco-MiniLM-L-6-v2"
MEMTOMEM_RERANK__API_KEY
Only required when provider=cohere
""
MEMTOMEM_RERANK__OVERSAMPLE
Pool multiplier over response_top_k. Pool size is max(response_top_k, min_pool, min(max_pool, int(oversample * response_top_k))).
2
MEMTOMEM_RERANK__MIN_POOL
Floor — reranker never sees fewer candidates than this
20
MEMTOMEM_RERANK__MAX_POOL
Cap on the oversampled pool; a larger top_k or min_pool still wins
200
MEMTOMEM_RERANK__TOP_K
Deprecated legacy pool size; migrates to min_pool when present
RRF weights for [BM25, Dense] (JSON list, REPLACE merge)
[1,1]
MEMTOMEM_SEARCH__TOKENIZER
FTS tokenizer: unicode61 or kiwipiepy
"unicode61"
MEMTOMEM_SEARCH__CACHE_TTL
Search result cache TTL in seconds
30
MEMTOMEM_SEARCH__SYSTEM_NAMESPACE_PREFIXES
Namespace prefixes hidden from default namespace=None search (JSON list, APPEND merge). namespace="!system" applies the same exclusion explicitly, so it also overrides an active session or agent namespace; it is valid only as the whole value
core (9 names incl. mem_do) / standard (39) / full (94 current tools; no deprecated aliases)
core
MEMTOMEM_EXTRA_TOOLS
Comma-separated registered tool names to expose individually on top of MEMTOMEM_TOOL_MODE, e.g. mem_update_coverage. Read at server startup; unknown names are logged and ignored
prod (standard Simple/Advanced pages, including Namespaces under Settings) / dev (also adds maintainer pages: Sessions, Search Runs, Quality Lab, Working Memory, Procedures, Health Report, Redaction). mm web --mode and mm web --dev override this at launch.
prod
MEMTOMEM_WEB__HOST
Bind address for mm web; overridden by --host
127.0.0.1
MEMTOMEM_WEB__PORT
Bind port for mm web; overridden by --port
8080
MEMTOMEM_WEB__CSRF_ENFORCE
Enforce CSRF protection on mutating Web UI endpoints. Disable only as an emergency rollback.
Run PolicyScheduler (auto_archive / auto_promote / auto_expire / auto_tag)
false
MEMTOMEM_POLICY__SCHEDULER_INTERVAL_MINUTES
Scheduler tick interval
60
MEMTOMEM_POLICY__MAX_ACTIONS_PER_RUN
Cumulative action cap per scheduled policy run
100
MEMTOMEM_WEBHOOK__ENABLED
Enable outbound webhooks for memory events
false
MEMTOMEM_WEBHOOK__URL
Webhook target URL
""
MEMTOMEM_WEBHOOK__EVENTS
Event types to send (JSON list, APPEND merge)
["add","delete","search"]
MEMTOMEM_WEBHOOK__SECRET
HMAC signing secret
""
MEMTOMEM_WEBHOOK__TIMEOUT_SECONDS
HTTP timeout
10
MEMTOMEM_WEBHOOK__ALLOW_PRIVATE_HOSTS
Allow delivery to a receiver on this machine or LAN. When off, the URL’s host must not resolve to a private, loopback, link-local or reserved address, checked where the socket opens and not only at startup.
false
MEMTOMEM_WEBHOOK__PROXY
Explicit forward proxy (http:// or https://). Webhooks never use an ambient HTTP(S)_PROXY; with a proxy set, the proxy connects to the receiver and the address policy is the proxy’s to enforce.
Background loop for periodic health checks and automatic maintenance. Missing sources are held out of search rather than deleted (a source under both an index root and indexing.retain_missing_dirs stays searchable instead, unless it is held for another reason); purging their chunks is an explicit mm gc orphan-sources --apply.
Traces session command execution to a JSONL file and, optionally, to Langfuse. Off by default. payload_mode defaults to metadata, which records no payload body; redacted keeps a secret-masked body, and full keeps the entire body. Since 0.7.10 these settings cannot be changed through MCP: mem_config and mem_do(action="config") still read them but refuse a change and name the terminal command, mm config set session_trace.<field> <value>. mm config set and the Web UI’s PATCH /api/config still change them.
Variable
Description
Default
MEMTOMEM_SESSION_TRACE__ENABLED
Enable session execution tracing
false
MEMTOMEM_SESSION_TRACE__JSONL_ENABLED
Write to the JSONL sink
true
MEMTOMEM_SESSION_TRACE__JSONL_PATH
JSONL output file path
"~/.memtomem/traces/session-traces.jsonl"
MEMTOMEM_SESSION_TRACE__LANGFUSE_ENABLED
Emit traces to the Langfuse sink
false
MEMTOMEM_SESSION_TRACE__LANGFUSE_PUBLIC_KEY
Langfuse public key
""
MEMTOMEM_SESSION_TRACE__LANGFUSE_SECRET_KEY
Langfuse secret key
""
MEMTOMEM_SESSION_TRACE__LANGFUSE_HOST
Langfuse host URL
""
MEMTOMEM_SESSION_TRACE__SAMPLING_RATE
0.0–1.0. Fraction of sessions recorded
1
MEMTOMEM_SESSION_TRACE__PAYLOAD_MODE
metadata (no body) / redacted (secret-masked body) / full (entire body)
"metadata"
MEMTOMEM_SESSION_TRACE__MAX_PAYLOAD_CHARS
Char cap on payload retained in a trace
10000
Setting langfuse_enabled=true requires the langfuse extra installed and both the public and secret keys set; otherwise startup validation fails.
Experimental. When true, mem_dedup_scan prints, under each member of a candidate pair, what the store holds about it (heading, namespace, scope, tags, validity window, read-only flag, position in its source, relations and links) and a line naming the fields the two members differ on. The scan still selects and orders pairs the same way and changes nothing; output is about three times as long per pair. Set it in config.json or with this variable; mm config set and mem_config do not change it
Defaults above are schema declarations before initialization presets. mm init may change the provider, dimension, and memory directories. OTLP and Langfuse are independent opt-ins. Pass environment variables to the child MCP process and reconnect.