adoresever/graph-memory

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

What it solves

Graph Memory addresses the problem of "context takeover" in long AI agent conversations, where the growing history of messages consumes too many tokens and degrades model performance. It prevents the context window from being overwhelmed by archiving older history while ensuring that critical knowledge from previous turns or different sessions remains recallable.

How it works

It acts as a memory plugin for the DeepSeek Harness (DSH) and OpenClaw. Instead of keeping every message in the active window, it retains only the most recent few turns and replaces older history with a compact archive marker. It uses a graph-based navigation layer to store summaries and Subject-Predicate-Object (SPO) triples derived from completed turns. When relevant older information is needed, the system uses vector search (with FTS5 fallback) to navigate the graph and recall the exact original question and final answer as evidence, rather than relying on the graph nodes themselves as the factual payload.

Who it’s for

Developers and users of DeepSeek Harness (DSH) or OpenClaw who are building agents that require long-term memory across many conversation turns or multiple sessions without incurring massive token costs.

Highlights

  • Significant Token Reduction: Demonstrated up to an 80% reduction in first-request tokens for 20-turn conversations.
  • Source-Backed Recall: Recalls the exact original source messages rather than just summaries, ensuring factual accuracy.
  • Durable Storage: Uses local SQLite for stable, cross-session, and cross-project memory.
  • Lightweight Extraction: Only extracts the user question and final answer, ignoring reasoning and tool traces to keep the memory clean.
  • Flexible Search: Supports OpenAI-compatible embedding endpoints for vector search with a full-text search (FTS5) fallback.

Related

  • Project
  • Project
  • Project
  • Project
  • Project