LLM-supervised persistent memory for AI agents — graph-based recall, cross-session knowledge, single binary. Works with Claude Code, OpenClaw, and any CLI agent
LLM-supervised persistent memory for AI agents — graph-based recall, cross-session knowledge, single binary. Works with Claude Code, OpenClaw, and any CLI agent
Mnemon
English · 中文
LLM-supervised persistent memory for AI agents.
LLM agents forget everything between sessions. Context compaction drops critical decisions, cross-session knowledge vanishes, and long conversations push early information out of the window.
Mnemon gives your agent persistent, cross-session memory — a four-graph knowledge store with intent-aware recall, importance decay, and automatic deduplication. The mnemon memory path remains one local binary with zero API keys and one setup command.
Mnemon ships one executable with two separate surfaces. Memory stays at the
mnemon root; Agency Preview lives at mnemon agency ... and adds
durable, project-local responsibility and effect admission to an existing Pi
agent. Agency does not replace Memory or the Agent Runtime.
Claude Max / Pro subscriber? Mnemon works entirely through your existing subscription — no separate API key required. Your LLM subscription is the intelligence layer. Two commands and you're done.
Most memory tools embed their own LLM inside the pipeline. Mnemon takes a different approach: your host LLM is the supervisor. The binary handles deterministic computation (storage, graph indexing, search, decay); the LLM makes judgment calls (what to remember, how to link, when to forget). No middleman, no extra inference cost.
| Pattern | LLM Role | Representative |
|---|---|---|
| LLM-Embedded | Executor inside the pipeline | Mem0, Letta |
| File Injection | None — reads file at session start | Claude Code Memory |
| MCP Server | Tool provider via MCP protocol | claude-mem |
| LLM-Supervised | External supervisor of a standalone binary | Mnemon |
Mnemon also addresses a gap in the protocol stack. MCP standardizes how LLMs discover and invoke tools. ODBC/JDBC standardizes how applications access databases. But how LLMs interact with databases using memory semantics — this layer has no protocol. Mnemon's three primitives — remember, link, recall — form an intent-native protocol: command names map to the LLM's cognitive vocabulary (remember not INSERT, recall not SELECT), and output is structured JSON with signal transparency rather than raw database rows.
The LLM-Supervised pattern: hooks drive the lifecycle, the host LLM makes judgment calls, the binary handles deterministic computation.
Memory has a compound interest effect — the longer it accumulates, the greater its value. LLM engines iterate constantly, skill files cost nearly nothing to write, but memory is a private asset that grows with the user. It is the only component in the agent ecosystem worth deep investment.
A real knowledge graph built by Mnemon — 87 insights, 2150 edges across four graph types.
See Design & Architecture for details.
npm (recommended; macOS / Linux / Windows, Node.js 22+):
npm install --global @mnemon-dev/mnemonUpgrade the npm-managed CLI at any time:
mnemon updateThe npm package installs the matching native Go executable for the host OS and CPU. Mnemon's engine remains a single native binary; Node.js is used only by the npm launcher and package manager.
Alternative installers:
brew install --cask mnemon-dev/tap/mnemon
go install github.com/mnemon-dev/mnemon@latestHomebrew, go install, source builds, and other Node package managers must
continue to use their original installation method. To migrate one of these
installations, run the npm install command once and ensure the npm global bin
directory precedes the old executable on PATH; subsequent mnemon update
calls are npm-managed.
Windows supports the core Memory commands. Agency remains unavailable on Windows until its local authority boundary has native Windows security.
From source (macOS / Linux):
git clone https://github.com/mnemon-dev/mnemon.git && cd mnemon
make installVerify installation:
mnemon --version
mnemon agency --versionmnemon agency setup --runtime pi --project-root .Set up each project once, then use Pi normally. Agency is available on macOS
and Linux and remains independent from Memory: mnemon setup --target pi --yes
enables Memory, while the command above enables Agency. See the
Agency guide for its operating model, Preview compatibility
boundary, and optional peers.
mnemon setupmnemon setup auto-detects Claude Code, then interactively deploys skill, hooks, and behavioral guide. Start a new session — memory just works.
mnemon setup --target codex --yesOne command deploys the mnemon skill, prompt files, and Codex lifecycle hooks
(SessionStart, UserPromptSubmit, Stop) in .codex/hooks.json.
mnemon setup --target cursor --yesOne command deploys the mnemon skill, prompt files, and Cursor lifecycle hooks
to .cursor/. The integration primes new agent sessions with Mnemon guidance
and memory status, then nudges for durable-memory writeback after responses.
mnemon setup --target zcode --global --yesZCode installs the Mnemon skill under ~/.zcode/skills/ and registers
user-level lifecycle hooks in ~/.zcode/cli/config.json. The hooks prime new
sessions, add recall guidance before model calls, and prompt for durable-memory
writeback at stop. Without --global, setup installs only the project skill;
ZCode currently ignores project-level hook configuration.
mnemon setup --target minimax-code --yesOne command deploys the Mnemon skill to
.minimax/skills/mnemon/SKILL.md. Add --global to use
~/.minimax/skills/mnemon/SKILL.md across projects. Current MiniMax Code
releases discover both roots natively. The integration is intentionally
skill-only: in MiniMax Code 3.0.65, the local Agent V2 path does not dispatch
the user-prompt lifecycle hook required for dependable automatic recall.
mnemon setup --target trae --yesOne command deploys the mnemon skill, prompt files, and TRAE native hooks for
both TRAE IDE and TRAE Work to .trae/. The integration uses SessionStart,
UserPromptSubmit, and Stop hooks in .trae/hooks.json.
mnemon setup --target qoder --yes
mnemon setup --target qoderwork --yesQoder deploys the mnemon skill, prompt files, and native hooks to .qoder/
or ~/.qoder/. QoderWork uses its native user config at ~/.qoderwork/.
Both integrations register SessionStart, UserPromptSubmit, and Stop
hooks in settings.json.
mnemon setup --target codebuddy --yesCodeBuddy deploys the mnemon skill, prompt files, and native hooks to
.codebuddy/ or ~/.codebuddy/. The integration registers SessionStart,
UserPromptSubmit, and Stop hooks in settings.json.
mnemon setup --target workbuddy --yesWorkBuddy deploys the mnemon skill, prompt files, and native hooks to
.workbuddy/ or ~/.workbuddy/. The integration registers SessionStart,
UserPromptSubmit, and Stop hooks in settings.json.
mnemon setup --target kimi --yesKimi Code deploys the mnemon skill, prompt files, and native lifecycle hooks to
~/.kimi-code/ or $KIMI_CODE_HOME/. The integration registers
SessionStart, UserPromptSubmit, and Stop hooks in config.toml.
mnemon setup --target opencode --yesOpenCode deploys the mnemon skill to .opencode/skills/, registers the
generated guide through opencode.json instructions, and installs a native
plugin in .opencode/plugins/. The plugin injects recall context before chat
requests and adds Mnemon guidance to session compaction.
mnemon setup --target openclaw --yesOne command deploys skill, hook, plugin, and behavioral guide to ~/.openclaw/. Restart the OpenClaw gateway to activate.
mnemon setup --target pi --yesOne command deploys the mnemon skill, prompt files, and a Pi TypeScript extension
to .pi/. The extension maps Mnemon's lifecycle reminders onto Pi events
(resources_discover, before_agent_start, agent_end,
session_before_compact). Start a new Pi session or run /reload to activate.
mnemon setup --target hermes --yesOne command deploys the mnemon skill, prompt files, and Hermes shell hooks to
~/.hermes/. The integration uses Hermes' native lifecycle hooks:
on_session_start, pre_llm_call, post_llm_call, and optional
on_session_finalize. Hermes may prompt once to approve the installed shell
hooks.
DeepSeek Harness (DSH) integrates through the dsh-mnemon plugin, which layers DSH's runtime memory, managed project documents, and Mnemon's long-term memory spaces into one supervised three-tier memory system.
With mnemon installed on the host (see Install), add the plugin and restart your DSH Web profile:
dsh plugin --profile web add dsh-mnemon
dsh --profile webThe Mnemon repository is also a direct GitHub installation source. Unreleased plugin builds can still be installed from the dedicated repository, and local development checkouts use an absolute path:
dsh plugin --profile web add github:mnemon-dev/mnemon
dsh plugin --profile web add "github:omdsh-dev/dsh-mnemon"
dsh plugin --profile web add "link:/absolute/path/to/dsh-mnemon"New installations from the Mnemon repository resolve the latest npm release
of dsh-mnemon, so publishing a new plugin release does not require a matching
change in this repository. Existing installations remain on their resolved
version until the plugin is reinstalled or updated.
Then open DSH's Settings → Plugin Config → Mnemon to pick a storage scope, and use the Memory System tab in a session to create or activate memory spaces. Recall reads only from active memory spaces; durable writes go through supervised sub-agents.
NanoClaw runs agents inside Linux containers. Use the /add-mnemon skill to integrate:
/add-mnemon — Claude Code will modify the Dockerfile, add a container skill, and set up volume mountsThe skill is available at .claude/skills/add-mnemon/ in the NanoClaw repo.
mnemon setup --target nanobot --global --yesOne command writes a skill file to ~/.nanobot/workspace/skills/mnemon/SKILL.md. Memory is shared across all Nanobot sessions and projects. Use --global (recommended) because Nanobot discovers skills from the global workspace directory.
mnemon setup --ejectOnce set up, Memory operates through lightweight runtime projections: a
runtime-specific SKILL.md teaches commands, a shared guide.md (by default
~/.mnemon/prompt/guide.md) carries judgment guidance, and native hooks or
extensions surface reminders at supported lifecycle boundaries. The mnemon
binary executes deterministic memory operations, while `mnemon se
No open issues yet, or sync has not completed.