Skip to content

Memory Settings

Memory settings live in ~/.ptah/settings.json under the memory.* prefix. Edit them through Settings → Memory in the desktop app.

KeyDefaultWhat it does
memory.enabledtrueMaster kill-switch for the whole memory subsystem
memory.curatorEnabledtrueWhen false, no extraction or resolution runs
memory.tierLimits.core256Cap on the core tier; the weakest memory is demoted when full
memory.tierLimits.recall4096Cap on the recall tier
memory.tierLimits.archival100000Cap on the archival tier
memory.decayHalflifeDays30Half-life of unused memories’ salience
memory.embeddingModelXenova/bge-small-en-v1.5Embedder (transformers.js, runs in a worker)
memory.curatorModel(empty)LLM used by the curator and resolver stages; empty rides the active model
memory.curatorProvider(empty)Curator provider id; empty rides the active provider, otherwise the curator runs on the chosen provider independently of chat
memory.searchTopK20Number of hits returned per query
memory.searchAlpha0.5RRF weight: 1.0 = pure BM25, 0.0 = pure vector
memory.symbolInjectionEnabledtrueInject matching code symbols alongside curated memories

Memory does not run only at compaction. Each trigger below can fire a curate pass.

KeyDefaultWhat it does
memory.triggers.preCompacttrueCurate the turns that are about to be compacted
memory.triggers.idleMs600000Curate after this much idle time (10 minutes)
memory.triggers.turnThreshold20Curate once this many turns have accumulated
memory.triggers.bootScantrueScan for uncurated sessions at startup
memory.triggers.userPromptSubmit.enabledtrueRetrieve memories when your prompt contains a recall cue
memory.triggers.userPromptSubmit.cueList(list)The phrases that count as a recall cue
memory.triggers.userPromptSubmit.minPromptLength20Ignore prompts shorter than this
memory.triggers.postToolUse.enabledtrueCurate after a tool call completes
memory.triggers.maxCuratesPerHour20Hard ceiling on curate passes per hour, across all triggers

Memory state lives in ~/.ptah/ptah.db (shared SQLite database) across these tables:

  • memories — primary row per memory
  • memory_chunks — retrieval shards
  • memory_chunks_fts — FTS5 BM25 index
  • memory_chunks_vec — sqlite-vec embedding index