OMP Docs
Workflows

Memory

Carry durable preferences, decisions, and project knowledge into later sessions. Memory is off by default; choose a local or remote backend, control its…

Memory helps omp continue work without making you restate durable facts such as repository conventions, architectural decisions, and review preferences. It is separate from compaction: compaction shortens one session, while memory can affect future sessions.

Memory is off by default. If you want it, open /settings, select the Memory tab, and choose one backend. Start with mnemopi for searchable memory stored on this machine, local for automatic project summaries, hindsight when you already operate a Hindsight service, or sharpshooter when you want project decisions (architecture, product, style) captured automatically with almost no prompting.

Choose a backend

BackendUse it whenStorage and default scopeImportant trade-off
off (default)You do not want cross-session knowledge.No memory store.Existing session transcripts are unaffected; turning memory off does not delete them.
localYou want omp to periodically distill past persisted sessions into project guidance.Generated files on this machine, isolated by working directory.It is a batch summary pipeline, not a searchable store. You cannot review or forget one structured fact.
mnemopiYou want prompt-driven remember, recall, and forget behavior without a memory server.Local SQLite databases; per-project by default.The database is local, but the default smol LLM mode can send extraction work to your configured model provider.
hindsightYou want a remote bank, shared infrastructure, or Hindsight's synthesis and mental models.Your Hindsight server; per-project-tagged by default.Automatic retention is on by default, so conversation text leaves the machine.
sharpshooterYou want durable project decisions captured without writing them down: architecture, product and style choices emerge from friction in normal prompts.Markdown files on this machine (architecture.md, product.md, style.md per project).Only friction-gated decisions persist; ordinary facts and task state do not.

The smallest persistent setup from a shell is:

# Pick exactly one
omp config set memory.backend local
omp config set memory.backend mnemopi
omp config set memory.backend hindsight
omp config set memory.backend sharpshooter

# Confirm the effective setting
omp config get memory.backend

/settings writes the global config and switches the active backend when you save it. Shell or YAML changes apply to new omp processes. For one repository only, put the same keys in <repo>/.omp/config.yml; project settings override the global file. See Settings for paths and precedence.

Privacy, scope, and defaults

Enabling memory changes what persists and, depending on the backend, what may cross a network boundary.

  • Off means no memory processing. It does not disable ordinary session persistence. Memory commands also do not erase files under ~/.omp/agent/sessions/; manage those separately through Sessions.
  • Local stores generated artifacts locally, under ~/.omp/agent/memories/<encoded-project>/ by default. Its extraction and consolidation passes use your configured model roles, so past session text can still be sent to that model provider. Generated outputs are filtered for common token and secret patterns, but do not intentionally ask omp to remember secrets.
  • Mnemopi stores its SQLite banks locally, under ~/.omp/agent/memories/mnemopi/ by default. Local embeddings may download and run an embedding model. Its default llmMode: smol uses your configured online tiny / smol model for LLM-backed extraction; use llmMode: none when you want no LLM-backed memory processing.
  • Hindsight stores durable memory on the configured server. With autoRetain: true (the default), omp sends user and assistant text every three user turns and at session boundaries. It omits tool calls, tool results, and thinking blocks. Recall and synthesis queries also go to that server.
  • Turning a backend off does not delete its store. This makes switching reversible, but you must clear or delete data separately when removal is the goal.

Choose scope before accumulating sensitive data:

ScopeMnemopiHindsight
globalOne local bank is visible in every project.One remote bank is visible in every project.
per-projectOne isolated bank derived from the absolute working directory. This is the default.One isolated bank per repository name (or cwd name outside Git). Linked worktrees of one repository share the primary checkout's name.
per-project-taggedWrites to the project bank; recall combines it with the shared global bank.Writes project-tagged data to one shared bank; recall combines that project's tagged memories with untagged global memories. This is the default.

Data privacy and scoping

For client work or other hard boundaries, prefer per-project. per-project-tagged is convenient, but intentionally makes untagged global knowledge visible alongside project knowledge. Enabling a remote backend such as Hindsight sends user and assistant text across the network.

