Skip to content
DocsOperate it

Configuration

A store is configured by one TOML settings file. Select it with the TESS_MEMORY_SETTINGS environment variable, in your shell and in each MCP registration:

Shell
export TESS_MEMORY_SETTINGS=~/.tess-memory/settings.toml

Precedence is: built-in defaults, then the settings file, then environment variables.

A path to a settings file that does not exist is an error. Relative paths inside the file are resolved against the file's own directory, so a store behaves the same wherever a command is run from.

A complete example

toml
# ---- sources: where sessions are read from ---------------------------------
[[data_stores]]
name = "claude-code"
type = "claude-code"
path = "~/.claude/projects"
exclude = ["-private-var-folders*", "-private-tmp-*"]

[[data_stores]]
name = "codex"
type = "codex"
path = "~/.codex"

# ---- storage ----------------------------------------------------------------
[storage]
data_dir = "~/.tess-memory"

# ---- distillation -----------------------------------------------------------
[llm]
settings = "~/.tess-memory/providers.yaml"
profile = "strong"
fallback_profile = "cheap"
workers = 4

# ---- retrieval agent --------------------------------------------------------
[search]
agent = true
profile = "cheap"
max_rounds = 4
queries_per_round = 3
per_query_limit = 8
evidence_limit = 12

# ---- embeddings -------------------------------------------------------------
[embedding]
provider = "local"
local_model = "BAAI/bge-small-en-v1.5"
allow_download = true
batch_size = 64

# ---- ingestion --------------------------------------------------------------
[ingest]
quiet_seconds = 900
incremental = true
max_model_calls_per_run = 128

# ---- ranking ----------------------------------------------------------------
[retrieval]
half_life_days = 30
weights = { semantic = 0.55, bm25 = 0.20, importance = 0.15, recency = 0.10 }
per_session_cap = 3
default_limit = 8

Sections

[[data_stores]]

One entry per source. See Sources.

[storage]

KeyMeaning
data_dirThe store's directory: memory.db and its caches

[llm]

KeyMeaning
settingsPath to the provider file
profileThe profile used for distillation
model, reasoning_effortOptional overrides for this store
fallback_profileTried when the primary fails or refuses. Omit to disable.
fallback_model, fallback_reasoning_effortOptional overrides for the fallback
workersDistillation calls in parallel

See Models and embeddings.

KeyDefaultMeaning
agenttrueRun the retrieval agent. false gives plain hybrid search.
profileThe profile the retrieval agent uses
max_rounds4Model calls per search
queries_per_round3Sub-queries per round
per_query_limit8Results taken from each sub-query
evidence_limit12Most evidence returned

[embedding]

KeyMeaning
providerlocal, or a profile name
dimsVector size, for hosted models
local_modelThe local model to use
allow_downloadAllow fetching the local model. Off by default.
query_prefix, passage_prefixText put before a query or a passage, for models that expect one
send_dimensionsWhether a hosted model is sent the dims it should return. Set false for a service that rejects the field.
batch_sizeTexts per embedding request

[ingest]

KeyDefaultMeaning
quiet_seconds0Wait this long after a session's last write before processing it
incrementalfalseProcess only the new, completed part of a grown session
segment_workers1Parallel segments per session
max_model_calls_per_run0Cap on model calls per run. 0 is unlimited.
aggregate_refresh_seconds0Minimum interval between refreshes of a profile or digest
cache_retention_days30How long unused checkpoints are kept
max_transcript_chars150000Above this, a session is split into segments
segment_chars, segment_overlap, max_segmentsSegment size, overlap and count
chunk_chars6000Size of a searchable chunk
min_session_chars200Skip sessions shorter than this
min_importance0.25Drop memories rated below this
profile_session_limit30Sessions read to build a project profile
digest_session_limit40Sessions read to build a weekly digest

See Ingestion.

[retrieval]

KeyDefaultMeaning
weights0.55 / 0.20 / 0.15 / 0.10Meaning, keywords, importance, recency
half_life_days30How fast recency fades
candidate_pool100Candidates per signal before they are combined
per_session_cap3Most results from one session
default_limit8Results when the caller does not say

[planning]

KeyMeaning
default_projectThe project plan calls use when none is given
lock_writes_to_defaultRefuse plan writes to any other project

See The plan board.

[identity] and [visibility]

Who is reading, and who may read what. See Teams and visibility.

[codex]

Options for Codex sources. See Sources.

[personal]

Personal memory. See Personal memory.

Environment variables

For MCP registrations and scheduled jobs that should not depend on a file:

VariableOverrides
TESS_MEMORY_SETTINGSWhich settings file to use
TESS_MEMORY_DATAstorage.data_dir
TESS_MEMORY_SOURCEReplaces the sources with one Claude Code source at this path
TESS_MEMORY_USERidentity.user
TESS_MEMORY_ENGINE_SETTINGSllm.settings
TESS_MEMORY_ENGINE_PROFILEllm.profile
TESS_MEMORY_SEARCH_AGENTsearch.agent (0 turns the retrieval agent off)
TESS_MEMORY_SEARCH_PROFILEsearch.profile
TESS_MEMORY_EMBED_PROVIDERembedding.provider
TESS_MEMORY_EMBED_DIMSembedding.dims
TESS_MEMORY_EMBED_MODELembedding.local_model

Credentials

Keys are never written in the settings file or the provider file. A provider profile names an environment variable, and the key is read from the environment of the process. For a background service with no shell environment, a provider file written as JSON may carry an env map whose values are exported to the process; keep that file readable only by you.

Embedding Tess Memory in an application

An application that hosts Tess Memory, rather than a person running it, passes a JSON manifest instead of a TOML file. The manifest names the runtime home and the provider registry explicitly, and nothing is discovered from the environment.

Found a mistake? Edit this page on GitHub.