# Graph Memory

Graph Memory is a DeepSeek Harness and OpenClaw memory plugin that bounds how much conversation history reaches the model, keeping recent turns live while archiving older ones into a knowledge graph, and recalls source-backed answers when needed.

Graph Memory manages the model-visible portion of a conversation's history without deleting the underlying event log: by default it keeps the newest five completed user turns in full and removes older, completed reasoning and tool traces from future requests, while automatically recalling relevant older or cross-session question-and-answer pairs when they matter to the current turn.

Each completed turn is first summarized into one self-contained sentence, from which subject-predicate-object triples are derived; those triples and the community structure built from them are used only to navigate to the right memory, while the original question and its final answer remain the actual evidence returned. Older archived turns collapse to a single fixed marker rather than keeping their full reasoning and tool trace, and only sources still visible in the active window are excluded from recall to avoid duplicating what the model can already see.

In one measured 20-turn benchmark, the plugin cut the token size of the twentieth request by about 81 percent and the number of model-visible messages by about 88 percent compared to the unmodified history. It is written in TypeScript.

Website: https://github.com/adoresever/graph-memory
