OpenMem

io.github.bcmyguestPublished by GitHub account bcmyguestv0.6.3Updated Oct 29, 2026

Memory interface for coding agents — stable memory_* tools over Hindsight, mem0, or Cognee.

VerifiedSTDIODesktop onlyKnowledge & MemoryDeveloper Tools

Overview

AI-generated overview

OpenMem gives coding agents a persistent memory layer through stable memory_* tools backed by a swappable provider (Hindsight, mem0 or Cognee).

What you can do
  • Retain, recall, search and reflect over memory stored in the active provider
  • Create, read and manage memory pages, plus export and import portable memory
  • Index sources such as git repos, Obsidian vaults, notes, papers, bookmarks and feeds into memory
  • Check provider and ingest status through the same tool set
  • Install session hooks so agents recall at session start and retain at stop
When to use it
Useful when you want coding agents such as Claude Code, Codex, Cursor or OpenCode to keep durable memory across sessions and to query your own documents and repositories instead of re-reading them each time.
Requirements
Runs locally over stdio via npx after a setup wizard. Needs Docker Compose v2, Node 24 or newer, and an LLM route for the default Hindsight provider; a memory provider must be running. Environment variables MEMORY_PROVIDER selects the backend and PM_STACK_ROOT points at the stack directory.
Before you install
The wizard writes configuration and starts Docker Compose services, and install-coding-agent modifies coding-agent configuration. Switching providers does not migrate data by itself, so export or re-index first. Context-management features in this repo are deprecated and moved elsewhere. An LLM route and provider services may incur model usage costs.

Installation

In SourceWeft

  1. Open OpenMem in the dashboard and add it to a workspace.
  2. Enable the server for the chats that should use its tools.

Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.

Other MCP clients

Follow the launch instructions in the repository.

README

OpenMem

[npm version] [License] [openmem-mcp] [GitHub]

[openmem-mcp]

[!CAUTION] Context management is leaving OpenMem. Smart compaction, the LiteLLM context proxy, and the OpenCode trim plugin in this repo are deprecated here and moving to Smarter Compact (docs, npm install -g smarter-compact). Use OpenMem for memory (providers, indexer, memory_* MCP). Existing OpenMem stacks can still enable the compose context-proxy profile; new context work belongs in Smarter Compact.

OpenMem. Pluggable memory providers (Hindsight, mem0, Cognee) and one setup wizard for coding-agent memory — retain, recall, and index your sources.

A. Memory: your sources become memory any agent can query.

[A, memory: sources (Git repos, Obsidian vaults, notes, papers, bookmarks, feeds), OpenMem indexer, one active provider (Hindsight default, mem0, Cognee), OpenMem MCP tools, coding agents with session hooks]

B. Context management (deprecated in OpenMem — use Smarter Compact instead): long sessions stay under the limit; nothing is summarized away.

[B, context management: coding agent, context proxy trimming at 125k tokens (Haiku 95k) with no LLM call, model API, SQLite session store read back with smart_compact_search and smart_compact_sql; OpenCode 2 uses a native plugin]

Benchmarks (context — deprecated here): In seed-matched ContextBench log tasks on Haiku 5.5, smart compaction scored 0.469 higher than keep-everything (95% bootstrap interval 0.339–0.578; eight pairs). Methods and charts still live in this repo (redirect · evidence plan); ongoing product docs and install are on Smarter Compact.

[ContextBench log-triage on Haiku 5.5: OpenMem scores 1.00 at L12800 overall vs 0.35 for native and keep-everything; lookup and count question panels]

Docs: bcmyguest.github.io/openmem/

MCP: npx -y -p @bcmyguest/openmem openmem-mcp (after the wizard — it needs a running provider)

Start here: Concepts · Quickstart · Compatibility · Development (clone, tests, prek)

Quickstart

StepCommand
1. Wizardnpx @bcmyguest/openmem setup
2. Checknpx @bcmyguest/openmem doctor
3. Coding agentsnpx @bcmyguest/openmem install-coding-agent --yes

From a git clone: Development guide (npm install, npm run setup, tests, prek).

Needs (wizard): Docker Compose v2, Node ≥ 24, and an LLM route for Hindsight — see Quickstart.

Later: npx @bcmyguest/openmem up / down / switch <provider> --yes / doctor.

Wizard dry-run (what first setup plans — no writes):

[Terminal recording of the setup wizard dry run: preflight checks, memory provider, model backend, secrets, sources and stack steps, each planned write printed as a [dry-run] line]

Full guide: Quickstart · Concepts · Architecture

Architecture

The two diagrams at the top show memory (A) and context management (B; deprecated in OpenMem, see Smarter Compact).

