A Python data pipeline that uses LLMs to extract structured knowledge graphs from unstructured text for retrieval-augmented question answering.
getzep/graphiti
Python framework for building temporal knowledge graphs that track how facts change over time, used as memory and context for AI agents.
- Stars
- 32,066
- Forks
- 3,294
- Open issues
- 488
- Last commit
- 9 hours ago
What is it?
Graphiti builds context graphs for AI agents from conversations, structured records and unstructured text. Each fact is stored as an entity-relationship-entity edge with a validity window, so when information changes the old fact is invalidated rather than deleted, and both current and historical states can be queried. Every derived fact keeps a link back to the raw episode that produced it.
Unlike batch-oriented GraphRAG pipelines, new episodes are integrated incrementally without recomputing the whole graph. Retrieval combines semantic embeddings, BM25 keyword search and graph traversal. Developers can define entity and edge types with Pydantic models, or let structure emerge from data.
Graphiti works with Neo4j, FalkorDB, Amazon Neptune and Kuzu (deprecated) as graph backends, and with OpenAI by default, along with Anthropic, Gemini, Groq, Azure OpenAI and OpenAI-compatible endpoints such as Ollama. It includes reference MCP and REST servers that are not intended for production use without added authentication.
Key features
- 01Tracks fact validity windows and invalidates outdated facts instead of deleting them
- 02Keeps provenance from every derived fact back to its source episode
- 03Supports incremental updates without full graph recomputation
- 04Hybrid retrieval over embeddings, BM25 keywords and graph traversal
- 05Custom entity and edge types defined with Pydantic models
- 06Pluggable backends including Neo4j, FalkorDB and Amazon Neptune
Use cases
- Giving a chatbot or agent long-term memory of user preferences that change over time
- Building a knowledge base that merges structured records and documents while keeping history
- Answering point-in-time questions such as what was true last quarter
- Prototyping temporal graph RAG with a local model through an OpenAI-compatible endpoint
Quick start
- 1
Install the library with pip
pip install graphiti-core - 2
Set an OPENAI_API_KEY environment variable (Graphiti defaults to OpenAI)
- 3
Start a graph database such as FalkorDB via Docker for the quickstart
docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest - 4
Run the quickstart example from the examples/quickstart directory
Things to know
- Requires a graph database such as Neo4j, FalkorDB, or Neptune, plus an LLM API key, so setup takes real effort.
- Self-hosted only; there is no managed hosting from this project.
- Works best with LLMs that support structured output; smaller models may cause ingestion failures.
- Default concurrency is low to avoid rate limits, so ingestion can be slow until tuned.
Topics
FAQ
- What is graphiti?
- Python framework for building temporal knowledge graphs that track how facts change over time, used as memory and context for AI agents. Graphiti builds context graphs for AI agents from conversations, structured records and unstructured text. Each fact is stored as an entity-relationship-entity edge with a validity window, so when information changes the old fact is invalidated rather than deleted, and both current and historical states can be queried. Every derived fact keeps a link back to the raw episode that produced it.
- Is graphiti free to use? What license does it have?
- graphiti is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
- Is graphiti still maintained?
- Actively maintained. The last commit to graphiti was on Oct 20, 2026.
- What can I use graphiti for?
- Giving a chatbot or agent long-term memory of user preferences that change over time Building a knowledge base that merges structured records and documents while keeping history Answering point-in-time questions such as what was true last quarter Prototyping temporal graph RAG with a local model through an OpenAI-compatible endpoint
- How do I install graphiti?
- Install the library with pip: pip install graphiti-core Set an OPENAI_API_KEY environment variable (Graphiti defaults to OpenAI) Start a graph database such as FalkorDB via Docker for the quickstart: docker run -p 6379:6379 -p 3000:3000 -it --rm falkordb/falkordb:latest Run the quickstart example from the examples/quickstart directory
- Where can I get graphiti?
- The source code and installation instructions are on GitHub: https://github.com/getzep/graphiti
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source AI memory platform that turns documents, code and conversations into a self-hosted knowledge graph for AI agents.
A graph-native memory system for AI agents that stores conversations, builds knowledge graphs and records reasoning, backed by Neo4j.
A large collection of open-source AI agents, agent skills, and RAG apps built on Claude, Gemini, GPT, DeepSeek, Llama, and Qwen models.
Local-first AI memory system that stores conversation history verbatim and retrieves it with semantic search, exposed as an MCP server and CLI.
Agent memory system that stores, recalls and reflects on memories so AI agents learn over time instead of only replaying chat history.