graphiti
Graphiti is the 'build your own temporal graph memory' library from the same team that makes zep. Where zep is a ready-to-run service, graphiti is a Python library you embed in your own application. Backed by Neo4j, it gives you library-level control over ingestion, schema, and retrieval — at the cost of more code.
- Developers building a product where the graph IS the product
- Teams comfortable running Neo4j
- Use cases where relationships matter more than documents (patient-provider, part-supplier, student-cohort)
What you'll do
graphiti is a Python library + a Neo4j database. You embed it in your backend and call its ingestion/query APIs. Budget 30 minutes the first time.
Before you start
- Python 3.10+
- Neo4j Community installed (Docker or native)
- An OpenAI or Anthropic API key
Step-by-step install
- 011. Run Neo4j
Easiest path is Docker.
docker run -d --name neo4j \ -p 7474:7474 -p 7687:7687 \ -e NEO4J_AUTH=neo4j/devpassword \ neo4j:5-community
- 022. Install graphiti
pip install graphiti-core
- 033. Minimal usage script
Create a Python file that connects, ingests a fact, and queries.
from graphiti_core import Graphiti from graphiti_core.llm_client import OpenAIClient graphiti = Graphiti( neo4j_uri="bolt://localhost:7687", neo4j_user="neo4j", neo4j_password="devpassword", llm_client=OpenAIClient(api_key="sk-...") ) await graphiti.build_indices_and_constraints() # Ingest an episode (a chunk of information to be extracted into the graph) await graphiti.add_episode( name="team_standup_2026_04_16", episode_body="Amara became CX lead today. Devon is still CTO. Jo is our new hire starting Monday.", source="meeting", reference_time=datetime.now() ) # Query results = await graphiti.search("who is the CX lead?") print(results) - 044. Explore in Neo4j Browser
Open http://localhost:7474 (login neo4j / devpassword). Run `MATCH (n) RETURN n LIMIT 50` in Cypher. You'll see the graph graphiti built visually.
Tip: This visual exploration is the main reason to pick graphiti over zep. If you never open Neo4j Browser, you might as well be using zep.
Your first 10 minutes
- 01Ingest 5 'episodes' from your real org (meeting notes, team updates).
- 02Query the graph for a temporal question. Confirm results.
- 03Open Neo4j Browser. Explore what got built.
- 04Decide your schema — graphiti supports typed entities. Custom types give way better retrieval.
- 05Add Cognition CLO on top for retention modeling per employee.
Troubleshooting
Can't connect to Neo4j.
Check the docker container is running (`docker ps`). Confirm you're using the bolt URI (port 7687), not the browser URI (7474).
Episode ingestion is slow.
Each episode makes an LLM call for extraction. Batch your ingestion and use a cheaper model (gpt-4o-mini works well) for extraction.
graphiti holds the knowledge. Cognition CLO models retention per employee per concept using a Weibull forgetting curve — so you see decay before it becomes a missed SOP or a failed audit.