← all repositories
adoresever/graph-memory

An agent memory that outlives the session tab

Turns conversation history into a structured knowledge graph so OpenClaw agents can recall past solutions across sessions without drowning in tokens.

502 stars TypeScript AgentsRAG · Search
graph-memory
Not currently ranked — collecting fresh signals.
star history

What it does

graph-memory plugs into OpenClaw and replaces the usual “dump every previous message into the prompt” strategy. It extracts typed triples—TASK, SKILL, and EVENT nodes linked by relationships like SOLVED_BY or REQUIRES—into a local SQLite graph. When a new session starts, it recalls relevant past context via vector search and graph traversal instead of replaying the entire chat history. The README claims this compresses token usage by roughly 75% in long conversations.

The interesting bit

The recall system runs two parallel paths: a precise entity-level search through the graph, and a generalized community-level search against LLM-generated cluster summaries. Both routes feed into Personalized PageRank ranked against the current query, not global importance, so Docker skills surface when you’re deploying containers and stay quiet when you’re debugging Python imports. It also tacks on the original conversation snippets for the top three hits, giving the agent episodic memory alongside the structured graph.

Key highlights

  • Context compression via structured triples: the README shows a 7-round conversation dropping from ~95K tokens to ~24K.
  • Cross-session recall: relevant skills and bug fixes resurface automatically via FTS5/vector search plus graph walks.
  • Dual-path retrieval: entity-level vector search and community-level summary matching run in parallel, merged with PPR ranking.
  • Typed property graph schema: TASK/SKILL/EVENT nodes and five edge types (including SOLVED_BY and CONFLICTS_WITH).
  • Universal embedding support: raw fetch calls to any OpenAI-compatible endpoint, from Ollama to Alibaba DashScope.

Caveats

  • Configuration is brittle: the README explicitly warns that reinstalling the plugin can wipe your LLM and embedding credentials, and that forgetting to set plugins.slots.contextEngine leaves the database empty even though recall logs appear.
  • Graph updates lag behind conversation: triple extraction, PageRank, and community detection run asynchronously in afterTurn and every seven turns, so the graph is briefly stale.
  • Tightly coupled to OpenClaw: the plugin architecture depends on OpenClaw’s contextEngine slot and gateway lifecycle; portability to other agent frameworks is not discussed.

Verdict

Worth a look if you run long-lived OpenClaw sessions and are tired of re-explaining your stack every time you open a new chat. If you are not using OpenClaw, or your agent conversations rarely exceed a few turns, this is probably overkill.

Frequently asked

What is adoresever/graph-memory?
Turns conversation history into a structured knowledge graph so OpenClaw agents can recall past solutions across sessions without drowning in tokens.
Is graph-memory open source?
Yes — adoresever/graph-memory is open source, released under the MIT license.
What language is graph-memory written in?
adoresever/graph-memory is primarily written in TypeScript.
How popular is graph-memory?
adoresever/graph-memory has 502 stars on GitHub.
Where can I find graph-memory?
adoresever/graph-memory is on GitHub at https://github.com/adoresever/graph-memory.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.