What is Graphiti?
Dealing with constantly changing information is a major hurdle when building intelligent AI agents. Traditional methods often struggle to keep up, lacking the ability to integrate new data smoothly or understand historical context accurately. Graphiti provides a robust framework specifically designed to construct and query knowledge graphs that evolve over time, giving your AI agents the contextual memory they need to operate effectively in dynamic environments.
Instead of relying on static snapshots or periodic batch processing common in Retrieval-Augmented Generation (RAG), Graphiti continuously weaves together user interactions, structured enterprise data, and unstructured information into a coherent, time-aware knowledge graph. This allows your applications to understand not just what is known, but when it was true, enabling more sophisticated reasoning and interaction. Graphiti powers the core memory layer for Zep, contributing to its state-of-the-art performance in agent memory benchmarks.
Key Features
Graphiti offers several capabilities tailored for dynamic data and AI agents:
📈 Real-Time Incremental Updates: Integrate new information (episodes) instantly into the graph without needing costly full recalculations. This keeps your agent's knowledge current with minimal delay.
⏱️ Bi-Temporal Data Model: Explicitly track both the time an event occurred (valid time) and the time it was recorded (transaction time). This allows for precise "point-in-time" queries, letting you ask what was known at a specific moment in the past.
🔍 Efficient Hybrid Retrieval: Combine semantic (embedding-based), keyword (BM25), and graph traversal search methods. This multi-pronged approach delivers relevant results quickly, often in sub-second timeframes, without relying solely on slower LLM summarization for retrieval.
🧩 Custom Entity Definitions: Define your own entity types using simple Pydantic models. This flexibility allows you to tailor the knowledge graph's structure (ontology) to your specific domain and application needs.
⚙️ Scalability: Designed for efficiency with large datasets, utilizing parallel processing capabilities (where supported) to handle enterprise-level workloads.
Use Cases
Developing Sophisticated Chatbots: Build chatbots that remember user preferences and conversation history accurately, even as details change over multiple interactions. Graphiti can track evolving relationships like "User liked product X" and later "User disliked product X," understanding the correct state based on time.
Creating Context-Aware Task Automation Agents: Design agents that operate on dynamic business data. For example, an agent could manage inventory levels, track customer support ticket statuses, or monitor project progress by querying a Graphiti knowledge graph that's continuously updated with real-time operational data.
Building Intelligent Information Synthesis Tools: Construct applications that integrate information from diverse, changing sources (e.g., news feeds, reports, user inputs). Graphiti can maintain a coherent knowledge base, allowing users to query the synthesized information while respecting the historical timeline of when facts were valid (e.g., "Who was the CEO of Company Y before the merger?").
Getting Started with Graphiti
Integrating Graphiti involves setting up the library, connecting to a Neo4j database (used for storing graph data and embeddings), and providing an OpenAI-compatible API key for embedding generation and optional LLM inference.





