Build real-time knowledge graphs for AI agents
open sourceApache-2.0self-hostablefreeMCP
Graphiti is an open source Python framework from Zep for building temporal knowledge graphs (it calls them context graphs) from conversations and structured or unstructured data. Each piece of data you add (an episode) goes through LLM calls that extract entities and relationships, resolve them against the existing graph and give each fact a validity window, so a contradicting fact invalidates the old one without deleting it and you can query what was true at any point. Retrieval combines embeddings, BM25 keyword search and graph traversal, and the graph updates incrementally rather than being rebuilt in batches. You bring the graph database (Neo4j, FalkorDB or Amazon Neptune), the LLM and the embedder; it is the engine inside Zep, which hosts it as a service.
Problems it solves
- build a knowledge graph from chat transcripts and documents that records when each fact was true
- query what was true about a customer on a specific date in the past, not only today
- when new information contradicts an old fact, mark the old one invalid but keep its history
- update a knowledge graph incrementally as new data arrives instead of rebuilding it in batches
- combine vector, keyword and graph traversal search for RAG over entities and their relationships
- define my own entity and relationship types with Pydantic for extraction from unstructured text
- trace every fact in my agent's knowledge graph back to the message or document it came from
- open source temporal knowledge graph for agent memory on Neo4j or FalkorDB
- give Claude or Cursor an MCP server backed by a knowledge graph of my notes and conversations
Features
- bi-temporal facts with validity windows; contradicted facts are invalidated, not deleted
- episodes as provenance: every entity and fact traces back to its source data
- prescribed ontology with Pydantic entity and edge types, or learned structure
- incremental graph construction without batch recomputation
- hybrid retrieval: semantic embeddings, BM25 keyword search and graph traversal, with graph-distance reranking
- backends: Neo4j 5.26, FalkorDB (including an embedded FalkorDB Lite) and Amazon Neptune with OpenSearch Serverless
- LLM providers: OpenAI, Azure OpenAI, Anthropic, Gemini, Groq, and OpenAI-compatible or local servers such as Ollama and vLLM
- SEMAPHORE_LIMIT setting for ingestion concurrency against LLM rate limits
- reference MCP server and FastAPI REST server
Limitations
- Doesn't build its graph without an LLM: each ingested episode goes through LLM extraction (OpenAI by default), and it works best with models that support structured output1
- Doesn't store graphs in Postgres or SQLite: it needs Neo4j, FalkorDB or Amazon Neptune1
- Doesn't include a production server: its MCP and REST servers are reference implementations with no authentication or authorization1
Capabilities
| Has an MCP server | plan not known |
|---|
Alternatives
The same job
These do what Graphiti does.
- Zep The enterprise context layer for reliable agents
- Mem0 The memory layer for AI agents
- GraphRAG A modular graph-based Retrieval-Augmented Generation (RAG) system
- LightRAG Simple and Fast Retrieval-Augmented Generation
- Cognee The open-source AI memory platform for agents
- HydraDB Graph database on object storage, and a knowledge and memory layer for AI agents