Use memory in conversation

With Mnemopi or Hindsight enabled, use ordinary prompts. You do not need to know how omp performs the memory operation.

Remember that this repository uses pnpm and Node 22.
Before changing authentication, recall why we rejected session cookies.
What durable preferences have you learned about how I review pull requests?

Mnemopi can also edit, forget, or invalidate an editable memory:

Forget the memory that says releases happen on Fridays; that policy was retired.
Update the stored release convention to say that releases happen after CI is green.

Ask omp to show the candidate memory before changing it when the description could match more than one entry. Mnemopi's extracted fact-table rows are read-only; the prompt should identify an editable memory, or you can clear the scoped bank when complete removal is required. Hindsight does not expose individual record editing through omp; use the Hindsight service's UI for record-level review or deletion.

The local backend works differently. It automatically summarizes eligible persisted sessions and injects a static Memory Guidance block at startup. A request such as “remember this” is not a guaranteed individual write. Its best use is allowing recurring project knowledge to emerge from completed work.

Recalled or summarized memory is background context, not an instruction. Current prompts and current repository state take precedence when they conflict with it.

What you can inspect and control

Run these slash commands in a session:

CommandVisible result
/memory or /memory viewOpens the current memory injection payload. An empty warning means the backend is off, unavailable, or has not recalled/generated anything yet.
/memory statsShows backend statistics when the active backend supports them.
/memory diagnoseShows backend-specific diagnostics when supported.
/memory enqueueRequests the active backend's stronger maintenance/retention action; details differ by backend below.
/memory clearClears what the active backend can clear. Hindsight is an important exception: the remote bank is not deleted.

/memory reset is an alias for clear; /memory rebuild is an alias for enqueue.

What enqueue and clear mean

Backend/memory enqueue/memory clear
LocalMarks consolidation work for the next startup. It does not rebuild the guidance panel immediately.Removes this project's generated artifacts and resets the local pipeline's shared extraction/consolidation index. It does not delete session transcripts.
MnemopiForces current-session retention, drains pending extraction, and consolidates eligible working memories. Fresh rows are not promoted until they pass Mnemopi's age gate (12 hours with the default 24-hour working-memory lifetime).Deletes the SQLite databases and WAL/SHM sidecars for the active scope, then starts an empty backend again.
HindsightFlushes queued writes and forces retention of the current session.Flushes pending writes, then clears the local recall state for this session only. It does not delete server-side memories or the bank; use the Hindsight UI to do that.

Review local generated files

The local backend keeps readable generated artifacts below ~/.omp/agent/memories/<encoded-project>/:

  • memory_summary.md — compact guidance shown by /memory view and injected at startup
  • MEMORY.md — the longer consolidated project memory
  • learned.md — explicitly captured lessons when optional auto-learn is enabled
  • skills/ — generated procedural playbooks

These are generated files, not the source session history. Editing them is not a durable workflow because later consolidation can replace them. Clear stale output and enqueue a rebuild instead.

Manage Hindsight mental models

Hindsight mental models are curated summaries such as user preferences, project conventions, and project decisions. They are enabled and automatically seeded by default. In the interactive TUI, use:

CommandEffect
/memory mm listList models in the active bank.
/memory mm show <id>Show one model.
/memory mm refresh [id]Refresh one model, or all auto-refresh models when no id is supplied.
/memory mm history <id>Show that model's revision history as a diff.
/memory mm seedCreate any missing built-in models.
/memory mm delete <id>Delete one mental model. This does not delete its source memories.
/memory mm reloadReload the mental-model block used by the current session.

Mental-model commands are TUI-only and require an active Hindsight backend. They are not Mnemopi controls.

Configure the local backend

Minimal global YAML in ~/.omp/agent/config.yml:

memory:
  backend: local

The pipeline starts in the background when omp starts. It skips subagents and sessions that were not persisted. By default, it ignores sessions still active within the last 12 hours and sessions older than 30 days, so a newly enabled backend may initially show an empty payload. Per-session extraction uses the default model role; consolidation uses smol with fallbacks.

