Graph-MIND

io.github.goyohan0611-pngv0.2.1更新於 Oct 8, 2026

Local-first memory for Claude Code, Codex and Claude Desktop, kept verbatim on your own PC.

概覽

AI 產生的概覽

Graph-MIND 為 AI 程式助理提供本機、逐字保存的過往對話記憶,並可透過 MCP 檢索。

功能
Graph-MIND 會把 Claude Code、Codex 與 Claude Desktop 的對話逐字記錄到使用者自己電腦上的儲存區,寫入時不摘要、不呼叫模型。其 MCP 工具包括 brain_context(回傳與請求相關的有限歷史片段)、brain_recall(依實體直接查找)、brain_remember(儲存有來源的記憶或決定)、brain_folder(定位並共享儲存區)以及 code_activity(查看專案變更)。搜尋採混合方式,結合本機嵌入與關鍵字檢索。
適用情境
適合希望助理記住跨程式工具的早期工作階段、回答依賴過往對話的問題,同時把資料留在本機的情境。也適合在不同模型或應用之間切換、想要一份共享記憶並接受 alpha 階段工具的使用者。
執行需求
透過 pip 套件 graph-mind-memory 在本機安裝,需 Python 3.10+(64 位元),支援 Windows、macOS 或 Linux;安裝程式會向偵測到的應用註冊 MCP 伺服器、在登入時啟動背景擷取服務並下載嵌入模型,PyTorch CPU 約 2 GB。若由某台電腦代管供其他電腦共享的記憶,該電腦需 Python 3.12 或更舊版本。一般使用未宣告帳號或 API 金鑰。
安裝前請注意
擷取服務會讀取各應用的本機記錄並自動儲存對話輪次,會遮蔽 API 金鑰、權杖、私鑰與 URL 中的密碼,但格式不明顯的一般密碼不會被遮蔽。forget 指令會在本機刪除符合的輪次,並通知其他電腦刪除副本。跨電腦共享使用產生的密碼與連線碼;README 提醒連線碼包含密碼,不應公開張貼。重現基準測試需設定 OPENAI_API_KEY,完整執行約花費 3 美元。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Graph-MIND,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

Graph-MIND

Local-first memory for AI coding assistants. Verbatim storage, on your own PC: 88.8% on LongMemEval with zero model calls at write time.

[圖片] [圖片] [圖片] [圖片] [圖片] [圖片]

Switch models; keep the memory.

[A decision made in Claude Code on Monday, recalled from Codex on Wednesday]

A real run, not a mock-up: python demo/record_demo.py records it from a fresh store.

[!NOTE] Alpha (v0.1). Used daily on Windows 11, and checked in a fresh-install, two-PC end-to-end run. The test suite also passes on Linux and macOS in CI, but nobody has used it day to day there yet.


What it is

Graph-MIND records every conversation you have with Claude Code, Codex and Claude Desktop, word for word, in a store on your own PC. When a question depends on the past, the model you are using calls Graph-MIND over MCP and gets back a few thousand tokens of the conversations that answer it.

  • Nothing is summarised or rewritten. Saving is a database write. No model call, no tokens.
  • Search is hybrid. Your words are embedded on your PC (multilingual MiniLM, no API) and fused with keyword search. Korean and English both work.
  • Capture is automatic. A background service reads each app's local transcripts, masks secrets, stores the turns and embeds them as they arrive.
  • One memory across your PCs. One sentence to the AI on the first PC, one command on the others (see below).
  • Nothing leaves your machines. There is no cloud, no account and no telemetry.

Benchmarks

All numbers below come from files in this repository: the pre-registrations, each question's answer, and the judge's verdict on it, under runs/. The method is in REPORT.md, including the failures and the corrections.

LongMemEval_S: answer accuracy, 500 questions. The answer model is gpt-5-mini; the judge is the official gpt-4o-2024-08-06.

accuracymodel tokens at write timepacket read per question
All 500 questions88.8% (444/500)03.4k tokens
The 380 never used for tuning86.8% (330/380)03.4k tokens

Head to head: same 40 questions, same answer model, prompt and judge. The run was pre-registered with code hashes; nobody had tuned on these questions.

systemaccuracymodel tokens at write time, per question
Graph-MIND (shipped path, earlier 20-item packet)85.0%0
MemPalace 3.10.057.5%0
Mem0 2.2.1 (open source, latest on PyPI)52.5%~640k

Graph-MIND's lead over both is significant (exact McNemar p = 0.002 and 0.003).

Reading other published numbers. They measure different things, so they do not compare directly with the tables above:

  • MemPalace's 96.6% is retrieval recall (R@5): is the right session among the five returned? This table measures whether the final answer is correct.
  • Mem0's 94.4% is its managed cloud platform, which includes proprietary components. The open source package tested here is a different system.
  • Mastra (94.87%), Emergence (86%), Supermemory (85.2%) and Zep (71.2%) report their own setups and answer models. They were not reproduced here.

As far as we know, everything above 85% on that list runs a model over your conversations when it saves them. Graph-MIND does not.


Install

Requires Python 3.10+ (64-bit). Windows, macOS or Linux. Hosting a brain that other PCs join needs Python 3.12 or older on that one PC (its Postgres helper, pgserver, has no newer build yet); everything else, joining included, works on 3.13 and 3.14 too.

bash
pip install graph-mind-memorygraph-mind-install

