Papers
Topics
Authors
Recent
Search
2000 character limit reached

Graphiti: Graph-Based Data and Memory Systems

Updated 3 July 2026
  • Graphiti is a suite of graph-centric systems that integrate bi-temporal knowledge graphs, Neo4j-based multi-agent memory, formal query equivalence verification, and scalable semi-external analytics.
  • The formal verification component rigorously translates Featherweight Cypher to SQL using first-order Horn clauses, ensuring sound and complete query equivalence with sub-200ms transpilation.
  • Empirical results show that Graphiti’s temporal engine reduces context retrieval latency by up to 90% and SEM analytics achieves 80% of in-RAM throughput with drastically reduced memory usage.

Graphiti refers to a family of graph-centric systems and tools spanning knowledge graph memory engines, formal database query equivalence reasoners, and high-performance analytics libraries. The term appears in multiple influential contexts in contemporary research: (1) as a bi-temporal, multi-source knowledge graph engine deployed for LLM agent memory (at the core of the Zep system); (2) as a Neo4j-backed graph memory layer for distributed multi-agent systems in comparative empirical studies; (3) as a formal verification tool for bridging graph (Cypher) and relational (SQL) queries; and (4) as part of Graphyti, a semi-external-memory library for massive graph analytics. Each instantiation exploits graph-theoretic representations for distinct computational purposes, with methodologies ranging from dynamic memory and retrieval architectures to formal mapping and query equivalence frameworks.

1. Temporal Knowledge Graph Memory: Graphiti in Zep

Graphiti is the temporally-aware knowledge graph engine powering Zep’s memory architecture for LLM agents (Rasmussen et al., 20 Jan 2025). Its core is a bi-temporal property graph model, storing both raw conversational episodes and structured facts with precise handling of validity and ingestion times. The system ingests free-form messages or business events as “Episode” nodes, extracts semantic entities and relational facts using LLM-based pipelines, and maintains a temporal record using per-edge validity (tvalid,tinvalid)(t_{valid}, t_{invalid}) and transaction (tcreated,texpired)(t'_{created}, t'_{expired}) timestamps.

Key features:

  • Bi-temporal modeling: Formally, the graph at time tt, G(t)=(N,E(t),φ)G(t) = (N, E(t), \varphi), maintains that each edge ee is observable iff tvalid(e)t<tinvalid(e)t_{valid}(e) \leq t < t_{invalid}(e) and tcreated(e)now<texpired(e)t'_{created}(e) \leq now < t'_{expired}(e).
  • Hybrid retrieval: Supports embedding-based (HNSW/IVFPQ), full-text (Lucene), and graph-neighborhood (BFS) search, with composite retrieval functions ϕcos\phi_{cos}, ϕbm25\phi_{bm25}, and ϕbfs\phi_{bfs}.
  • Temporal queries and cross-session synthesis: Efficient B+-tree indices for time-window filtering, and traversal algorithms enable cross-session fact aggregation.
  • Automated normalization: Uses LLM extractors for entity, fact, and temporal resolution; deduplication via embedding KNN and text matching.
  • Community subgraph summaries: Maintains dynamic clusters with updated summaries and member lists, enabling community-based reasoning.

Empirical results show that Graphiti (as employed in Zep) exceeds prior LLM memory systems in both accuracy (e.g., 94.8% on DMR vs. 93.4% for MemGPT) and efficiency, reducing context construction latency by 90% on long-horizon tasks, and enabling up to 18.5pp higher accuracy on LongMemEval, particularly on complex, temporally-scoped queries.

2. Graph-based Memory for Multi-Agent LLM Systems

Graphiti is also the designation for a Neo4j-based graph memory backend evaluated in distributed LLM agent settings (Wolff et al., 12 Jan 2026). In this context, Graphiti manages conversational memory by representing each utterance as a ‘Memory’ node annotated with metadata and temporal links, with session-aware and conversation-aware relationships structuring the overall graph.

Operational characteristics:

  • Schema: Nodes for utterances include properties such as memory_id, session_id, speaker, text, and timestamp. Edges include :NEXT (temporal ordering), :IN_SESSION, and possibly :IN_CONVERSATION.
  • Insertion: O(1) amortized cost per turn, leveraging Neo4j B-tree indexes.
  • Retrieval: Supports both keyword and temporal queries, using Cypher MATCH and range predicates for efficient context aggregation over time windows or within sessions.
  • No embedding augmentation: Only traditional graph traversals and keyword search.

Performance studies found that Graphiti incurs significantly higher computational overhead than vector-based memory (mem0), with 5–700× greater CPU, memory, and network usage, and 80–90% higher end-to-end latency, while yielding only marginally higher accuracy not statistically distinguishable from mem0 (e.g., 11.1% vs. 7.5%) under rigorous two-proportion Z-tests.

3. Formal Equivalence Verification: Graphiti for Graph-Relational Query Reasoning

In database systems research, Graphiti denotes an automated reasoning tool and methodology for checking semantic equivalence between Cypher (used in graph databases) and SQL queries over relational databases (He et al., 4 Apr 2025). The core contribution is a formal reduction of the cross-model query equivalence problem to standard SQL equivalence by means of database transformers.

