graph-memory

by adoreseverVerified

Deepseek Harness、Openclaw知识图谱记忆插件。2026年4月受邀发布在清华大学讨论会。Knowledge Graph + Memory;Knowledge Graph Context Engine for OpenClaw — extracts structured triples from conversations, compresses context 75%, enables cross-session experience reuse

565
Stars
81
Forks
TypeScript
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/adoresever/graph-memory

Getting Started

Guides for using skills like graph-memory.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

Graph Memory

DeepSeek Harness + OpenClaw → Graph Memory

Compaction answers “how much of this conversation still fits?” Graph Memory answers “which past knowledge is worth recalling now?”

Reusable conversation knowledge becomes typed nodes:

  • TASK: goals, execution, and outcomes;

  • SKILL: validated reusable methods;

  • EVENT: errors, fixes, decisions, changes, and facts.

Typed edges such as USED_SKILL, SOLVED_BY, REQUIRES, PATCHES, and CONFLICTS_WITH preserve relationships. A new question retrieves a relevant local subgraph instead of replaying the complete history.

Core advantages

Native host integration

  • Loaded by the DSH/Cordis plugin lifecycle, not simulated through an MCP side channel.

  • Integrates Session, Tool, Agent Loop, Prompt Assembly, LLM, and Credentials seams.

  • Disposes database, cache, and event listeners with its plugin fiber.

  • Does not fork or modify DeepSeek Harness core.

Durable cross-session memory

  • Knowledge from Session A can be recalled automatically in Session B.

  • Memory survives DSH restarts.

  • Stable event IDs make resume and HMR ingestion idempotent.

  • Source sessions and graph edges explain why a memory was recalled.

Smaller, cleaner context

  • Keeps the newest real user turns verbatim (freshTurnCount, default 5).

  • Uses the agent-scoped public DSH compaction service to replace the older model-facing prefix with one rolling checkpoint; the durable source event log remains intact.

  • Indexes each landed checkpoint and preserves exact source-message provenance for later dereferencing.

  • Semantic vector retrieval with FTS5 lexical fallback.

  • Community detection, PageRank, personalized PageRank, and bounded graph traversal.

  • Only a relevant cross-session subgraph enters the current prompt, within recallTokenBudget (default 4096).

  • Automatic injection uses a high-precision semantic gate (autoRecallMinScore, default 0.6) and never falls back to query-independent community representatives; explicit gm_search remains broad.

  • Recalled history is marked as untrusted reference material and cannot override current user instructions.

Local-first and lightweight

  • Community uses SQLite by default; no graph database deployment is required.

  • Embeddings are optional. Without them, recall falls back to FTS5.

  • Data remains in the user's local profile by default.

  • OpenAI-compatible embeddings support DashScope, OpenAI, and local providers.

Observable and verifiable

  • gm_status reports store path, graph counts, vector coverage, mode, and dimensions.

  • Model or dimension changes trigger re-embedding.

  • Vectors with different dimensions are never silently compared.

  • Critical knowledge can be recorded deterministically with gm_record.

Scoped token benchmark

The original OpenClaw adapter was measured in a seven-turn workflow that installed, authenticated, and queried bilibili-mcp:

Turn Without Graph Memory With Graph Memory

R1 14,957 14,957

R4 81,632 29,175

R7 95,187 23,977

The measured reduction at R7 was approximately 75% in that specific workflow. This is a scenario-level comparison, not a universal savings guarantee; the mechanism is replacing indiscriminate history replay with a relevant knowledge subgraph.

Project evolution

The DSH integration does not discard the original project. Graph Memory is evolving from an OpenClaw memory plugin into a graph-memory core that different agent harnesses can load natively.

Stage Deliverable Status

OpenClaw origin Context Engine, cross-session graph memory, dual-path recall Maintained

Community graph engine SQLite, FTS5, vectors, graph ranking, provenance Available

DeepSeek Harness Cordis adapter, native tools, auto-recall, Credentials Implemented and tested

Graph Memory Pro Visual graph workbench, controlled drag-and-drop, optional Neo4j Pro Lite read-only Host + Client implemented; 2D/3D and drag pending

On March 15, 2026, the project owner presented Graph Memory's architecture at the CLAW program event held in Tsinghua Science Park. The following owner-supplied materials and the Sina Finance event report document that development.

The image below is the existing OpenClaw / ClawX-era Pro graph prototype. It demonstrates a previously explored interaction direction; it is not a shipped DSH frontend.

Names and venue information document project history only and do not imply endorsement by Tsinghua University, Sina Finance, DeepSeek, or OpenClaw.

Graph Memory architecture

Typed knowledge graph

TASK   ──USED_SKILL──▶ SKILL
TASK   ──SOLVED_BY───▶ EVENT
SKILL  ──REQUIRES────▶ SKILL
EVENT  ──PATCHES─────▶ SKILL
SKILL  ──CONFLICTS_WITH──▶ SKILL

Nodes retain episodic user/assistant provenance. This preserves the context in which knowledge was created, not only a lossy summary.

Dual-path recall