Same diagrams as Mermaid
mermaid
flowchart LR  S["<b>Sources</b><br/>Git repos: docs, code outlines<br/>Obsidian vaults · notes · papers · bookmarks<br/>RSS · OpenAlex feeds"] -->|index| I["<b>OpenMem indexer</b><br/>polls repos, watches folders"]  I -->|retain| P[("<b>Memory provider</b><br/>one active, swappable<br/>Hindsight (default) · mem0 · Cognee · …")]  P <--> M["<b>OpenMem MCP</b><br/>memory_recall · memory_add<br/>memory_search · memory_reflect<br/>memory_pages_* + export/import, status…"]  M <-->|tools| A["<b>Coding agents</b><br/>Claude Code · Codex · Cursor · OpenCode"]  A -.->|"session hooks: recall at start · retain at stop"| M  classDef om fill:#e8eaf9,stroke:#4651a6,color:#1b1d2a  class I,M om
mermaid
flowchart LR  A["<b>Coding agent</b><br/>Claude Code · Codex · OpenCode 1"] -->|requests| X["<b>Context proxy</b><br/>LiteLLM pre-call hook<br/>trims at 125k tokens (Haiku 95k) · no LLM call"]  X -->|trimmed request| API["<b>Model API</b><br/>Anthropic · ChatGPT (Codex)"]  X -->|every turn| S[("<b>Session store</b><br/>SQLite · every turn, verbatim")]  S -->|"MCP: smart_compact_search · smart_compact_sql"| A  O["<b>OpenCode 2</b><br/>native plugin, no proxy"] -.->|same store| S  classDef om fill:#e8eaf9,stroke:#4651a6,color:#1b1d2a  class X,S om

Native compaction replaces history with an LLM summary, so exact values can be lost; smart compaction keeps every turn verbatim and searchable. Context trimming in OpenMem is deprecated — use Smarter Compact (smarter-compact enable). Legacy stack path: context proxy redirect. See architecture for memory runtime paths and provider-specific behavior.

Providers and portability

  • Providers — Provider status lists every provider and its support level from the manifests. Contributor details: adding a provider.
  • MCP — unified memory_* plus optional native/NotebookLM servers: MCP setup.
  • Context management (deprecated in OpenMem) — moved to Smarter Compact; OpenMem page is a redirect.
  • Portable memory — memory_export / memory_import speak PMM: Portable memory.
  • Switch — npx @bcmyguest/openmem switch <provider> does not migrate data by itself; export/import (or re-index) moves content.

Compose runs the shared indexer and the services required by the selected provider. Hindsight uses litellm and hindsight (127.0.0.1:8888); mem0 and Cognee use their own APIs and do not include LiteLLM by default. LiteLLM can also be added for memory_reflect synthesis on mem0/Cognee, or to host the optional context proxy's pre-call hook. See Architecture for runtime paths.

Inspiration and related

OpenMem is not affiliated with these projects; they shape the problem or the pattern.

OpenFeatureInspiration for a vendor-agnostic interface + pluggable providers (there: feature flags; here: coding-agent memory).
mise / asdfOne CLI over many backends; declarative config and tasks without replacing each tool’s own settings.
LiteLLMModel proxy used on Hindsight stacks; its pre-call hook hosts the context proxy.
Hindsight coding agentsReference implementation for knowledge pages, initiative capture and ingest status; OpenMem's hooks replace it in openmem mode.
MainplaneInspiration for smart compaction: continue in a fresh context with a pointer to the saved transcript and retrieve as you go, instead of an LLM summary.
Letta / MemGPTInspiration for smart compaction: evicted turns kept verbatim in searchable recall storage the agent pages back with tools, and file-style search over the transcript (74.0% on LoCoMo). OpenMem does this in a proxy and an MCP server, so no Letta server is needed.
rtkCompresses shell command output before the agent sees it; install-coding-agent runs rtk init when it is installed. Inspired the context proxy's compression of large tool results (reimplemented, not bundled).
opencode-clmOpenCode plugin for Context Language Models: the model edits a file mirror of its own context. Same goal as smart compaction, with the model doing the trimming (comparison).
MeridianBridges a Claude subscription to an Anthropic-compatible API; optional Hindsight model backend (guide).
OpenCode / Claude Code hooks / Codex hooksThe agent hook and plugin APIs OpenMem translates between (compatibility).

Research notes and benchmark results for the context proxy: Context research.

More setup analogues: Pluggable memory providers.

Formerly personal-memory. Use the openmem CLI and MCP server name; installers drop the old personal-memory MCP entry.

References

Papers and preprints cited in our context-management work (full list):

ReferenceLink
MemGPT (Packer et al., 2023)arXiv:2310.08560
LoCoMo (An et al., 2024)arXiv:2402.17753
LongMemEval (Wu et al., 2024)arXiv:2410.10813
MemoryAgentBench (2025)arXiv:2507.05257
The Complexity Trap (Lindenbauer et al., 2025)arXiv:2508.21433
Context Language Models / ContextBench (Shao et al., 2025)arXiv:2609.37725
Compact-Bench (2026)arXiv:2610.31710

Reports and blogs (Context Rot, Letta LoCoMo, Anthropic context engineering): references.md.

License

Apache License 2.0 — see LICENSE (Copyright 2026 B Guest).

Contributing

Contributions are welcome. See CONTRIBUTING.md and the development guide for tests and CI.

Source: README.md at commit ad8f5d3

Tools

0
SourceWeft has not started this package in its sandbox yet, so its tools are not known.

Version history

1
  1. v0.6.3LatestOct 29, 2026

Score

50% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 days25 pts

    Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.

  • Auth declared10 pts

    Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.

  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts