Preface¶
When an agent runs long tasks, the context quickly falls into a dilemma: replaying the entire conversation as-is will cause the token count to skyrocket; starting a new session will make all the previously fixed errors and verified installation steps from yesterday disappear entirely. Compression addresses “whether the conversation can still fits into the context, but what is often truly missing is another matter: which already accumulated knowledge should be recalled in the next round.
graph-memory takes the latter path. Instead of treating chat logs as files to stuff into prompts, it extracts structured triples from conversations and stores them in a local knowledge graph. When a new question arises, only the relevant local subgraph is injected. This article is organized after cross-checking against the community directory page, GitHub repository README / README_CN, package.json, cordis.patch.yml and the official DeepSeek Harness repository: what it is, how far the DSH adaptation has progressed, how to install it, and how to use it.
There are two things that need to be clarified first. DeepSeek Harness (dsh) itself is an open-source agent runtime developed by DeepSeek AI, with the core concept of “everything is a plugin”; the plugin directory deepseek-harness-plugin.com cited in this article is an independent community site for discovering and comparing plugins, and has no official affiliation with DeepSeek / HuanFang. Do not treat it as an official app store.
What It Is¶
graph-memory is a memory plugin maintained by adoresever, with its source code at [adoresever/graph-memory](https://github.com/adoresever/graph-memory], licensed under MIT, and its main language is TypeScript. When opening the directory page and GitHub repository on August 18, 2026, both the repository stars were 540; the community directory lists it under the “Memory” category and marks it as featured. The current package version is 1.6.0-beta.1.
It solves three common types of problems:
- Context bloat: A large amount of history in long conversations is irrelevant to the current question, but is still replayed in full.
- Cross-session amnesia: Methods verified and pitfalls encountered in Session A cannot be carried over to Session B by default.
- Experience silos**: Fixed errors and reusable steps, if only scattered in markdown or chat logs without any connections between them, their causal relationships cannot be retrieved next time.
The positioning of the directory page can be summarized in one sentence: A knowledge-graph-based agent memory plugin that extracts structured triples from conversations to achieve traceable, retrievable, cross-session experience reuse. The same memory kernel natively integrates with DeepSeek Harness, while also retaining the OpenClaw plugin entry.
The repository README specifically emphasizes: It is not a chat log archiver, nor does it stuff all history back into the context. Reusable conversation knowledge will be transformed into typed nodes (TASK / SKILL / EVENT), and typed edges will be used to retain dependencies and causal relationships; the new question retrieves the relevant local subgraph instead of the full history.
Core Features¶
Typed Knowledge Graph¶
There are three types of nodes:
- TASK: Goals, execution processes and results.
- SKILL: Verified, reusable methods.
- EVENT: Errors, fixes, decisions, changes and key facts.
Edges preserve relationships, not just a single summary. The types provided in the repository documentation include:
TASK ──USED_SKILL──▶ SKILL
TASK ──SOLVED_BY───▶ EVENT
SKILL ──REQUIRES────▶ SKILL
EVENT ──PATCHES─────▶ SKILL
SKILL ──CONFLICTS_WITH──▶ SKILL
Nodes are also associated with the user/assistant fragments from when the knowledge was formed (episodic provenance). During recall, you can explain which session this memory came from and why it was selected, instead of only an unverifiable summary.
Dual-Path Recall, Only Injects Local Subgraph¶
Recall is not “stuff all the nodes in the library into the prompt”. README_CN breaks down the process into two paths:
- Precision Path: Vector or FTS5 retrieval → Community expansion and graph traversal → Personalized PageRank.
- Generalization Path: Query vector matches community summaries → Fetch community members → Perform graph ranking.
Both paths ultimately converge into a deduplicated local context. The community version uses SQLite by default and does not require a separate graph database deployment; when no Embedding is configured, it automatically falls back to FTS5 full-text search without interrupting the conversation. After configuring an OpenAI-compatible Embedding service, you can connect to DashScope, OpenAI or local services, and perform semantic retrieval, community-level recall and vector deduplication.
The DSH adapter automatically injects relevant memories during the Prompt Assembly phase, without requiring the model to first call gm_search. The recalled content will be marked as untrusted reference materials and cannot override the current user instructions.
Natively Hooks into DSH, Instead of Bypassing MCP¶
The current DSH adaptation status is subject to the repository README (version 1.6.0-beta.1):
| Capability | Status | Description |
|---|---|---|
| Cordis native loading | Completed | Follows the plugin lifecycle, no need to fork DSH |
| Cross-session automatic recall | Completed | Injected during Prompt Assembly |
| Explicit recording and search | Completed | gm_record, gm_search |
| Vector backfill and model migration | Completed | Tracks model, dimensions and fingerprint |
| Plugin status visibility | Completed | Plugin list in settings page shows active |
| Pro visualization workspace | Not delivered | Requires DSH Client Plugin needed |
The adapter file is dsh.ts, the Bundle entry is cordis.patch.yml, and the plugin appears as graph-memory/dsh in the list. It integrates with Session, Tool, Agent Loop, Prompt Assembly, LLM and Credentials, and shuts down the database, cache and event listeners along with the plugin fiber when uninstalled, without modifying the DSH core source code.
The local acceptance host is DeepSeek Harness 0.1.0-rc.5. The repository states that DSH is still in Developer Preview, and breaking changes may appear in future versions. The acceptance covers tarball installation, plugin activation, 1024-dimensional vector backfill, cross-Session semantic recall, restart persistence and FTS5 fallback; the documentation records that 107 automated tests have passed.
The ~75% Compression Is a Scene-Specific Comparison Result¶
Both the directory introduction and the repository mention that “context can be compressed by about 75%”. This number comes from a limited comparison of the legacy OpenClaw entry: in the 7-round workflow of “install, log in and query `bilibili-mcp”, the token count in the 7th round dropped from 95,187 to 23,977. The README clearly states that this is a scene-level comparison of this workflow, not a fixed savings ratio for all tasks; the mechanism is to replace indiscriminate history playback with relevant knowledge subgraphs.
Installation and Activation¶
The installation command provided on the community directory page is as follows. Run it in the DeepSeek Harness terminal:
dsh plugin add github:adoresever/graph-memory
For reproducible installation, the directory page recommends pinning the commit hash:
dsh plugin add github:adoresever/graph-memory#commit
Replace #commit with the actual commit hash. The plugin runs with the permissions of the current dsh process, and may execute code during installation. Before installing, please check the source code repository and MIT license, and only install sources you trust.
The repository README provides more details about the current beta version: 1.6.0-beta.1 has not been published to npm yet, and the DSH acceptance path documented is to first build a tarball from the source code, then install it into the Web profile. The prerequisites are Node.js22.19+ or 24+ (the engines field in package.json is >=20, please refer to the DSH installation section of the README as the standard).
Build from source:
git clone https://github.com/adoresever/graph-memory.git
cd graph-memory
npm ci
npm test
npm run build
npm pack
Install the generated tarball into the DSH Web profile:
npx @deepseek-ai/dsh plugin --profile web add /absolute/path/to/graph-memory-1.6.0-beta.1.tgz
npx @deepseek-ai/dsh --profile web --dump-config
npx @deepseek-ai/dsh web
If operating within the DeepSeek Harness source code repository:
pnpm dsh plugin --profile web add /absolute/path/to/graph-memory-1.6.0-beta.1.tgz
pnpm dsh web
After installation, confirm that graph-memory/dsh is enabled in **Settings → Plugins → Plugin List.
The README also notes that dsh plugin --profile web add graph-memory and the Pro package @adoresever/graph-memory-pro-dsh are part of the planned installation experience and **are not yet available**. The currentgraph-memory@1.5.8` on npm is still the OpenClaw release package, do not treat it as an installable DSH plugin.
Default database path:
$DSH_HOME/graph-memory/graph-memory.db
If DSH_HOME is not set, it is usually ~/.dsh/graph-memory/graph-memory.db.
Typical Usage¶
Optional: Enable Vector Retrieval¶
You can use it without configuring Embedding, and recall will use FTS5. To enable semantic retrieval, inject the API key via environment variables, do not send the API key into the chat box. The Cordis configuration only saves credential references, and the actual value is parsed by DSH Credentials. The DashScope example provided by the repository:
export GRAPH_MEMORY_EMBEDDING_API_KEY='replace-with-your-key'
export GRAPH_MEMORY_EMBEDDING_BASE_URL='https://dashscope.aliyuncs.com/compatible-mode/v1'
export GRAPH_MEMORY_EMBEDDING_MODEL='text-embedding-v4'
export GRAPH_MEMORY_EMBEDDING_DIMENSIONS='1024'
dsh web
The default items in cordis.patch.yml also include: extractionEnabled: true, recallEnabled: true, recallMaxNodes: 6, recallMaxDepth: 2, maintenanceInterval: 6. After changing the Embedding model or dimensions, the plugin will backfill vectors according to the fingerprint, and vectors of different dimensions will not be silently compared.
DSH Native Tools¶
After successful installation, the agent can use these four tools:
| Tool | Function |
|---|---|
gm_status |
Check if the plugin is active, database path, extraction/recall switches, vector status and dimensions |
gm_search |
Proactively search the long-term knowledge graph by question or keyword |
gm_record |
Deterministically write a TASK, SKILL or EVENT |
gm_stats |
View node, edge, type and community statistics |
Automatic extraction depends on the stability of the auxiliary model’s output. The repository recommends: during the beta phase, use gm_record to explicitly write critical knowledge instead of relying solely on automatic extraction. gm_record requires name, type (only TASK / SKILL / EVENT), description and content.
You do not need to call gm_search first during daily conversations. The adapter will perform semantic/full-text recall after the user’s message is received, and inject the relevant subgraph when assembling the system prompt. Cross-Session and after restarting DSH, the memories in the local SQLite database will still be retained.
OpenClaw Entry Is Still Retained¶
If you were using it on OpenClaw, the DSH adaptation does not require migrating data. The OpenClaw side still uses the original plugin entry, and you need to set plugins.slots.contextEngine to graph-memory in ~/.openclaw/openclaw.json, otherwise you may only see recall but no extraction results in the library. This article is based on the DSH installation, see the repository README for OpenClaw details.
Applicable Scenarios and Notes¶
It is more suitable for:
- Running development or operation and maintenance tasks that span multiple rounds or even cross-sessions with DeepSeek Harness, and want to retain “how to install, how to fix, what dependencies are needed”.
- Needing to explain where the memory comes from: nodes carry original session evidence, and edges can express relationships like SOLVED_BY, REQUIRES.
- Wanting to deploy locally first, without deploying Neo4j for the time being: the community version uses SQLite by default.
Boundary cases to note:
- It is currently in beta. The version number is 1.6.0-beta.1, and the matching host is 0.1.0-rc.5; DSH is still in Developer Preview.
- Two tools are missing from the DSH entry. gm_update and gm_maintain are currently only available in the OpenClaw entry.
- Pro visualization is not an available feature yet. The graph workspace, controlled dragging, and optional Neo4j are still planned architecture; the existing desktop-2.0 is OpenClaw + Neo4j, and there is no installable DSH Client Plugin.
- Compression ratio should not be treated as an SLA. The ~75% figure only applies to the 7-round workflow mentioned above.
- Automatic extraction may be unstable. Please use gm_record for important conclusions.
- Permissions and keys. The plugin runs with the permissions of the current dsh process, and may execute build scripts during installation; API keys go through the host credentials or environment variables, do not write them into the database, Cordis patch or chat logs. Keys that have appeared in chats, logs or screenshots should be rotated immediately.
- Recall cannot override current instructions. Historical memories are only for reference.
Summary¶
graph-memory changes “being able to remember” from replaying chat logs to maintaining a local knowledge graph with types and traceability. For DeepSeek Harness, it is already a native Cordis plugin: automatic extraction, cross-session recall, gm_* tools and optional vector retrieval are all available in 1.6.0-beta.1; the Pro visualization, one-click npm package and some maintenance tools have not yet been integrated into DSH.
Directory page and source code:
- Community directory: https://deepseek-harness-plugin.com/zh-CN/plugins/graph-memory/
- GitHub: https://github.com/adoresever/graph-memory
- DeepSeek Harness: https://github.com/deepseek-ai/deepseek-harness