GREYMEMORY · SELF-HOSTED MEMORY FOR AI AGENTS

Memory that knows when facts change.

greymemory is a self-hosted memory layer for AI agents like Claude Code, OpenCode, or your own. It extracts atomic memories from conversations, detects contradictions, supersedes stale facts while keeping their full history, and serves the current truth through hybrid BM25 + vector search — all on SQLite, with any LLM and embedder you bring. No cloud dependency, no API lock-in, no data leaving your server.

This page is a live, interactive knowledge-graph console rendered over a real LongMemEval ingestion (the full benchmark run spans 25,000+ extracted memories across 86 users; the hosted demo serves four of them live). Open it in a browser to explore the force-directed graph: hover a node to read the memory, click one to light its neighborhood (seed → EXTENDS expansion → supersession chain), and scrub time to see answers change as facts get superseded and expire.

The problem, measured

Long-term memory for AI is unsolved. On LongMemEval, GPT-4o scores 91.8% reading a chat history offline, but ChatGPT's own long-term memory scores 57.7% on the same questions and Coze scores 33.0%. Even handing GPT-4o the whole transcript in its context window, it loses a third of its accuracy to surrounding noise: 87.0% → 60.6% (the "lost in the middle" effect — bigger context windows make it worse, not better). Having the information isn't using it. The paper distills what a memory must actually do into five abilities:

How it works

The LongMemEval paper frames every memory system as an indexing → retrieval → reading pipeline with four control points. greymemory implements the paper's recommended optimization at each one — and adds hybrid retrieval the paper's design doesn't have:

Contradictions are resolved at write time: an LLM classifier detects UPDATES / EXTENDS relationships, supersedes stale facts, and keeps full version history for time-travel queries, profiles, and derivations. Three memory types (fact · preference · episode); three edge types (UPDATES · EXTENDS · DERIVES).

Benchmark results

Scored on LongMemEval with the paper's official LLM-as-judge, against a funded cloud competitor (Supermemory) and the raw long-context baseline:

Categorycontext window (GPT-4o)greymemorySupermemory (cloud)
single-session-user81.4%93.3%97.1%
single-session-assistant94.6%93.3%96.4%
knowledge-update78.2%80.0%88.5%
temporal-reasoning45.1%73.3%76.7%
single-session-preference20.0%66.7%70.0%
multi-session44.3%66.7%71.4%
overall60.6%80.0%83.4%

96% of a funded cloud startup's accuracy — self-hosted, from SQLite, at $0.013 per session of ingestion. The story: on the categories where a memory engine actually matters (preference, temporal, multi-session) greymemory delivers +47, +28, +22 points of lift over just dumping the history into the context window.

Explore & source

ESM · Node 18+ · better-sqlite3 · React + Vite · react-force-graph · provider-agnostic by design. Built for the Razorpay AI Builders challenge — proof of work over a résumé.

Loading the interactive console…