mnemon

mnemon-devApache-2.0活跃维护

给 AI Agent 提供跨会话持久记忆的 Go 单二进制工具,用知识图谱做召回,让 Agent 记住历史上下文,兼容 Claude Code 等运行时。

LLM-supervised persistent memory for AI agents — graph-based recall, cross-session knowledge, single binary. Works with DeepSeek Harness, Claude Code, OpenClaw, and any agent runtime.

v0.2.13发布于 2026-10-26 20:10 UTC709star +11 / 7 天81fork同步于 2026-11-10 11:56 UTC

怎么上手

由 README 提炼,执行前请确认
npm install --global @mnemon-dev/mnemon
mnemon setup
硬件要求按 README 说明

README 未说明显存或 GPU 要求;引擎为单个原生 Go 二进制,npm 安装需 Node.js 22+,Windows 仅支持核心 Memory 命令,Agency 仅限 macOS/Linux

支持 Apple Silicon
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

给 AI agent 加跨会话持久记忆的本地单二进制工具,由宿主 LLM 做判断、二进制做确定性计算

给 AI Agent 提供跨会话持久记忆的 Go 单二进制工具,用知识图谱做召回,让 Agent 记住历史上下文,兼容 Claude Code 等运行时。

核心能力

  • 四图知识库存储,支持意图感知召回
  • 按重要性衰减并自动去重
  • 提供 remember/link/recall 三个原语
  • 一条 setup 命令接入 Claude Code、Codex、Cursor 等运行时
  • 内置 mnemon web 本地知识浏览界面

容易踩的坑

npm 安装需 Node.js 22+,Homebrew/go install 等安装方式需继续用原方式升级,不能直接 mnemon update;Agency 在 Windows 上不可用;各运行时接入后需重开新会话才生效,更新后要重跑 setup 并重启对应工具

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

