Mnemon CLI

One local binary that gives Claude Code, Codex and Cursor shared memory across sessions, with a knowledge graph on disk and no API keys

  • 672 ★ on the repository
  • Last commit
  • Apache-2.0
CLI

Extended access

Why this level

  • Setup changes agent settings: it places a skill, a guide and hooks into folders such as `.claude/`, `.codex/` and `.cursor/`
  • All records accumulate in the local `~/.mnemon` database and return into the context of later sessions, so keep secrets out of memory
  • For vector search the text of records goes to the embedding server you choose, and the `mnemon web` command starts a local website on port 8484
All reasons and checks

mnemon-dev/mnemon

Install

In your terminal, with SkillFoxx CLI

npx skillfoxx add cli/mnemon

Detects the agents on your machine, shows the access level and pins the version.

Other ways to install

Access and checks

How we review

Extended accessThe tool runs code or makes network calls and only reads external data.

  • Setup changes agent settings: it places a skill, a guide and hooks into folders such as `.claude/`, `.codex/` and `.cursor/`
  • All records accumulate in the local `~/.mnemon` database and return into the context of later sessions, so keep secrets out of memory
  • For vector search the text of records goes to the embedding server you choose, and the `mnemon web` command starts a local website on port 8484

This is third-party code. Review the repository files before installing.

What it does

Agents forget everything between sessions: decisions vanish when the context is compacted and early details of a long dialogue get pushed out. Mnemon keeps such knowledge in a local database at `~/.mnemon` and returns it when it is needed. It is a single Go executable. It does the computing: stores records, builds the graph, searches and forgets what is stale. What to remember, how to link records and when to forget is decided by the agent itself, so no separate model sits inside. The agent works with three operations: `remember` stores a fact, `link` connects records, `recall` searches with the intent of the query in mind. Records live in four graphs: temporal, entity, causal and semantic. Search walks the graph, and vector search through Ollama or an OpenAI-compatible server is optional. Mnemon skips exact repeats, record importance decays over time, and rarely used ones are pruned once the 1000-record ceiling is exceeded. The `mnemon setup` command configures the chosen agent: it places a `SKILL.md` skill, a shared `guide.md` guide, and hooks for session start, prompt submission and stop. The hooks only remind the agent that it can recall the past or write something new, and the agent itself runs the commands. Separately, `mnemon web` opens a local website at `127.0.0.1:8484` with a memory library, record pages and a relationship graph.

Who it is for. For developers who work daily with Claude Code, Codex, Cursor or OpenCode and are tired of repeating the same project decisions and agreements to the agent.

Good fit when

  • In a new session the agent again asks which framework you chose and why you rejected another
  • The same knowledge is needed in Claude Code, Codex and Cursor at once: they share the `~/.mnemon` database
  • Memory has to be split by project: `mnemon store create work` creates a separate store and the MNEMON_STORE variable selects it for a process
  • You want an overview of what has accumulated: `mnemon web` shows the record graph and the operation history in the browser
  • You need to audit how memory works without exposing its contents: Mnemon exports hashed operation receipts without record or query text

Not a fit when

  • You need server-side memory for a whole team: Mnemon keeps data in a local SQLite database on your machine
  • The agent supports no skills, rules or hooks: there is nothing to attach the integration to
  • A rules file such as CLAUDE.md is enough: a separate memory is overkill for a small set of stable agreements
  • You need guaranteed writes without the agent's involvement: the agent decides what to write and when to search

Example request

Remember that on this project we chose PostgreSQL over MongoDB because of transactions, and link this decision to the record about the order schema

Limitations

Installing through npm needs Node.js 22 or newer, but the engine stays a single native Go binary and Node.js works only as the launcher. On Windows the core memory commands work, and the Agency mode is not supported there.

In Claude Code the hooks fire at four points: Prime exposes the skill and guide, Remind prompts a recall decision, Nudge prompts a write decision, and Compact preserves what matters before context compaction. Codex has three events, without compaction.