SettingDefaultPurpose
memories.maxRolloutAgeDays30Ignore sessions older than this.
memories.minRolloutIdleHours12Ignore sessions active more recently than this.
memories.maxRolloutsPerStartup64Maximum sessions processed at one startup.
memories.threadScanLimit300Maximum recent session records scanned.
memories.maxRawMemoriesForGlobal200Maximum extracted session memories passed to consolidation.
memories.stage1Concurrency8Concurrent per-session extraction jobs.
memories.stage1LeaseSeconds120Extraction job lease.
memories.stage1RetryDelaySeconds120Delay before retrying failed extraction.
memories.phase2LeaseSeconds180Consolidation job lease.
memories.phase2RetryDelaySeconds180Delay before retrying failed consolidation.
memories.phase2HeartbeatSeconds30Consolidation lease heartbeat.
memories.rolloutPayloadPercent0.7Fraction of the model context budget available to session payloads.
memories.phase1InputTokenLimit4000Per-session extraction input cap.
memories.fallbackTokenLimit16000Fallback budget when a model has no finite declared context window.
memories.summaryInjectionTokenLimit5000Shared approximate cap for summary and captured lessons injected at startup.

Optional autolearn.enabled: true lets omp capture explicit lessons into learned.md; it is experimental and off by default. autolearn.autoContinue is also false by default and controls whether omp runs a private capture turn after stopping.

Configure Mnemopi

The defaults are enough for a project-isolated local bank:

memory:
  backend: mnemopi

A privacy-oriented FTS-only setup that avoids LLM-backed extraction is:

memory:
  backend: mnemopi
mnemopi:
  scoping: per-project
  noEmbeddings: true
  llmMode: none

Storage, scope, and automation

SettingDefaultPurpose
mnemopi.dbPathAgent memories directoryOptional SQLite path.
mnemopi.bankUnset (default)Shared bank base name; project scopes derive a project bank from it.
mnemopi.scopingper-projectglobal, per-project, or per-project-tagged.
mnemopi.autoRecalltrueRecall into the first turn of a session.
mnemopi.autoRetaintrueRetain completed conversation turns automatically.
mnemopi.retainEveryNTurns4Minimum user turns between automatic writes.
mnemopi.recallLimit8Maximum memories included in recalled context.
mnemopi.recallContextTurns3Prior user-bounded turns included in a recall query.
mnemopi.recallMaxQueryChars4000Maximum composed recall query length.
mnemopi.injectionTokenLimit5000Approximate memory context budget.

Retrieval, embeddings, and LLM processing

SettingDefaultPurpose
mnemopi.polyphonicRecallfalseCombine vector, graph, fact, and temporal recall.
mnemopi.enhancedRecallfalseCache repeated and similar recall queries.
mnemopi.proactiveLinkingfalseLink new memories to related graph entities and memories.
mnemopi.noEmbeddingsfalseUse deterministic full-text search only.
mnemopi.embeddingVariantenLocal model family: en or multilingual. Changing it rebuilds embeddings on the next writable start.
mnemopi.embeddingModelVariant defaultExplicit embedding model id; overrides the variant.
mnemopi.embeddingApiUrlEnvironment/defaultOptional OpenAI-compatible embedding endpoint.
mnemopi.embeddingApiKeyEnvironment/defaultCredential for that embedding endpoint.
mnemopi.llmModesmolsmol uses the configured tiny/smol role, remote uses the endpoint below, and none disables LLM calls.
mnemopi.llmBaseUrlEnvironment/defaultOpenAI-compatible LLM endpoint for remote mode.
mnemopi.llmApiKeyEnvironment/defaultCredential for the remote LLM.
mnemopi.llmModelEnvironment/defaultRemote LLM model id.
mnemopi.debugfalseEnable backend debug logging.

Configure Hindsight

Run a reachable Hindsight server first. The built-in URL is http://localhost:8888, so a local unauthenticated server needs only:

memory:
  backend: hindsight

For Hindsight Cloud or an authenticated deployment:

