Source
Zep: A Temporal Knowledge Graph Architecture for Agent Memory (Jan 2025)
Graphiti: Build Real-Time Knowledge Graphs for AI Agents
Finding
The Zep/Graphiti architecture extends graph memory edges with temporal validity attributes (valid_from, valid_until). When a fact is updated (e.g. "Alice now works at Startup, not Acme"), the old edge is marked as expired rather than deleted — preserving historical context for temporal queries. This achieves 18.5% accuracy improvement on LongMemEval and 90% lower latency vs MemGPT baseline.
Applicability to Zeph
Zeph's graph memory (SQLite schema with entities/edges/communities, completed) already has an eviction policy but no temporal edge validity. The SQLite edges table can be extended with valid_from INTEGER (unix timestamp) and valid_until INTEGER (NULL = currently valid) columns. The graph_recall BFS can filter on valid_until IS NULL OR valid_until > now(), and entity extraction can detect superseding facts and expire old edges.
Implementation Sketch
- Schema migration: add
valid_from and valid_until columns to edges table
- Update
GraphStore::upsert_edge to set valid_from = now()
- Update extraction: when a new edge contradicts an existing one (same source+target+label), set
valid_until = now() on the old edge
- Update
graph_recall BFS to filter on validity window
- Expose temporal queries via
/graph slash command (e.g. /graph history Alice)
Priority
Medium — low schema cost, significant accuracy improvement for long-running sessions where facts change over time.
Source
Zep: A Temporal Knowledge Graph Architecture for Agent Memory (Jan 2025)
Graphiti: Build Real-Time Knowledge Graphs for AI Agents
Finding
The Zep/Graphiti architecture extends graph memory edges with temporal validity attributes (
valid_from,valid_until). When a fact is updated (e.g. "Alice now works at Startup, not Acme"), the old edge is marked as expired rather than deleted — preserving historical context for temporal queries. This achieves 18.5% accuracy improvement on LongMemEval and 90% lower latency vs MemGPT baseline.Applicability to Zeph
Zeph's graph memory (SQLite schema with entities/edges/communities, completed) already has an eviction policy but no temporal edge validity. The SQLite
edgestable can be extended withvalid_from INTEGER(unix timestamp) andvalid_until INTEGER(NULL = currently valid) columns. Thegraph_recallBFS can filter onvalid_until IS NULL OR valid_until > now(), and entity extraction can detect superseding facts and expire old edges.Implementation Sketch
valid_fromandvalid_untilcolumns toedgestableGraphStore::upsert_edgeto setvalid_from = now()valid_until = now()on the old edgegraph_recallBFS to filter on validity window/graphslash command (e.g./graph history Alice)Priority
Medium — low schema cost, significant accuracy improvement for long-running sessions where facts change over time.