If graph-mind-install is "not recognized", pip put it in a Scripts folder that is not on your PATH (common with the Windows Python install manager). python -m install runs the same thing. If it stops with WinError 1114 loading c10.dll, Windows is missing the Microsoft Visual C++ runtime that PyTorch needs: install vc_redist.x64.exe, restart, and run the installer again.

or from source:

bash
git clone https://github.com/goyohan0611-png/graph-mind.gitcd graph-mindpython install.py

The installer:

  • installs the packages (PyTorch CPU is the large one, about 2 GB);
  • registers the MCP server with every app it finds: Claude Code, Claude Desktop (including the Microsoft Store build) and Codex;
  • starts the capture service at login (Windows Startup folder, a macOS LaunchAgent, or an XDG autostart entry on Linux);
  • downloads the embedding model.

Then restart your AI apps. The server is also listed in the MCP Registry as io.github.goyohan0611-png/graph-mind. Running the installer again is safe. Run it again if you move the folder.

[!TIP] If pip fails with "No such file or directory", Windows' 260-character path limit is the usual cause. Clone to a short path such as C:\graph-mind, or enable long paths. The installer prints the command for that.


What it captures

appcaptured
Codex: terminal, VS Code, ChatGPT desktop's work modeevery turn
Claude Code: terminal, VS Code, Claude desktop's Code tabevery turn
Claude desktop: Coworkevery turn
Claude desktop: chatwhat the model saves with brain_remember

Before anything is stored, these are masked: API keys, tokens from GitHub, AWS, Google and Slack, private keys, and passwords inside URLs.

Only what you actually send is captured: the service reads each app's transcript, which is written after you press Enter, so a paste you delete before sending never reaches it. A plain password like hunter2 has no recognizable format and is not masked. To remove something:

bash
graph-mind-forget          # asks for the phrase without showing it, then confirms

It deletes every captured turn and memory containing the phrase from this PC and its indexes, removes their lines from the shared memory, and tells your other PCs to delete their copies on their next sync. Only ids are shared for that, never the phrase. Your AI app's own history (for Claude Code, ~/.claude/projects) is separate and is not touched.


MCP tools

toolwhat it does
brain_contexta bounded packet of the past turns and memories that answer a request; recent=true for "where did we leave off?"
brain_recalllook memories and captured turns up directly; entity= for everything about one thing, in order
brain_remembersave a sourced memory or decision (secrets masked)
brain_folderwhere the memory lives; share it with your other PCs; reindex an imported backlog
code_activitywhat changed in a project, file or symbol, and when (when a code folder is watched)

Five tools on purpose: every tool's description is read by the model on every turn, and similar tools get confused with each other. Version 0.1 had thirteen.


One memory across PCs

On the PC that holds the memory, tell its AI:

"Let my other PCs use this memory."

It replies with a connection code (gm1.…). On each other PC:

bash
graph-mind-install --join gm1.…     # or: python install.py --join gm1.…

The memory then lives in a Postgres server on the first PC, which Graph-MIND sets up itself. Other PCs reach it over the local network in the office, or over Tailscale from anywhere. Each connection tries the addresses in turn and uses the first that answers.

Other PCs log in with a generated password, as a role that can reach only the memory database. The Windows firewall rule admits only the local network and Tailscale. The code contains the password: do not post it publicly.

A synced folder also works. Tell the AI "use my Google Drive's Graph-MIND folder as my memory" on each PC.


Reproducing the benchmarks

  1. Download longmemeval_s_cleaned.json from LongMemEval into external/longmemeval/.
  2. Set OPENAI_API_KEY for the answer model and the judge.
  3. Run the commands in REPORT.md §10.

A full 500-question run costs about US$3.

Tests

bash
python -m unittest discover -p "test_*.py"

Known limits

  • The first question after an AI app starts waits for the embedding model to load (a few seconds; 30-50 s on a slow or synced disk). Later questions take well under a second.
  • Daily use on Windows only so far. macOS and Linux pass the tests in CI but have not seen real use.
  • Capture follows each app's transcript format, which is not a public interface. An app update can stop capture until Graph-MIND is updated.
  • Multi-session questions are the weakest type at 80%. These are questions that count or combine facts across many conversations.
  • The repository still holds the research-phase experiments next to the product (see Repository layout); the installed package carries only the 21 product modules.

The full list is in REPORT.md §9.

Repository layout

files
Product (what pip install graph-mind-memory installs)graph_mind_mcp_server.py (MCP server), automatic_capture*.py (capture service), install.py, brain_log.py (sharing across PCs), local_brain.py / conversation_memory.py / coding_memory.py / development_memory.py (stores), semantic_recall.py / local_embedder.py / vector_cache.py / embedding_warmup.py (search), and their helpers
Benchmarksproduct_answer_eval.py, official_judge_v073.py, rival_mem0.py, rival_mempalace.py, rival_clean_prereg.py, and the result files under runs/
Research phasethe other modules: earlier extraction pipelines and analyses that REPORT.md cites
Teststest_*.py

Contributing

Issues and pull requests are welcome. Contributions are accepted under the CLA, which keeps the dual license possible.

License

AGPL-3.0. Anyone running a modified Graph-MIND as a network service, such as the memory behind a support chatbot, must publish that source. A commercial license is available for products that cannot.

來源:README.md,提交 463ff0d

工具

0
工具後設資料尚未被收錄。

版本歷史

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