5 个版本v0.2.13
  1. v0.2.13最新正式版2026-10-26 · 2026-10-26 20:10 UTC

    v0.2.13 improves memory entity quality, Unicode display, and embedding diagnostics. Memory and the local Agency authority remain available in one mnemon executable.

    Fixes

    • Stop treating numeric versions, numeric addresses, dotted abbreviations, and ordinary emphasis words such as NEVER, ONLY, and NOTE as entities. This reduces unrelated entity links while preserving technical names, domains, and file paths. Existing stored entities are not rewritten automatically.
    • Preserve UTF-8 characters when truncating CLI previews, including Chinese text and emoji.
    • Read and emit the ZCode SessionStart guide as UTF-8 on Windows PowerShell, preventing corrupted non-ASCII context.
    • Make mnemon embed --status verify that the selected model can produce a nonempty embedding. The legacy ollama_available field continues to report provider reachability, while embedding_available reports model usability.
    • Print an actionable warning to stderr when query embedding fails and continue recall without vector similarity. JSON results remain on stdout.
    • Label npm and GitHub downloads separately in both READMEs. The GitHub badge uses the native total across all release assets, including checksums, without a custom data branch or scheduled statistics workflow.

    See PR #169, PR #171, PR #173, and PR #168.

    Install or update

    npm install --global @mnemon-dev/[email protected]
    mnemon --version
    

    Existing npm-managed installations can also run mnemon update. Native archives are available for macOS, Linux, and Windows on amd64 and arm64, with SHA-256 checksums. Homebrew users can upgrade through the mnemon-dev/tap tap.

    Windows ZCode users should refresh their installed user-level hooks after upgrading:

    mnemon setup --target zcode --global --yes
    

    Keep any existing MNEMON_DATA_DIR override when rerunning setup. mnemon embed --status now performs a small synthetic embedding request to verify the selected model; it sends no stored memories and follows the configured provider's normal billing and timeout behavior.

    Validation

    • Product build and make test, including go vet ./..., on the release source.
    • All 258 CLI end-to-end checks and 13 npm distribution tests passed.
    • Fourteen actual CLI commands with an isolated store and a deterministic local embedding provider verified memory write/search/recall, entity filtering, Unicode output, healthy versus missing-model status, JSON-safe recall fallback, and Agency/Web command availability.
    • Linux and native Windows CI passed on the release commit.
    • All six GitHub archive digests match checksums.txt; the Homebrew cask version and all four supported archive checksums match this release.
    • Downloaded macOS arm64 archive and freshly installed npm package contain identical native binaries. Both passed the actual CLI checks above; the downloaded binary also served the embedded Web workspace, its assets, and memory API successfully.

    The release workflow completed successfully, including frontend checks, deterministic tests, six-platform builds, Homebrew publication, and npm publication.

    Full comparison

  2. v0.2.122026-10-19 · 2026-10-19 19:09 UTC
    查看更新说明

    v0.2.12 fixes Pi memory guidance and Windows installation compatibility. Memory and the local Agency authority remain available in one mnemon executable.

    Fixes

    • Give Pi its own memory guide, allowing direct mnemon remember and mnemon link calls instead of injecting Claude-only delegation instructions. Pi and Claude setup, reinstall, and scoped removal preserve each other's guides.
    • Resolve Pi resources from the system home directory when Windows does not define HOME, and honor PI_CODING_AGENT_DIR for setup, detection, and removal.
    • Run status checks through native binaries and standard npm installation layouts on Windows without spawning a .cmd shim. Preserve ordinary executable lookup and bound child-process runtime and output.
    • Discover only Mnemon's installed skill, avoiding missing-skill warnings for project-local installations.
    • Update the README Star History chart with light/dark themes and a bottom-right legend.

    See issue #164, PR #165, and PR #166.

    Install or update

    npm install --global @mnemon-dev/[email protected]
    mnemon --version
    

    Existing npm-managed installations can also run mnemon update. Native archives are available for macOS, Linux, and Windows on amd64 and arm64, with SHA-256 checksums. Homebrew users can upgrade through the mnemon-dev/tap tap.

    Pi users must refresh the installed integration after upgrading, using the same scope as the original installation:

    # Project-local installation: run from the project directory.
    mnemon setup --target pi --yes
    
    # User-global installation:
    mnemon setup --target pi --global --yes
    

    Then restart Pi or use /reload. Keep any existing PI_CODING_AGENT_DIR and MNEMON_DATA_DIR overrides when rerunning setup.

    Validation

    • Product build, make test (including go vet ./...), 33 Pi callback/process regressions, and 13 npm distribution tooling tests on the merged release source.
    • Linux and native Windows CI on the merged release source.
    • Before merging: actual Pi 1.3.0 sessions with isolated stores and a deterministic local provider verified global, project-local, and custom-directory installations, injected guidance, and real recall/remember commands. These checks do not evaluate an LLM's compliance with the guide and use no paid model calls.
    • Native Windows Pi integration: 27 passing tests; six Unix-only cases skipped on Windows and passing locally. Coverage includes HOME unset, native and npm layouts, and original-asset controls.
    • Published macOS arm64 archive and npm package: verified archive checksum and identical native binaries; exercised version reporting, memory write/search/recall, Agency help, and the embedded Web workspace. The published binary also passed an actual Pi 1.3.0 session, and the installed npm launcher passed eight mixed Pi/Claude setup, reinstall, and scoped-removal scenarios.

    The release workflow completed successfully, including frontend checks, deterministic tests, six-platform builds, Homebrew publication, and npm publication.

    Full comparison

  3. v0.2.112026-10-18 · 2026-10-18 12:41 UTC
    查看更新说明

    v0.2.11 adds a local, read-only WebUI for exploring Mnemon memories and reduces false recall matches caused by common words accumulating as entities. Memory and the local Agency authority remain available in one mnemon executable.

    New: local memory workspace

    • Run mnemon web to browse an overview, searchable and filterable memory library, Markdown reader, interactive relationship graph, entity explorer, and activity history. Store-scoped URLs preserve navigation and filters; views support manual refresh and visible-tab polling.
    • Use the official Mnemon logo, locally bundled Space Grotesk typography, and graphite/silver themes. Appearance follows the system or persists a light/dark choice across tabs.
    • Read committed SQLite WAL updates through dedicated read-only connections without changing memory content, access counters, retention scores, operation logs, or the CLI's active store. Request-owned snapshots keep each response consistent.
    • Bundle frontend scripts, fonts, and production assets in the existing executable. Browsing requires no separate frontend service or model calls. The server binds to loopback and enforces same-origin, read-only API access, bounded queries, and safe Markdown rendering.

    See the workspace guide and PR #163.

    Recall and compatibility fixes

    • Exclude entities attached to more than max(20, 1% of active memories) memories from the known-entity expansion filter. This reduces automatic propagation of ordinary words and unrelated matches through entity overlap. Strict regex and dictionary extraction, and explicit entity handling, retain their existing behavior. Historical entities and relationship edges are preserved. See PR #160.
    • Correct Windows drive-letter handling in the live read-only SQLite URI and use portable path-escaping test fixtures.

    Install or update

    npm install --global @mnemon-dev/[email protected]
    mnemon --version
    mnemon web
    

    Open http://127.0.0.1:8484. Keep the WebUI local; this release does not add remote/team authentication or memory editing.

    Existing npm-managed installations can also run mnemon update. Native archives are available below for macOS, Linux, and Windows on amd64 and arm64, with SHA-256 checksums. Homebrew users can upgrade through the mnemon-dev/tap tap.

    Validation

    • Frontend typechecking, 49 frontend tests, production rebuild, and committed asset parity.
    • go build -o mnemon ., make test (including go vet ./...), and the Web server lifecycle integration test.
    • 13 npm distribution tooling tests, plus Linux and native Windows CI on the merged release source.

    Full comparison

  4. v0.2.102026-10-03 · 2026-10-03 12:32 UTC
    查看更新说明

    v0.2.10 improves Memory retrieval performance, storage efficiency, and OpenCode/Windows integrations. Memory and the local Agency authority remain available in one mnemon binary.

    Changes

    • Speed up ordered Memory queries and bounded graph neighborhoods with targeted indexes and local traversal. Reduce keyword/vector recall allocations, reuse exact cosine scores and vector decode buffers, bound semantic candidate selection, and reuse insert statements within transactions.
    • Rank graph transitions by intent and similarity before applying the visit budget, preserving high-relevance neighbors. Reuse caller-loaded records and ranked neighborhoods during recall, with covering edge indexes and candidate-scoped supersession lookups.
    • Keep Ollama embedding models loaded for 30 minutes by default; configure the duration with MNEMON_EMBED_KEEP_ALIVE.
    • Add mnemon gc --compact for database compaction, including explicit handling of busy checkpoints.
    • Support the OpenCode v2 plugin lifecycle and OpenCode v1.18.29 or newer.
    • Fix UTF-8 input handling in ZCode's Windows hooks and suppress extra native CLI console windows in npm-managed Windows installations.

    Performance

    The committed benchmark compares the optimized Memory implementation with the preceding master revision, using five alternating runs at N=1/10/100/1,000/10,000. At N=10,000, median hybrid-recall CPU time improved from 93.06 ms to 66.53 ms and cumulative allocation fell by 37.7%; atomic batch-insert CPU time improved from 524.33 ms to 431.60 ms. These are synthetic local measurements, with small-input tradeoffs documented alongside the gains. Exact vector search remains exact.

    See the full analysis and raw samples and 中文报告.

    Install or update

    npm install --global @mnemon-dev/[email protected]
    mnemon --version
    

    Existing npm-managed installations can also run mnemon update. Native archives are available below for macOS, Linux, and Windows on amd64 and arm64, with SHA-256 checksums. Homebrew users can upgrade through the mnemon-dev/tap tap.

    To refresh existing OpenCode or ZCode integrations, rerun mnemon setup for that target with the original project/global scope, then restart the host application. Updating the binary alone does not replace previously installed hooks.

    Full comparison

  5. v0.2.92026-09-17 · 2026-09-17 15:23 UTC
    查看更新说明

    v0.2.9 improves memory corrections, multilingual recall, and installation reliability. Memory and the local Agency authority remain available in one mnemon binary.

    Changes

    • Add directed supersedes links so a correction can demote an older insight during recall while preserving its history. Support the relation in import, related queries, and brief recall output.
    • Preserve distinct facts during writes and imports. Diagnose negated restatements as conflicts instead of silently treating them as duplicates.
    • Recognize recall intent across additional languages.
    • Honor proxy environment variables for remote embedding endpoints while keeping loopback connections direct.
    • Generate Homebrew casks with postflight_steps to eliminate the deprecated postflight warning.

    Install or update

    npm install --global @mnemon-dev/[email protected]
    mnemon --version
    

    Existing npm-managed installations can also run mnemon update.

    Native archives are available below for macOS, Linux, and Windows on amd64 and arm64, with SHA-256 checksums. Homebrew users can upgrade through the mnemon-dev/tap tap.

    Full comparison

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    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.

    Why Mnemon?

    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.

    PatternLLM RoleRepresentative
    LLM-EmbeddedExecutor inside the pipelineMem0, Letta
    File InjectionNone — reads file at session startClaude Code Memory
    MCP ServerTool provider via MCP protocolclaude-mem
    LLM-SupervisedExternal supervisor of a standalone binaryMnemon

    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.

    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.

    See Design & Architecture for details.

    Web knowledge workspace

    Browse the knowledge accumulated by your agents in a standalone local website:

    mnemon web
    # Open http://127.0.0.1:8484
    
    Optional: [shared Memory service and paper strategy](https://github.com/mnemon-dev/mnemon/blob/HEAD/docs/memory-service.md), with [composable records indexes](https://github.com/mnemon-dev/mnemon/blob/HEAD/docs/records-indexes.md).
    

    Explore a searchable memory library, readable memory pages, a relationship graph, entities, and recorded activity. Select a memory store in the sidebar while agents continue writing through the existing CLI. Browsing preserves memory content, access counts, retention weights, and the CLI's active-store selection.

    Use mnemon web --store <name> --port 8485 to choose the initial store and port. The interface ships inside the Mnemon executable and uses bundled local assets. See the web workspace guide for usage, live-read behavior, and frontend development.

    Quick Start

    Install

    npm (recommended; macOS / Linux / Windows, Node.js 22+):

    npm install --global @mnemon-dev/mnemon
    

    Upgrade the npm-managed CLI at any time:

    mnemon update
    

    The 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@latest
    

    Homebrew, 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 install
    

    Verify installation:

    mnemon --version
    mnemon agency --version
    

    Agency (Preview · Pi-first)

    mnemon 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.

    Claude Code

    mnemon setup
    

    mnemon setup auto-detects Claude Code, then interactively deploys skill, hooks, and behavioral guide. Start a new session — memory just works.

    Codex

    mnemon setup --target codex --yes
    

    One command deploys the mnemon skill, prompt files, and Codex lifecycle hooks (SessionStart, UserPromptSubmit, Stop) in .codex/hooks.json.

    Cursor

    mnemon setup --target cursor --yes
    

    One 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.

    ZCode

    mnemon setup --target zcode --global --yes
    

    ZCode 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.

    The Stop hook honors stop_hook_active to avoid repeated reminders. Its completion fallback recognizes mnemon, durable memory, 持久记忆, and 写入记忆; the reminder asks for a [mnemon] marker so evaluations in any language can finish without another reminder. Windows hooks decode stdin as UTF-8, and the PowerShell script containing Chinese tokens includes a UTF-8 BOM for Windows PowerShell 5.1. Re-run setup and start a new ZCode session to update previously installed hooks.

    MiniMax Code

    mnemon setup --target minimax-code --yes
    

    One 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.

    TRAE (TRAE Work)

    mnemon setup --target trae --yes
    

    One 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.

    Qoder (QoderWork)

    mnemon setup --target qoder --yes
    mnemon setup --target qoderwork --yes
    

    Qoder 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.

    CodeBuddy

    mnemon setup --target codebuddy --yes
    

    CodeBuddy deploys the mnemon skill, prompt files, and native hooks to .codebuddy/ or ~/.codebuddy/. The integration registers SessionStart, UserPromptSubmit, and Stop hooks in settings.json.

    WorkBuddy

    mnemon setup --target workbuddy --yes
    

    WorkBuddy deploys the mnemon skill, prompt files, and native hooks to .workbuddy/ or ~/.workbuddy/. The integration registers SessionStart, UserPromptSubmit, and Stop hooks in settings.json.

    Kimi Code

    mnemon setup --target kimi --yes
    

    Kimi 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.

    OpenCode

    mnemon setup --target opencode --yes
    

    OpenCode 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.

    The plugin supports OpenCode v2 and v1.18.29 or newer. After updating Mnemon, rerun setup with the same scope (add --global for a user-wide installation), then restart OpenCode to replace an older plugin. See the OpenCode setup notes for runtime requirements.

    OpenClaw

    mnemon setup --target openclaw --yes
    

    One command deploys skill, hook, plugin, and behavioral guide to ~/.openclaw/. Restart the OpenClaw gateway to activate.

    Pi

    mnemon setup --target pi --yes
    

    One 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.

    Hermes Agent

    mnemon setup --target hermes --yes
    

    One 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.

    Alma

    mnemon setup --target alma --yes
    

    One command deploys the mnemon skill, a mem shim, and a single app.ready hook to ~/.config/alma/. Alma's hook stdout is not injected into the model context — only decision, reason, and updatedInput from the last JSON line are consumed — so the integration is deliberately shaped differently from the lifecycle-hook targets: the hook does one job (refresh a generated block inside MEMORY.md, which Alma already injects into its system prompt every request), and recall is left to the model through the skill. The block is delimited by <!-- mnemon:begin --> / <!-- mnemon:end --> and everything outside those markers is preserved byte for byte, because Alma's own prompt tells the model to write to the same file.

    Alma has no project-local hook configuration, so this target is user-global only.

    DeepSeek Harness

    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 web
    

    The 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

    NanoClaw runs agents inside Linux containers. Use the /add-mnemon skill to integrate:

    1. Install mnemon on the host (see above)
    2. In your NanoClaw project, run /add-mnemon — Claude Code will modify the Dockerfile, add a container skill, and set up volume mounts
    3. Each WhatsApp group gets its own isolated memory store, with optional global shared memory (read-only)

    The skill is available at .claude/skills/add-mnemon/ in the NanoClaw repo.

    Nanobot

    mnemon setup --target nanobot --global --yes
    

    One 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.

    Uninstall

    mnemon setup --eject
    

    How it works

    Once 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 setup installs the closest native mapping for each supported runtime.

    Session starts
        |
        v
      Prime   -> make skill, guide, and active store visible
        |
        v
    User prompt arrives
        |
        v
      Remind  -> decide whether recall could change this task
        |
        v
    Agent works and calls Mnemon only when useful
        |
        v
      Nudge   -> decide whether durable writeback is justified
        |
        v
    Before context compaction
        |
        v
      Compact -> preserve only critical continuity
    

    The four hook phases are reminders, not a hard workflow. Prime makes the skill, guide, and active store visible. Remind prompts a recall decision. Nudge prompts a writeback decision. Compact preserves only critical continuity before context compression.

    You don't run mnemon commands yourself. The agent does when the guide says memory is useful.

    Features

    • Zero user-side operation — install once; supported runtimes can use hooks, minimal runtimes can use persistent rules
    • LLM-supervised — the host LLM decides what to remember, update, and forget; no embedded LLM, no API keys
    • Multi-framework support — Claude Code, Codex, Cursor, ZCode, TRAE/TRAE Work, Qoder/QoderWork, CodeBuddy, WorkBuddy, Kimi Code, OpenCode, and Hermes Agent (hooks/plugins), OpenClaw (plugins), Pi (extensions), Alma (skill + app.ready hook), MiniMax Code and Nanobot (skills), DeepSeek Harness (via the dsh-mnemon plugin), and more
    • Runtime-native integration — runtime-specific SKILL.md, shared guide.md, and supported hooks or extensions
    • Four-graph architecture — temporal, entity, causal, and semantic edges, not just vector similarity
    • Intent-native protocol — three primitives (remember, link, recall) map to the LLM's cognitive vocabulary, not database syntax; structured JSON output with signal transparency
    • Intent-aware recall — graph traversal + optional vector search (RRF fusion), enabled by default for all queries
    • Built-in deduplication — remember and import skip exact content repeats and preserve distinct facts; similarity suggestions guide review
    • Retention lifecycle — importance decay, access-count boosting, and garbage collection
    • Privacy-safe receipts — export hashed operation receipts for memory-boundary audits without raw memory contents or queries
    • Optional embeddings — works fully without an embedding provider; add local Ollama or an OpenAI-compatible server for enhanced vector+keyword hybrid search

    Vision

    All your local agentic AIs — across sessions and frameworks — sharing one pool of live memory.

      Claude Code ───────┐
                         │
      Codex ─────────────┤
                         │
      Cursor ────────────┤
                         │
      ZCode ─────────────┤
                         │
      MiniMax Code ──────┤
                         │
      TRAE ──────────────┤
                         │
      TRAE Work ─────────┤
                         │
      Qoder ─────────────┤
                         │
      QoderWork ─────────┤
                         │
      CodeBuddy ─────────┤
                         │
      WorkBuddy ─────────┤
                         │
      Kimi Code ─────────┤
                         │
      Hermes Agent ──────┤
                         │
      DeepSeek Harness ──┤
                         │
      OpenClaw ──────────┤
                         │
      Pi ────────────────┤
                         │
      Nanobot ───────────┤
                         │
      NanoClaw ──────────┤
                         ├──▶  ~/.mnemon  ◀── shared memory
      OpenCode ──────────┤
                         │
      Gemini CLI ────────┘
    

    The foundation is in place: a single ~/.mnemon database that any agent can read and write. Claude Code, Codex, Cursor, ZCode, TRAE/TRAE Work, Qoder/QoderWork, CodeBuddy, WorkBuddy, Kimi Code, OpenCode, and Hermes Agent setup automate hook/plugin installation; OpenClaw can use plugin hooks; Pi integrates via native skills and TypeScript lifecycle extensions; MiniMax Code and Nanobot integrate via skill files; NanoClaw integrates via container skills and volume mounts. The same integration bundle can be installed in any LLM CLI that supports skills, rules, system prompts, or event hooks.

    The longer-term direction is a memory gateway: protocol decoupled from storage engine. The current SQLite backend is the first adapter; the protocol surface (remember / link / recall) can sit on top of PostgreSQL, Neo4j, or any graph database. Agent-side optimization (when to recall, what to remember) and storage-side optimization (indexing, graph algorithms) evolve independently. See Future Direction for details.

    FAQ

    Do different sessions share memory? Yes. By default, all sessions use the same default store — a decision remembered in one session is available in every future session.

    Can I isolate memory per project or agent? Yes. Use named stores to separate memory:

    mnemon store create work        # create a new store
    mnemon store set work           # set as default
    MNEMON_STORE=work mnemon recall "query"  # or use env var per-process
    

    Different agents/processes can use different stores via the MNEMON_STORE environment variable — no global state contention.

    Local or global mode? mnemon setup defaults to local (project-scoped .claude/), recommended for most users. Global (mnemon setup --global, installed to ~/.claude/) activates mnemon across all projects — convenient if you want other frameworks (e.g., OpenClaw) to share memory by forwarding requests through Claude Code CLI, but may add maintenance overhead.

    How do I customize the behavior? Edit the generated guideline (~/.mnemon/prompt/guide.md in current setup flows). Skill files should stay focused on command syntax.

    What is sub-agent delegation? Sub-agent delegation is optional. When a runtime supports it, the main agent can decide what to remember and ask a cheaper or isolated worker to execute mnemon remember. It is a useful execution strategy, not a required part of the Mnemon architecture.

    Configuration

    Environment VariableDefaultDescription
    MNEMON_DATA_DIR~/.mnemonBase data directory
    MNEMON_STORE(active file or default)Named memory store for data isolation

    Retention:

    Environment VariableDefaultDescription
    MNEMON_MAX_INSIGHTS1000Active-insight ceiling; 0 disables automatic pruning
    MNEMON_AUTO_PRUNE_MIN_AGE24hGrace period before an insight can be auto-pruned; accepts 24h, 7d, or 0

    Each automatic deletion is soft, appears in the oplog as a prune operation, and is reported by ID in the triggering command's auto_pruned_ids field.

    Embedding (only relevant if using embeddings):

    Environment VariableDefaultDescription
    MNEMON_EMBED_ENDPOINThttp://localhost:11434Embedding API endpoint
    MNEMON_EMBED_MODELnomic-embed-textEmbedding model name
    MNEMON_EMBED_PROTOCOL(auto-detect)ollama or openai; auto-detected from an endpoint ending in /v1
    MNEMON_EMBED_API_KEY(none)Bearer token for OpenAI-compatible servers (oMLX, vLLM, etc.)
    MNEMON_EMBED_KEEP_ALIVE30mHow long Ollama keeps the embedding model loaded after each request (ignored for OpenAI-compatible servers)
    MNEMON_EMBED_DIMENSIONS(native)Optional Matryoshka dimension truncation

    The embedding client speaks the Ollama API by default and the OpenAI-compatible embeddings API when the endpoint ends in /v1 (or when MNEMON_EMBED_PROTOCOL=openai is set). OpenAI-compatible servers are normally probed via their models route; servers that do not serve that route (e.g. Voyage AI) are detected via an embeddings round-trip instead. For example, a local server such as oMLX can be configured with:

    export MNEMON_EMBED_ENDPOINT=http://127.0.0.1:18000/v1
    export MNEMON_EMBED_MODEL=bge-m3-mlx-8bit
    export MNEMON_EMBED_API_KEY=sk-... # omit for keyless local servers
    mnemon embed --status
    

    A hosted provider such as Voyage AI needs only the endpoint, model, and key:

    export MNEMON_EMBED_ENDPOINT=https://api.voyageai.com/v1
    export MNEMON_EMBED_MODEL=voyage-3.5
    export MNEMON_EMBED_API_KEY=pa-...
    mnemon embed --status
    

    Development

    make build          # build the single mnemon executable
    make install        # build + install to $GOBIN
    make test           # run deterministic CI tests
    make test-integration  # opt-in CLI E2E and Agency boundary tests
    mnemon setup        # interactive setup
    mnemon setup --eject  # remove all integrations
    make help           # show all targets
    

    Dependencies: Go 1.24+, modernc.org/sqlite, spf13/cobra, google/uuid

    See Development and Deployment for Docker, Compose, Ollama embedding, and release setup.

    Optional Memory Agent and AML backend

    The Memory Agent exposes the v0.3.4 AML evaluation engine through explicit mnemon memory-agent ... commands. It stores original records, builds a source-linked memory index, and returns evidence for an agent to answer from. Reads and consolidation require separately configured models.

    Existing remember, recall, search, setup, hooks, and the Web library keep using native Memory and mnemon.db. No automatic migration, model activation, or switch of the default engine is performed. Build this branch to use the new commands; opening a PR does not update the published CLI or npm release.

    mnemon memory-agent aml-serve adds the AML Add/Search API with per-user stores, bounded background consolidation, authentication and budgets. Its operational surface includes readiness, metrics, redacted logs, traces and read-only inspection. See the AML adapter runbook, Admin API, and Inspect API. The separate hosted console, frontend UI/UX, design prototypes and private evaluation data are outside this source snapshot.

    Documentation

    • Agency Preview — maturity boundary, Pi setup, operating model, completion semantics, and optional peers
    • Go Engineering Standard — maintainability, concurrency, persistence, testing, and review thresholds
    • Design & Architecture — current engine architecture, algorithms, integration design
    • Memory Usage & Reference — root Memory commands, import, receipts, and embedding support
    • Optional Memory Agent — v0.3.4 baseline, explicit configuration, records and evidence Views
    • Memory Import Guide — schema and LLM prompt for importing historical chats
    • Architecture Diagrams — system architecture, pipelines, lifecycle management
    • Memory Agent (experimental) — research preview of Mnemon as a memory agent on DSH, with Jev as its System 1 decision model; paper, code and run records
    • AML adapter runbook — the Agent Memory Leaderboard service as memory cloud instances: install, open, operate, alerts, data deletion
    • Admin API — an instance's admin listener: token, private bind, metrics, readiness, status and store overview

    Star History

    References

    Mnemon combines the paradigm of one paper with the methodology of another, grounded in the structural insight that graph memory is isomorphic to LLM attention. See Theoretical Foundations for details.

    • RLM — Zhang, Kraska & Khattab. Recursive Language Models. 2025. Establishes the paradigm: LLMs are more effective as orchestrators of external environments than as direct data processors.
    • MAGMA — Zou et al. A Multi-Graph based Agentic Memory Architecture. 2025. Provides the methodology: four-graph model (temporal, entity, causal, semantic) with intent-adaptive retrieval.
    • Graph-LLM Structural Insight — Joshi & Zhu. Building Powerful GNNs from Transformers. 2025; and the Graph-based Agent Memory survey (Chang Yang et al., 2026). Confirms that LLM attention is computationally equivalent to GNN operations — graph memory is a structural match, not an engineering convenience.

    License

    Copyright 2026 Grivn and Mnemon contributors.

    Apache-2.0

    The bracketed copyright example near the end of LICENSE is part of Apache 2.0's standard application appendix; this section carries the project's actual copyright notice.