Vector search needs a separate embedding server: Ollama at `http://localhost:11434` with the nomic-embed-text model, or an OpenAI-compatible one such as oMLX or Voyage AI with a key. Without it, graph search still works. The separate `mnemon agency` command, in its preview version, works with the Pi agent.

How to disable. The `mnemon setup --eject` command removes the integration from agents: skills, hooks and the guide. The records stay in `~/.mnemon`: delete that folder by hand if you no longer need the memory. For an npm install, remove the program with `npm uninstall --global @mnemon-dev/mnemon`.

FAQ

How do I install Mnemon in Claude Code?

Run `npm install --global @mnemon-dev/mnemon`, then `mnemon setup`. The command finds Claude Code itself and interactively installs the skill, hooks and guide. The install is local by default, into the project's `.claude/` folder, and the `--global` flag puts everything in `~/.claude/` for all projects. Then open a new session.

Does Mnemon need an API key?

No. The engine runs without an embedded model and without keys: writing and graph search call no external services. A key is needed only if you add vector search through a hosted embedding server such as Voyage AI, and then it goes into MNEMON_EMBED_API_KEY.

Do different sessions share one memory?

Yes. By default all sessions use the default store, and a decision recorded in one session is available in every later one. For isolation, create a named store with `mnemon store create work`, select it with `mnemon store set work` or pass the process MNEMON_STORE=work.

How is Mnemon different from Claude Code's built-in memory?

The built-in memory reads a file at session start. Mnemon keeps records in four graphs (time, entities, causes, meaning), searches by the intent of the query, lowers the weight of stale records and serves several agents at once. Behaviour is guided by the editable `~/.mnemon/prompt/guide.md` file.

How many records does Mnemon keep?

Up to 1000 active ones by default. The MNEMON_MAX_INSIGHTS variable sets the ceiling, and 0 turns automatic pruning off. A record younger than 24 hours (the MNEMON_AUTO_PRUNE_MIN_AGE setting) is not removed. Each automatic deletion is logged in the operation log and reported by ID in the auto_pruned_ids field.

Discussion

No questions or reviews yet.

CLI tools

Persistent agent memory in a folder of linked markdown notes, so Claude Code remembers a project across sessions

MCP serverExtended access334Repository stars

Long-term memory for agents: it distills knowledge from session history and brings it back in new tasks, one store shared across Claude Code, Codex, Cursor and

SkillExtended access14.6KRepository stars

Shared local memory for AI agents: Claude Code, Codex, Cursor and others find the agreements of past sessions in it and record new ones

CLIBroad access2.2KRepository stars

A long-term memory MCP server for AI agents: facts fade along a forgetting curve and related records are compressed into a summary

MCP serverExtended access270Repository stars

Long-term agent memory in local Markdown files with a link graph, semantic search and MCP access

MCP serverExtended access4.4KRepository stars
Official

Local persistent memory for coding agents: hooks record every session, and Claude Code, Codex or Cursor recall past decisions through 54 MCP tools

MCP serverExtended access30KRepository stars

Comparison with similar tools

Entries that share the main search query, and how they differ.

EntryOfficialAuthenticationRepository starsMain difference
Mnemon (this entry)no672
MegaMemorynonot required731an MCP server that maintains a graph of project concepts and architecture inside the repository
Basic Memorynonot required4,403keeps agent memory in Markdown files and works through MCP

README in short

The README explains the problem of agent forgetfulness and compares four approaches to memory: a model inside the pipeline, a file at startup, an MCP server and an external supervisor over a standalone program. It then covers installation through npm, Homebrew and go install, a separate setup command for each supported agent, a diagram of the four hook phases, a feature list and a vision of one memory for all local agents. It ends with frequently asked questions, environment variable tables and development commands.

README badge

Report a problem

Foxx AIMnemon
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.