Methodological architecture:

  • Database transformers ((tcreated,texpired)(t'_{created}, t'_{expired})0): Sets of first-order Horn clauses mapping graph instance elements (nodes, edges) to relational tuples and vice versa. Formalizes cross-model schema correspondences.
  • Syntax-directed transpilation: Defines a complete translation from “Featherweight Cypher” (core subset) to SQL over an induced relational schema, using compositional rules (e.g., Q-RET, Q-AGG, C-MATCH1, C-OPT) and leveraging standard relational algebra forms.
  • Reduction pipeline: Given a Cypher query (tcreated,texpired)(t'_{created}, t'_{expired})1 and SQL (tcreated,texpired)(t'_{created}, t'_{expired})2 under a transformer (tcreated,texpired)(t'_{created}, t'_{expired})3, Graphiti:

    1. Infers the induced relational schema and transformer.
    2. Translates (tcreated,texpired)(t'_{created}, t'_{expired})4 to SQL (tcreated,texpired)(t'_{created}, t'_{expired})5.
    3. Constructs the residual transformer.
    4. Checks SQL equivalence using back-ends (SMT-based VeriEQL, deductive Mediator).
  • Theoretical guarantee: Reduction is both sound and complete with respect to the chosen transformer and SQL equivalence checker, provided completeness assumptions on the backend.

Experimental evaluation on 410 query pairs demonstrated full automation with sub-200ms transpilation in all cases, discovery of subtle but significant inequivalences (including in published tutorials and papers), and practical integration with state-of-the-art relational verification engines.

4. Semi-External Memory Analytics: Graphyti on FlashGraph

While distinct in naming, the Graphyti library (Mhembere et al., 2019) shares methodological DNA and naming lineage with “Graphiti.” It exemplifies a semi-external memory (SEM) paradigm for large-scale parallel graph analytics: only vertex state is held in RAM (tcreated,texpired)(t'_{created}, t'_{expired})6, while edge data (tcreated,texpired)(t'_{created}, t'_{expired})7 reside on high-speed SSDs.

Salient properties:

  • Memory model: (tcreated,texpired)(t'_{created}, t'_{expired})8 in RAM (labels, counters, bitmaps), (tcreated,texpired)(t'_{created}, t'_{expired})9 on SSD (adjacency lists).
  • Parallel architecture: Built atop SAFS (user-space NVMe I/O), FlashGraph (thread-partitioned vertex programs), and a Python API layer.
  • I/O optimization principles: Selective page-read, I/O-compute overlap, push-pull hybrid algorithms, adaptive page caching, and hybrid messaging strategies to minimize I/O and maximize cache utility.
  • Performance: On a Twitter graph of tt0M, tt1B, SEM execution achieves 80% the throughput of in-RAM analytics with 20–100-fold RAM reduction, and competitive or superior results relative to distributed frameworks such as PowerGraph and Galois (on up to 32 machines).
  • Algorithmic portfolio: PageRank, core decomposition, diameter estimation, multi-source betweenness, triangle counting, community detection with optimizations for lazy deletion.
  • API exposure: Python-first interface via pip, full Docker integration, supports key analytics primitives for large-scale graphs.

5. Algorithmic Mechanisms and Retrieval Performance

Graphiti’s knowledge graph engine in Zep and the memory backend in multi-agent systems both emphasize hybrid retrieval and temporal reasoning, but implementations differ.

Hybrid Retrieval in Zep’s Graphiti

The retrieval function in Zep’s Graphiti is explicitly composed as tt2, combining:

  • φ_cos: Embedding (cosine) search via HNSW with tt3 complexity.
  • φ_bm25: Full-text retrieval on Lucene with tt4.
  • φ_bfs: Graph-neighborhood expansion with tt5.
  • ρ: Reranking (Reciprocal Rank Fusion, graph distance, LLM re-ranking).
  • χ: Serialization (to text input for LLMs).

In contrast, the Graphiti Neo4j backend in LLM agent systems is limited to direct Cypher search and traversal without embedding or aggressive reranking; search is O(k) for traversals, O(log|V|) for index lookups.

Empirically, Graphiti in Zep enables up to 90% reduction in retrieval latency and order-of-magnitude reductions in prompt length (from 100k to 1k tokens), while boosting answer accuracy up to +18.5 pp in temporally complex, multi-session tasks.

6. Limitations, Trade-Offs, and Open Challenges

Despite diverse applications, all Graphiti/Graphyti systems present practical trade-offs:

  • Resource overhead (Neo4j backends): Substantially higher CPU, RAM, I/O, and network cost relative to vector or in-memory alternatives, with minimal—statistically indistinct—accuracy gains under typical settings (Wolff et al., 12 Jan 2026).
  • Temporal and bi-temporal complexity: While enabling advanced reasoning and precise query semantics, the 4-timestamp edge model incurs indexing, update, and query overhead which may become substantial in high-frequency update environments (Rasmussen et al., 20 Jan 2025).
  • Coverage gaps (query equivalence): Current support in the formal Graphiti system is limited to a core Cypher subset; key features (e.g., variable-length paths, APOC procedures) and alternative graph query languages remain outside present capabilities (He et al., 4 Apr 2025).
  • Static or quasi-static graph structure (SEM analytics): Graphyti restricts dynamic edge updates, requiring largely static graph topologies (Mhembere et al., 2019).
  • Algorithmic complexity for developers: I/O-efficient algorithm development for SEM models and correct construction of Horn-clause transformers (for equivalence checking) both demand a high degree of developer expertise.

Ongoing research targets expansion to richer query fragments, dynamic graph support, generalized structural transformations, and integration with mainstream analytical tooling and cloud storage tiers.


Graphiti and Graphyti collectively exemplify the evolution of graph-based data and memory architectures, ranging from real-time, bi-temporal knowledge graphs for LLM agents to formal reasoning bridges between graph and relational systems and to high-efficiency graph-parallel analytics. Research demonstrates both the power and the engineering challenges of leveraging graph-structured representations under extreme scale, heterogeneous data, and increasingly complex computational semantics (Rasmussen et al., 20 Jan 2025, He et al., 4 Apr 2025, Wolff et al., 12 Jan 2026, Mhembere et al., 2019).

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to Graphiti.