Graphmem

io.github.sonic182v0.10.1更新于 Oct 8, 2026

Shared local memory for coding agents: SQLite, semantic recall, linked entities, code navigation.

已验证STDIO仅桌面Developer ToolsKnowledge & Memory

概览

AI 生成的概览

为编码代理提供共享的本地记忆存储,用于保存项目决策,并提供可选的代码导航工具。

功能
Graphmem 将项目记忆持久保存在 ~/.graphmem 下的本地 SQLite 数据库中,支持语义检索和实体关联,使代理能够跨会话、跨工具回忆上下文。记忆按当前 Git 仓库或全局范围划分,读取时始终包含全局记忆。可选的代码工具可以查找符号定义、列出文件大纲、列出导入,并比较不同 Git 修订之间的符号。它以 stdio 方式作为本地 MCP 服务器运行,可被多个 MCP 客户端共享。
适用场景
当你希望编码代理在会话之间、以及在 Claude Code、Codex、OpenCode、pi 等不同客户端之间记住约定、决策和上下文时使用。也适合助手需要轻量、感知 Git 的代码导航且不想使用嵌入模型的情况。
运行要求
需要 Node.js 和 npm 安装该包;gmem 二进制文件必须在 PATH 中,gmem-install 会下载并校验匹配的 CPU 二进制文件。仓库范围划分需要 PATH 中有 git。Linux 发行版需要 glibc 2.39 和 OpenSSL 3;其他系统或 CUDA 需要从源码构建。数据存放在 ~/.graphmem,可通过 GRAPHMEM_HOME 更改。未声明账户或 API 密钥。
安装前请注意
安装程序会从 GitHub Releases 下载平台二进制文件,因此需要网络访问并信任该来源。写入、更新和删除仅限于当前仓库和全局范围,但仍会修改已存储的记忆数据。可用 GRAPHMEM_CODE=off 禁用代码工具。未声明凭据或付费。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Graphmem,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

Graphmem

[CI]

[Graphmem — Shared, local memory for coding agents]

Shared, local memory for coding agents. Keep project decisions across sessions and tools with SQLite storage, local semantic search, and linked entities. Claude Code, Codex, OpenCode, pi, and other MCP clients can share the same store.

Optional code tools find definitions, outline files, list imports, and compare symbols between Git revisions.

Install

sh
npm install --global @sonic182/graphmemgmem-installgmem version

The npm package contains launchers. gmem-install explicitly downloads and verifies the matching CPU binary, or reuses a working native gmem on your PATH. Package installation itself downloads no binary. After upgrading the package, run gmem-install again; separately installed binaries are not replaced.

MCP clients that launch servers with npx can run npx -y @sonic182/graphmem mcp. The graphmem command downloads and verifies the binary on its first run; gmem never downloads anything on its own.

Alternatively, download your platform's archive from GitHub Releases, verify it against SHA256SUMS, and put the extracted executable on your PATH. Linux releases require glibc 2.39 and OpenSSL 3. For other systems or CUDA, build from source.

Use it with your coding agent

Plugins include MCP registration, skills, and guidance to recall context before work and save durable decisions afterward.

AgentInstall
Claude Codeclaude plugin marketplace add sonic182/graphmem, then claude plugin install graphmem@graphmem
Codexcodex plugin marketplace add sonic182/graphmem, then codex plugin add graphmem@graphmem
OpenCodeopencode plugin @sonic182/graphmem --global
pipi install npm:@sonic182/graphmem

Claude Code and Codex need gmem and Node.js on PATH. In Codex, trust the Graphmem hooks in /hooks and start a new thread. Pi offers binary setup on first startup; OpenCode prints an installer command if needed.

See plugin setup and troubleshooting.

For another MCP client, configure it to launch your installed binary:

json
{  "mcpServers": {    "graphmem": {      "command": "/absolute/path/to/gmem",      "args": ["mcp"]    }  }}

CLI

sh
gmem remember "Use nextest for integration tests" \  --type convention --scope repo:/absolute/path/to/projectgmem search "integration tests"gmem tuigmem mcp

Memories default to the current Git repository; git must be on PATH. Outside a repository, the default scope is global. Reads always include global memories; explicitly select other projects with --scope (CLI) or scopes (MCP). Writes are limited to the current repository and global, including updates and deletions. The MCP list_scopes tool discovers scopes and their write permissions. Data lives in ~/.graphmem; set GRAPHMEM_HOME to use another directory.

CLI reference · MCP tool reference

Code navigation (optional)

Release binaries include these tools; source builds need --features code.

MCP toolPurpose
find_symbolFind a definition and its source range
code_outlineList a file's definitions and nesting
code_importsList declared imports
code_diffCompare symbols between Git revisions
sh
gmem code find CodeServicegmem code outline src/application/code.rsgmem code imports src/application/code.rsgmem code diff origin/master

These tools work on Git checkouts without an embedding model. They index definitions, not call sites or references; use ast-grep for those. Set GRAPHMEM_CODE=off to disable code tools.

Options and supported languages · Benchmark results and limitations

Configuration

No config file is required. To customize embeddings, retrieval, or code indexing, create ~/.graphmem/config.toml. See the configuration reference.

Build

See source builds and CUDA setup.

Development

sh
just verify

Runs formatting checks, compilation, Clippy, and tests. Design · Schema evolution

To preview the documentation site, run hugo server --source site. See site setup.

License

MIT.

来源:README.md,提交 3eb8be2

工具

0
工具元数据尚未被收录。

版本历史

1
  1. v0.10.1最新Oct 8, 2026