flowchart LR
  Q[Current query] --> EXACT[Exact path]
  Q --> GENERAL[Generalized path]
  EXACT --> SEARCH[Vector / FTS5]
  SEARCH --> EXPAND[Community expansion + traversal]
  GENERAL --> SUMMARY[Community-summary match]
  SUMMARY --> MEMBERS[Community members]
  EXPAND --> PPR[Personalized PageRank]
  MEMBERS --> PPR
  PPR --> CONTEXT[Deduplicated local context]

Host data flow

flowchart LR
  USER[User message] --> SESSION[DSH Session Events]
  SESSION --> ADAPTER[Graph Memory Cordis Adapter]
  ADAPTER --> POLICY[Keep newest N user turns]
  POLICY --> COMPACT[DSH public CompactionEngine]
  COMPACT --> CHECKPOINT[Rolling model-surface checkpoint]
  ADAPTER --> EXTRACT[Structured Extraction]
  EXTRACT --> GRAPH[(SQLite / FTS5 / Vectors)]

  USER --> RECALL[Semantic + Lexical Recall]
  GRAPH --> RECALL
  RECALL --> RANK[Community Expansion + PPR]
  RANK --> PROMPT[Prompt Assembly]
  PROMPT --> LOOP[DSH Agent Loop]

  CREDS[DSH Credentials] --> ADAPTER
  TOOLS[gm_* Tools] --> ADAPTER

The code follows a host-neutral core plus host adapters:

graph-memory/
├── dsh.ts                 # DeepSeek Harness / Cordis adapter
├── index.ts               # OpenClaw adapter
├── cordis.patch.yml       # DSH bundle entry
└── src/
    ├── extractor/         # conversation → TASK / SKILL / EVENT
    ├── recaller/          # vector, FTS5, graph expansion and recall
    ├── graph/             # PageRank, communities and deduplication
    ├── store/             # SQLite schema and queries
    ├── format/            # safe context assembly
    └── engine/            # LLM and embedding providers

Native DeepSeek Harness status

Capability Status Notes

Native Cordis loading Done No DSH fork required

Rolling context ownership Done Configurable newest N turns; older surface prefix becomes a checkpoint

Cross-session auto-recall Done Injected during Prompt Assembly

Explicit record and search Done gm_record, gm_search

Vector backfill and migration Done Model, dimension, and fingerprint tracked

Visible plugin state Done Active in Plugin Inventory

Pro visual workbench Experimental Separate DSH Client Plugin with a read-only card snapshot

Current beta: 1.6.0-beta.8. Local acceptance used DeepSeek Harness 0.1.0-rc.8. Testing covered tarball installation, Web profile loading, configurable five-turn rolling compaction through the public agent-preset compaction service, exact source provenance, token-budget enforcement, high-precision automatic recall, FTS5 fallback, and the Pro Lite Host, Typed Remote, and Client bundle boundaries. All 127 automated tests passed. Real model-backed acceptance also verified rolling checkpoint replacement, 1024-dimensional text-embedding-v4 vectors, and automatic cross-project recall without an explicit memory tool call.

Install on DeepSeek Harness

Prerequisites: Node.js 22.19+ or 24+. The current beta is not yet published to npm, so build the tarball from source:

git clone https://github.com/adoresever/graph-memory.git
cd graph-memory
npm install
npm test
npm run build
npm pack

Install the generated tarball into the DSH Web profile:

Frequently Asked Questions

What is graph-memory?

graph-memory is an open-source ide extensions skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by adoresever. Deepseek Harness、Openclaw知识图谱记忆插件。2026年4月受邀发布在清华大学讨论会。Knowledge Graph + Memory;Knowledge Graph Context Engine for OpenClaw — extracts structured triples from conversations, compresses context 75%, enables cross-session experience reuse. It has 565 GitHub stars.

Is graph-memory safe to use?

graph-memory failed SkillsLLM's automated security scan, which flagged one or more high-severity issues. Review the Security Report section carefully before using it.

How do I install graph-memory?

Clone the repository with "git clone https://github.com/adoresever/graph-memory" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is graph-memory written in?

graph-memory is primarily written in TypeScript. It is open-source under adoresever on GitHub, so you can review or fork the full source.

Are there alternatives to graph-memory?

Yes. SkillsLLM lists many other IDE Extensions skills you can browse and compare side by side. Open the IDE Extensions category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh graph-memory against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

claudian

by YishenTu

An Obsidian plugin that embeds Claude Code/Codex as an AI collaborator in your vault

14,921972TypeScript
IDE Extensions
View details

OpenMythos

by kyegomez

A theoretical reconstruction of the Claude Mythos architecture, built from first principles using the available research literature.

14,8003,292Python
IDE Extensions
View details

cursor-hooks

by cursor

5

Automate Cursor behavior around agent events with hooks.

12,500890TypeScript
IDE Extensionsclaude-codeai-tools
View details

arscontexta

by agenticnotetaking

Claude Code plugin that generates individualized knowledge systems from conversation. You describe how you think and work, have a conversation and get a complete second brain as markdown files you own.

3,479220Shell
IDE Extensions
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details