Home
Login

A real-time temporal knowledge graph construction framework for AI agents

Apache-2.0Python 11.4kgetzep Last Updated: 2025-06-18

Graphiti: A Temporal Knowledge Graph Framework for AI Agents

Project Overview

Graphiti is an innovative framework open-sourced by the Zep team, specifically designed for building and querying time-aware knowledge graphs, optimized for AI agents operating in dynamic environments. This project addresses the limitations of traditional Retrieval-Augmented Generation (RAG) methods in handling dynamic data, providing AI applications with powerful long-term memory capabilities.

Core Features

1. Temporal Awareness

Graphiti tracks changes in facts and relationships over time, supporting point-in-time queries. Graph edges contain temporal metadata to record relationship changes, enabling the system to understand the historical evolution of information.

2. Real-time Dynamic Updates

Graphiti incrementally processes incoming data through a real-time, time-aware knowledge graph engine, instantly updating entities, relationships, and communities without batch recomputation.

3. Hybrid Search Capabilities

Provides semantic search, BM25, and graph-based search, with result fusion capabilities to ensure the accuracy and relevance of retrieval results.

4. Multi-modal Data Integration

Graphiti continuously integrates user interactions, structured, and unstructured data to build a comprehensive knowledge representation.

Technical Architecture

Knowledge Graph Engine

Graphiti is built on the Neo4j graph database, leveraging the capabilities of LLMs (Large Language Models) to automatically extract entities, relationships, and temporal information. The system is capable of:

  • Extracting entities and relationships from unstructured text
  • Automatically identifying temporal information and establishing temporal relationships
  • Maintaining historical versions and change logs
  • Supporting complex graph queries and reasoning

Temporal Processing Mechanism

A key differentiating feature of Graphiti is its ability to manage dynamic information updates through temporal extraction and edge invalidation processes. The system will:

  • Extract the temporal context of facts
  • Manage the effective and invalidation times of relationships
  • Maintain a complete historical trace
  • Support time-based queries and reasoning

Application Scenarios

1. Personal Assistants and Agents

Supports assistants that learn from user interactions, integrating personal knowledge with dynamic data from business systems such as CRM and billing platforms.

2. Enterprise-level Applications

Suitable for various fields such as sales, customer service, healthcare, and finance, providing assistants and agents with long-term recall and state-based reasoning capabilities.

3. Complex Task Execution

Supports agents that autonomously execute complex tasks, capable of reasoning based on state changes from multiple dynamic sources.

Technical Advantages

Improvements Compared to Traditional RAG

  • Dynamic Data Processing: Overcomes the limitations of static RAG in the face of frequent data updates
  • Contextual Continuity: Maintains the complete context of historical conversations and interactions
  • Relational Reasoning: Performs complex relational reasoning based on the graph structure
  • Temporal Understanding: Understands the temporal dimension and evolution of information

Performance

Zep outperformed MemGPT, the current state-of-the-art system, in the Deep Memory Retrieval (DMR) benchmark, demonstrating its superior performance in memory management.

Open Source Ecosystem

MCP Server Support

The project provides a new MCP server, providing powerful knowledge graph-based memory capabilities for Claude, Cursor, and other MCP clients.

Community Development

Although Graphiti was initially developed for Zep Memory, the team realized its potential extends far beyond memory applications and decided to open source it, hoping the community can explore more possibilities.

Technology Stack

  • Programming Language: Python
  • Graph Database: Neo4j
  • AI Models: Supports integration with various LLMs
  • Search Technologies: Semantic search, BM25, graph search
  • Architectural Pattern: Microservices, API-driven

Summary

Graphiti represents a significant breakthrough in the field of AI memory management. It not only addresses the limitations of traditional methods but also provides a technical foundation for building truly intelligent AI systems with long-term memory capabilities. By capturing temporal changes and supporting advanced search technologies, it addresses the challenges faced by existing systems, enabling AI applications to maintain dynamic and accurate information states.