What it does
Graph Memory takes over the model-visible historical surface of a DSH session. It keeps the newest N completed user turns verbatim — five by default — replaces the older request prefix with a single archive marker, and reconstructs what it removed through recall: remembered turns that each carry the exact original question and final answer.
One thing matters more than any other detail. In 1.6 the graph is a navigation layer, not the payload. Each completed turn triggers one structured LLM call that must return a summary, an outcome and zero or more subject–predicate–object triples, but what reaches the model is the original question and answer the nodes point at. The README puts it plainly: “Summary, SPO, and communities only navigate; original question and final answer remain the evidence.”
Extraction is an LLM call, not local parsing
Triples are not extracted locally. src/extractor/extract.ts builds a prompt over the current turn and asks a model to call a submit_result tool exactly once; the contract in src/extractor/contract.ts is the only gate. Output that fails the schema is quarantined — neither repaired nor persisted — and gm_retry_extraction is the manual way out.
The input is deliberately narrow: the shipped cordis.patch.yml says one committed DSH turn is one extraction job containing “only the original user question and the final visible assistant answer”. Tool traffic and reasoning are never sent.
Routing follows the same configuration: GRAPH_MEMORY_LLM_PROVIDER and GRAPH_MEMORY_LLM_MODEL select a dedicated extraction route, which the patch comments say takes precedence over the foreground Agent model. dsh.ts implements that as configured ?? route, where route is the model DSH last recorded for the agent; with neither, extraction throws rather than guessing. A failure with a permanent status (401/403/404) pauses further LLM calls for ten minutes (src/engine/llm-guard.ts). Quarantined turns are not retried automatically, and startup does not import existing history.
Where the memory lives
Everything is in one local SQLite database. The composition patch sets dbPath to dshHomePath('graph-memory/graph-memory.db'), normally ~/.dsh/graph-memory/graph-memory.db; the OpenClaw adapter writes ~/.openclaw/graph-memory.db. Inside the file, src/store/store.ts keeps raw messages, nodes, node sources, edges, turn memories and vectors in separate tables, opened with WAL and foreign keys on (src/store/db.ts).
This version uses Node’s built-in node:sqlite (src/store/sqlite.ts) rather than a third-party driver, which is why it needs Node >=22.13.0 and installs without a native build step; npm 1.5.8 instead depends on @photostructure/sqlite.
Recall is query-first. src/recaller/recall.ts ranks stored turn memories by vector similarity or FTS5, seeds a personalized PageRank pass over the navigation terms with those hits, and merges both result sets up to recallMaxNodes (default 6). Embeddings are optional: src/engine/embed.ts returns nothing unless a key or base URL is configured, and recall falls back to FTS5. With a key but no base URL the endpoint defaults to https://api.openai.com/v1 and text-embedding-3-small; the harness credentials service resolves the key at request time, so it is not stored in config or database.
Cross-session reuse
Recall is not scoped to the current session. Stored memories keep their originating session id as provenance, and the recall path queries memories and the navigation graph without a session filter, so a fresh session in a different project can match them.
The two harness adapters
The repository is not DSH-only, and its topics overstate it in the other direction. Two adapters exist:
- DSH —
dsh.tspluscordis.patch.yml, declared in the rootpackage.jsonas"dsh": { "bundle": { "patch": "./cordis.patch.yml" } }. It injectstools,llm,systemPrompt,agentLoop,agents,sessions,credentialsandtokenMeter, hooksagent/created,agent/session-startandsession/event, and registers sixgm_*tools. The shipped patch setsassistantTools: none, because automatic recall needs no tool call. - OpenClaw —
index.tsplusopenclaw.plugin.json, activated as thecontextEngineslot, registeringgm_search,gm_record,gm_update,gm_statsandgm_maintain.
The topics also name claude-code, codex and opencode, and a reader could reasonably expect three more integrations. None exists in the codebase; the only mention in the tracked sources is a table in docs/DSH_NATIVE_PLAN.md about Claude Code compatibility boundaries. Read those topics as the author’s ecosystem tagging, not as adapters.
Requirements
- Node
>=22.13.0, fromengines, because the source uses the built-in SQLite API. - Harness — no DSH release is declared. The only version-adjacent statement is an optional peer range on
@deepseek-ai/cordis(>=4) and@deepseek-ai/dsh-typert-protocol(>=0.1.0-rc.5); the README says only that the benchmark ran against the latest DSH source. No specific target is claimed, so this listing records nodshTarget. - Install — the README pins a GitHub tag instead of npm:
npx @deepseek-ai/dsh plugin --profile web add github:adoresever/graph-memory#v1.6.0-beta.16. - Install-time scripts — none: no
preinstall,install,postinstallorprepare.prepack(which runsnpm run buildat publish time) is the closest thing, andscripts/verify-package.mjsfails the build if one ever appears. - Runtime dependencies —
@sinclair/typebox, the only one in1.6.0-beta.16. - Network, permissions, telemetry — extraction sends each completed turn’s question and final answer to the configured model route, by default your own agent provider; embeddings send memory text and queries to your endpoint (see the FAQ). The tracked sources contain no telemetry code, and the README documents no permission model or privacy policy; treat that as undocumented, not as no risk.
Known limits
- The npm package is not this plugin.
npm view graph-memory versionis1.5.8, published 2026-04-07, while the repository is at1.6.0-beta.16(tagged 2026-09-09). The registry manifest has nodshblock,mainpoints atindex.ts, its dependencies are@photostructure/sqlite,@sinclair/typeboxandopenai, andopenclawis its only peer. Installing the npm name gets the older OpenClaw-era plugin; the README says the same. - The published benchmark is not a controlled A/B. The README owns this: baseline and candidate used different DSH commits, and the run is declared an engineering workload rather than a LoCoMo/LongMemEval score.
- The
75%figure is the author’s. It appears in the GitHub repository description. The author’s own 20-turn run reports −80.69% first-request tokens at T20 and −68.84% across T01–T20 — a different number on a different basis. Neither was independently reproduced for this listing. - The Tsinghua claim is the author’s. The repository description says the plugin was “invited to be presented at a Tsinghua University discussion in April 2026”, and the repository carries
docs/images/history/tsinghua-sharing.jpg. No available source states what the event was or whether “invited” is warranted. Do not repeat it as fact. - Recall is bounded.
recallMaxNodesdefaults to 6, and the README notes that one broad multi-topic query may need a larger Top-K or separate questions. - A release asset is a Windows installer. The
v2.0.0release from 2026-03-18 carriesOpenClaw-Graph-2.0.0-win-x64.exe(about 1.7 GB), and the README shipped inside npm1.5.8still points OpenClaw users at it. The current README does not. - Graph Memory Pro is experimental and unpublished. The repository ships a read-only DSH Pro Lite host plus client (
dsh-pro/) for a graph view; npm has nograph-memory-pro-dshpackage (404).
When to use it — and when not to
Use it when sessions run long enough that tool traces and old turns crowd out the real conversation, and when what was dropped should stay recoverable by meaning rather than by scrolling. The part with no obvious substitute is source-backed recall: the model gets the literal question and answer, not a paraphrase.
Do not install the npm name expecting this plugin, and do not install it if a per-turn auxiliary model call over your own question and answer is unacceptable. The README’s numbers come from one 20-turn synthetic run by the author; do not expect them to transfer.
FAQ
Does it extract triples locally, or with an LLM?
With an LLM. Each completed turn is one structured call that must return a summary, an outcome and any triples through a single submit_result tool call; community detection and PageRank are local, extraction is not. The call carries only the question and final answer.
Where is the knowledge graph stored?
In one local SQLite database: $DSH_HOME/graph-memory/graph-memory.db for DSH, normally ~/.dsh/graph-memory/graph-memory.db, and ~/.openclaw/graph-memory.db for OpenClaw. Raw messages, nodes, sources, edges, turn memories and vectors live in separate tables in that file. There is no server and no graph database.
Does it send my conversations anywhere?
Yes, in two controllable directions. The extraction call goes to the model route you configure — by default the agent’s own route — and carries the question and final answer of a completed turn, never tool output or reasoning. If you enable embeddings, memory text and queries go to your embedding endpoint; with no embedding configuration, recall falls back to local FTS5. No telemetry was found in the sources, but the README documents no privacy policy.
Why does this listing’s package resolve to an older version?
Because npm 1.5.8 is what the registry serves, and it belongs to the project’s OpenClaw era: it declares no dsh block, so a DSH install of that name will not give you this plugin. Upstream pins the v1.6.0-beta.16 GitHub tag instead, and says to switch back to the npm name only once npm reports that version or newer.
Do I have to use the memory tools?
No. The shipped DSH patch sets assistantTools: none, and automatic recall needs no tool call — it runs on the pre-step path and injects relevant memories. gm_search, gm_record and the rest are for explicit control and diagnostics; whether they appear in the tool list is a configuration choice.
Does anything run at install time?
Not in the current version: no install lifecycle scripts, one runtime dependency (@sinclair/typebox), and Node’s built-in SQLite means no native compilation. The repository’s own verify:package fails the build if that stops being true.