SuperAPIAI Directory

open-memex

github.com · AI coding

open-memex is a local-first memory layer for AI coding assistants, using plain Markdown files as the source of truth and equipped with a rebuildable SQLite keyword index. It integrates with editors such as VS Code, Cursor, opencode, and Claude Code through an MCP server and CLI, allowing different tools to share the same local memory. It supports human-reviewed capture, team knowledge sharing based on Git PRs, synonym search, and a knowledge graph. Free and open source (Apache-2.0), with no accounts, no cloud, and no telemetry; all data remains on the user's machine.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsmacOS · Linux

About this tool

open-memex is a local-first tool that provides persistent memory for AI coding assistants. It solves the problem that every AI coding session starts from scratch, requires repeatedly explaining project context, and yesterday's decisions disappear after the chat ends. With open-memex, users only need to say once 'Remember: we deploy on Friday,' and next week tools such as Copilot, Cursor, opencode, or Claude Code will know, because they all read and write the same local memory.

Core Concepts

open-memex is designed around four ideas:

  1. Two scopes: Each memory belongs to either 'project' or 'personal'. Project memories are knowledge about a codebase (decisions, constraints, lessons learned) and are automatically scoped to the current repository; personal memories are preferences and habits about the user themselves, apply to all projects, exist only on the local machine, and are never shared to a repository.

  2. Capture and recall: Memories are stored as small Markdown files, one fact per file. On the first turn of each new session, open-memex automatically gives the most relevant memories to the AI assistant, so it already knows this information at the start of the session. The assistant can also search the full memory on demand. Users do not need to manually 'load' anything.

  3. Files are the rule: Markdown files are the source of truth and can be opened, edited, deleted, or searched with grep. The adjacent SQLite index is only a search accelerator and can be rebuilt from the files at any time (open-memex reindex). Team sharing goes through a code-review-like process and is not automatic.

  4. Knowledge stays current: Facts change, decisions may be overturned, and tools may be replaced. open-memex provides memory_supersede to replace old memories with new versions while preserving the chain; retrieval provides current facts, and history remains auditable. Stale memories can be deprecated, and open-memex audit reports duplicates, stale entries, and broken chains.

Editor Integration

open-memex communicates with editors in two ways: a native opencode plugin and a standard MCP server (usable by any editor that supports MCP). MCP is the standard protocol for editors to provide additional tools to AI assistants, and open-memex appears in the editor as a set of memory_* tools.

All editors on the same machine read and write the same memory: in VS Code, constraints captured are also respected in opencode; lessons learned in Cursor appear in Claude Code. Different machines do not sync automatically.

init also installs an Agent Skill for VS Code and Cursor (a short instruction file that teaches skill-capable assistants to use the CLI), and for opencode it also installs it in per-project MCP mode. If the native opencode plugin is already connected, the skill is not installed because the plugin already provides memory tools.

Installation and Setup

Requires Node.js ≥ 22.14 (can be verified with open-memex doctor). Install the CLI:

npm install -g open-memex

It can also be run without installation via npx:npx -y open-memex <command>. Alpha version:npm install -g open-memex@alpha.

Run init in the project root:

open-memex init --yes

--yes accepts all recommended defaults. When --client is not specified, init detects installed editors and connects to all of them. You can also specify a single editor, such as --client vscode、--client cursor、--client opencode、--client claude、--client visualstudio.

For VS Code and Cursor,init --global writes the configuration to the user-level MCP config, so one setup applies to all projects.

To remove the integration:open-memex uninstall, it will not touch memory files.

Data location

Memory data (created on first use): %APPDATA%\open-memex\ on Windows, ~/.local/share/open-memex/ on macOS/Linux. It contains memory files and the search index; uninstalling will not modify these contents.

Security and data

Free and open source (Apache-2.0), no account, no cloud, no telemetry. Everything is stored on the user's machine and will not leave the local machine unless the user explicitly shares it.

Use cases

Suitable for developers who use multiple AI coding assistants and want to retain project decisions, constraints, lessons learned, and personal preferences across sessions and tools. Also suitable for teams that need to share team knowledge in a code-review manner.

Limitations

Requires Node.js ≥ 22.14. There is no automatic synchronization between different machines. The MCP path has no hard session-start hook; first-round injection is only supported by the opencode native plugin. Codex currently has no init client, so the server must be added manually. Visual Studio integration is Windows-only and requires Visual Studio 2022 17.14+ or Visual Studio 2026.

Up/Down to navigate · Enter to open · ESC to closeBrowse all tools