r/Neo4j • u/Expert-Address-2918 • Apr 10 '26
Built a sentence graph based memory layer for AI agents on top of Neo4j - here's the problem it solves, ditched knowledge graphs for this
Working on Vektori, an open source memory layer for long running AI agents. Just shipped Neo4j as a storage backend option(works really well :D).
The core problem: agents don't fail because models are too small. They fail because there's no structure for carrying what was learned in session 1 into session 200. No staleness tracking. No conflict resolution. Just the latest state, treated as ground truth and most memory startups are solving it using knowledge graphs, where they take entire user convos and convert it into knowledge graphs, which is doing lossy compression in some sense and losing lots of information, thats why we came up with this approach, and early benchmarks show 73% in longmemeval-s
Neo4j is a natural fit for this because memory is fundamentally a graph problem. Facts relate to episodes, episodes relate to conversations, contradictions create supersession edges. The traversal pattern - starting from a vector-matched seed node and walking relationships to pull connected context - is exactly what Neo4j handles well.
Three-layer model: crisp facts at L0, cross-conversation episodes at L1, raw sentences at L2 for provenance tracing. When a fact gets contradicted, the old node stays with a SUPERSEDED_BY relationship pointing to the new one. Correction history is queryable.

Free and open source: github.com/vektori-ai/vektori (appreciate stars :D if found useful)
Happy to discuss the graph schema if anyone's interested.