AllDSH
中文

Graph Memory

adoresever · adoresever/graph-memory

A DSH memory plugin that keeps the newest turns, archives the rest, and recalls source-backed answers from a local SQLite graph.

Graph Memory is a DSH plugin by adoresever. A DSH memory plugin that keeps the newest turns, archives the rest, and recalls source-backed answers from a local SQLite graph. It is filed under Memory & Context and Data & Knowledge, for Memory & Context and Database. Verification level L2 (Structured), an automated security scan has not run yet, and it declares no specific compatibility target; the listing was last checked on 2026-09-17 and is published under the MIT licence. Install it with dsh plugin --profile web add graph-memory

Listing checked by Chiyu , data updated · How to cite

L2active
Graph Memory verification panel: level L2 of 5 (Structured) — Manifest valid, key fields complete. Security scan: unverified — no scan has run. Compatibility target: DeepSeek Harness not declared. Licence: MIT. GitHub stars: 626. Listing last checked 2026-09-17.
Verification panel for Graph Memory. The listing holds level L2 of 5 — Structured: Manifest valid, key fields complete. Security scan: unverified — no scan has run. Compatibility target: DeepSeek Harness not declared. Licence: MIT. Listing last checked 2026-09-17. How verification works

Install command

dsh plugin --profile web add graph-memory

Requires a running harness: start it withnpx @deepseek-ai/dsh webthen run the command above.New to this? See the installation guide.

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.ts plus cordis.patch.yml, declared in the root package.json as "dsh": { "bundle": { "patch": "./cordis.patch.yml" } }. It injects tools, llm, systemPrompt, agentLoop, agents, sessions, credentials and tokenMeter, hooks agent/created, agent/session-start and session/event, and registers six gm_* tools. The shipped patch sets assistantTools: none, because automatic recall needs no tool call.
  • OpenClaw — index.ts plus openclaw.plugin.json, activated as the contextEngine slot, registering gm_search, gm_record, gm_update, gm_stats and gm_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, from engines, 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 no dshTarget.
  • 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, postinstall or prepare. prepack (which runs npm run build at publish time) is the closest thing, and scripts/verify-package.mjs fails the build if one ever appears.
  • Runtime dependencies — @sinclair/typebox, the only one in 1.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 version is 1.5.8, published 2026-04-07, while the repository is at 1.6.0-beta.16 (tagged 2026-09-09). The registry manifest has no dsh block, main points at index.ts, its dependencies are @photostructure/sqlite, @sinclair/typebox and openai, and openclaw is 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. recallMaxNodes defaults 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.0 release from 2026-03-18 carries OpenClaw-Graph-2.0.0-win-x64.exe (about 1.7 GB), and the README shipped inside npm 1.5.8 still 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 no graph-memory-pro-dsh package (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.

Sources & references

The technical claims on this page rest on the primary documents below. Each link is followed so it can be checked directly.

  1. [1]adoresever/graph-memory — GitHubThe plugin’s own repository and README — the primary document every claim in this listing is checked against.
  2. [2]graph-memory on npm — npmThe published package the install command on this page resolves.
  3. [3]deepseek-ai/deepseek-harness — GitHubUpstream repository for DeepSeek Harness, the Cordis runtime and the plugin loading model.
  4. [4]@deepseek-ai/dsh on npm — npmPublished harness package, including the release tags our dshTarget field tracks.
  5. [5]dsh-plugin GitHub topic — GitHubThe discovery mechanism used to find plugins listed in this directory.

All links last verified 2026-09-11

Questions about this listing

Is Graph Memory safe to install?
Graph Memory holds verification level L2 of 5 — Manifest valid, key fields complete — and its security status is unverified — no scan has run. A verification level records how far the install path was exercised; it is not a safety guarantee. Safety depends on what the plugin can actually reach, so read its source and install script and check its file, shell, network and credential access before you run it.
Which DeepSeek Harness version does Graph Memory target?
Graph Memory declares no dshTarget, so no specific DeepSeek Harness release has been committed to. The field is optional, and its absence means this listing makes no claim about working on a particular release — test it in an isolated profile first.
How do I install Graph Memory?
Start the harness with npx @deepseek-ai/dsh web, then copy the install command shown at the top of this page. That command is generated from the package name the repository publishes — or from an install spec the listing declares — so it cannot drift from what the repository actually ships. This listing was last checked on 2026-09-17.
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.

Similar DSH plugins

Browse all

Mnemon

mnemon-dev

Editor's pick

LLM-supervised persistent memory with graph-based recall, cross-session stores and a single native binary.

L2
587 Go

At File

FSMargoo

Codex-style @file mentions that search workspace paths in the composer and attach a path reference — not file contents — to your prompt.

L2
513 JavaScript

dsh-mnemon

omdsh-dev

Composable three-tier memory for DSH — runtime context, searchable documents, and long-term Memory Spaces on pluggable providers.

L2
384 TypeScript

Memento

PerryLink

Bounded, layered, approval-gated cross-session memory for DeepSeek Harness — a memory service plus a local SQLite store.

L3
102 TypeScript

DSH Context

bowenliang123

Editor's pick

Context dashboard, browser and command that show how the context window is composed and how it evolves.

L3
1.4k TypeScript

deja-vu

vshulcz

Local cross-agent session memory — it indexes the coding-agent histories already on disk and recalls them into DSH, with no LLM.

L3
829 Go
ESC

Type to search the index. Built at deploy time by Pagefind.