memory:
  backend: hindsight
hindsight:
  apiUrl: https://api.hindsight.vectorize.io
  scoping: per-project

Keep the token outside the file when possible:

export HINDSIGHT_API_TOKEN='replace-me'
omp

HINDSIGHT_* environment variables override matching hindsight.* settings. See Environment variables for the override names and parsing rules.

Connection, banks, and retention

SettingDefaultPurpose
hindsight.apiUrlhttp://localhost:8888Cloud or self-hosted server URL.
hindsight.apiTokenUnsetBearer token for authenticated servers.
hindsight.bankIdompBase bank id. In per-project mode the project name is appended.
hindsight.bankIdPrefixUnsetOptional prefix added before the base bank id.
hindsight.scopingper-project-taggedglobal, per-project, or per-project-tagged.
hindsight.bankMissionUnsetOptional mission applied when omp creates the bank.
hindsight.retainMissionUnsetOptional instruction for retention.
hindsight.autoRecalltrueRecall before the first model turn.
hindsight.autoRetaintrueRetain transcript text on cadence and at session boundaries. Set false for prompt-driven writes only.
hindsight.retainModefull-sessionfull-session upserts one session document; last-turn stores turn-bounded chunks.
hindsight.retainEveryNTurns3User turns between automatic retention.
hindsight.retainOverlapTurns2Overlap between retained chunks in last-turn mode.
hindsight.retainContextompContext label sent with retained data.

Recall, mental models, and timeouts

SettingDefaultPurpose
hindsight.recallBudgetmidRecall effort: low, mid, or high.
hindsight.recallMaxTokens1024Maximum recalled tokens.
hindsight.recallContextTurns1Prior user-bounded turns included in recall queries.
hindsight.recallMaxQueryChars800Maximum recall query length.
hindsight.recallTypes["world", "experience"]Hindsight memory types eligible for recall.
hindsight.mentalModelsEnabledtrueLoad curated mental models into new sessions.
hindsight.mentalModelAutoSeedtrueCreate missing built-in user-preference, project-convention, and project-decision models at startup.
hindsight.mentalModelRefreshIntervalMs300000Refresh interval for eligible mental models.
hindsight.mentalModelMaxRenderChars16000Maximum rendered mental-model text.
hindsight.requestTimeoutMs30000Default request deadline.
hindsight.recallTimeoutMs30000Recall deadline.
hindsight.retainTimeoutMs60000Retention deadline.
hindsight.reflectTimeoutMs120000Synthesis deadline.
hindsight.debugfalseEnable request and backend debug logging.

Configure Sharpshooter

Sharpshooter is the friction-gated project-decision memory backend: per-prompt async extraction emits decision deltas into a per-session queue, and a shared consolidation pass (default every 5 minutes) applies queued deltas per project into three markdown decision files. Only decisions that show friction persist — a regression, repeated corrections, or a rule that is subtle to get right from the code alone. Ordinary facts and task state do not persist here.

memory:
  backend: sharpshooter

What gets stored

FileHolds
architecture.mdArchitecture decisions
product.mdProduct decisions
style.mdStyle decisions and constraints

Each file has a 120-line ceiling enforced at consolidation. Banks live under <agentDir>/memories/sharpshooter/<project>/ with queue/<sessionId>/ deltas and a state.json for consolidation bookkeeping. Use /memory stats and /memory diagnose output for the last consolidation result and error.

Settings

SettingDefaultPurpose
sharpshooter.modelUnset (uses the smol role)Model selector for extraction and consolidation.
sharpshooter.intervalMinutes5Consolidation interval.
sharpshooter.injectionTokenLimit15000Approximate memory context budget.

Decision categories a delta may claim are architecture_decision, product_decision, style_decision, constraint, rejected_approach and correction. Each delta carries the exact triggering user-prompt substring as evidence.

Troubleshooting


Source: omp.sh — MIT, Stencil Labs. Initially imported on 2026-10-03; updates via automatic sync.

OMP Docs· always in sync with upstream
oh-my-piomp.sh/docsContent MIT · Stencil Labs