Your agent talks to a customer on Monday. On Wednesday the customer upgrades their plan, and on Friday their main contact leaves. When someone asks the agent next week who to call at that customer and what plan they’re on, it should know what’s true now, and what used to be.
That’s the job Graphiti was built for. It’s the open-source framework behind Zep, and it stores what your agent learns as a temporal context graph in Neo4j. We ran it on GrapheneDB to see what it does well, what you need around it, and what a managed database adds.
Everything below is in a starter repo you can run in ten minutes: GrapheneDB/graphiti-graphenedb.
What Graphiti is for
Graphiti turns a stream of episodes into facts connected in a graph. An episode can be a chat message, a piece of text or a JSON event from one of your systems. From each episode, an AI model pulls out the people, companies and things it mentions, and the facts that link them: Tom Becker is the primary contact for Acme Logistics.
Three things set it apart:
- Facts have a lifetime. Every fact records when it became true and, once something replaces it, when it stopped being true. Old facts aren’t deleted, so your agent can answer “what is it now?” and “what was it before?“.
- It updates as you go. Each new episode is read against what the graph already knows. There’s no batch job to rebuild anything.
- Memories stay apart. Each user, customer or project can have its own memory (a group), and a search only looks inside its own group.
It’s not a document summariser: for large, static document collections, GraphRAG-style tools are a better fit. Graphiti’s own README is also clear that it’s a framework, not a finished product: you build the memory service around it.
What you need to run it
| You need | What we used |
|---|---|
| A graph database | Neo4j 2026.8 on GrapheneDB (Graphiti also supports FalkorDB and Amazon Neptune) |
| An AI model to read episodes | Claude Haiku 5.5 |
| An embedding model for search | OpenAI text-embedding-3-small |
| Your own code around it | Python with graphiti-core. Graphiti also ships an MCP server for Claude and other assistants |
Connecting to GrapheneDB is the same as connecting to any Neo4j database: use the neo4j+s:// address from your database’s connection details.
graphiti = Graphiti("neo4j+s://YOUR-DATABASE.graphenedb.com:24786", "neo4j", password,
llm_client=..., embedder=...)What GrapheneDB brings
Graphiti leaves the database to you. That’s the part GrapheneDB takes care of:
- Neo4j without the Enterprise licence. GrapheneDB runs Neo4j Community on dedicated servers on AWS. Graphiti needs nothing beyond Community.
- Read replicas that Graphiti uses with no code change. Graphiti marks its searches as reads, and GrapheneDB’s routing sends reads to the replicas. We measured it below.
- Backups, metrics and query logs. Snapshots on a schedule, database metrics, slow query logs and a Grafana endpoint, so you can see what your agents’ memory is doing.
- Private networking. VPC peering and IP allowlisting, because a memory full of customer facts shouldn’t sit on the open internet.
- A plan you can grow. Start small and move up as your memories grow. The sizing numbers are below.
What we tested
We made up a SaaS company with 8 customers and gave each one its own memory. Each customer has three months of history, 51 episodes in all:
- Support chats, as Graphiti
messageepisodes. - Events from business systems, as JSON: plan changes, seats, contacts, tickets, renewals and a cancellation.
Several facts change along the way. Acme Logistics moves from Starter to Growth and later loses a discount. Its contact Priya Shah leaves and Tom Becker takes over. Another customer cancels.
Then we asked 25 questions about the present, the past and when things changed. The database was a DS3, first on its own and then with one read replica.
Facts that change: what worked
Graphiti’s strength showed up clearly. Here are the facts it returned when we asked who Acme’s contact is:
| Fact | True from | Ended |
|---|---|---|
| Acme Logistics has Priya Shah as its contact | Jul 1 | Sep 20 |
| Tom Becker became the primary contact for Acme Logistics | Sep 20 | still true |
Nobody told Graphiti to end Priya’s fact. It read the CRM event about the new contact and worked it out, with the right date.
Across all 25 questions:
| Question type | Example | Result |
|---|---|---|
| History | “Who was Acme’s contact before Tom Becker?” | 4 of 4, every old fact marked as ended, with its date |
| When | “When did Cobalt Studio downgrade?” | 2 of 2 |
| Current state | “What plan is Cobalt Studio on now?” | 14 of 19 |
| Facts from another customer’s memory | none, in any search |
Three things to know about current answers
The five current-state misses weren’t random. They point to three behaviours worth knowing before you rely on Graphiti for “what’s true now”:
- A fact can end when something next to it ends. Graphiti wrote Acme’s upgrade as one fact: changed its plan from Starter to Growth, with a 15% discount for the first year. When the discount was removed on October 1, the whole fact was ended, plan included.
- A repeated fact can replace the original. When a later chat mentioned something that an event had already recorded, Graphiti sometimes ended the original fact and kept the chat’s version, which can be vaguer. That’s how “Mark Lindqvist is Ember’s new success manager” lost the word Ember and dropped out of the top results.
- One-day events look finished. “Fjord Travel cancelled, effective October 10” got the same start and end date, so it reads as over, while the older “the account is active” fact stayed true.
The lesson isn’t to avoid Graphiti. It’s to check it on your own data: write down a few questions with known answers, and run them after every change. The starter repo does this with memory.py check.
Speed: many memories don’t slow each other down
On Neo4j, Graphiti doesn’t use a vector index. To find facts, it compares the question with every fact in the memory it’s searching. So what matters is the size of one memory, not the size of the database.
We tested it by adding 800 more customer memories (synthetic facts, no AI) next to the 8 real ones, and timing the same questions:
| Facts in the whole database | Search in one customer’s memory |
|---|---|
| 131 (the 8 real customers) | 0.37 s |
| 20,000 | 0.36 s |
| 40,000 | 0.34 s |
The time didn’t move. Thousands of customers, each with their own memory, fit comfortably.
If you put everything into one big memory, it’s different. In an earlier test we grew a single memory and timed search on three plans:
| Facts in one memory | DS1 | DS2 | DS3 |
|---|---|---|---|
| 5,000 | 1.13 s | 0.98 s | 0.89 s |
| 10,000 | 1.94 s | 1.12 s | 1.02 s |
| 25,000 | 6.60 s | 2.64 s | 2.01 s |
So: one memory per customer, user or project where you can. If one memory has to hold tens of thousands of facts, give it a bigger plan.
Read replicas: more capacity, no code changes
Then we added one read replica to the DS3, from the console, with no downtime. Nothing changed in our code.
- Reads moved on their own. The cluster’s routing table started offering the replica for reads, and every Graphiti search went there. So did the lookups Graphiti makes while adding episodes, and they created no duplicate entities.
- A read straight after a write saw it. Replicas copy writes in the background, but in our test a search right after adding a fact found it on the first try.
| DS3 alone | DS3 + 1 replica | |
|---|---|---|
| One search | 0.37 s | 0.35 s |
| 20 searches at once | 13 per second | 17 per second |
| 40 searches at once | 17 per second | 20 per second |
| Writing while agents search | 232 facts/s | 271 facts/s |
A replica doesn’t make a single search faster. It adds capacity: more searches at the same time, and the main node is free to write. It also gives you a copy of your agents’ memory in another availability zone, should one go down.
One thing it doesn’t do: during heavy writes, searches slowed down about the same with or without the replica (0.73 s in both cases), because the replica applies the same writes.
What it costs
Reading episodes: with Claude Haiku 5.5, Graphiti used about 13,700 input and 720 output tokens per episode: about $0.0017 each. A chat message costs about the same as a page of text, because Graphiti’s own instructions make up most of each request. 10,000 episodes come to about $17.
Searching: one embedding of the question, a tiny fraction of a cent.
The database: billed by the hour. Running all month, a DS1 is about $44, a DS2 $87 and a DS3 $181. Replicas are available from DS3, and each one costs the same as the main node.
Graphiti itself: it’s a library, so it runs inside your app at no extra cost. Graphiti’s MCP server is light too, but it has no authentication of its own: keep it on your own machine or a private network.
Three things we learned on the way
- Keep one embedding size per memory. Graphiti’s library makes 1024-dimension embeddings by default, but its MCP server’s config ships with 1536. Point both at the same memory without changing one, and every search fails with a “different number of dimensions” error. The starter repo pins 1024, and its MCP guide shows the one-line fix.
- Upgrade without downtime. With a read replica, you can move to a bigger plan while your agents keep working. The nodes are upgraded one at a time, so there’s always one left to answer Graphiti’s searches.
- The first start prints scary errors. Graphiti creates its indexes in parallel, and some attempts collide (
EquivalentSchemaRuleAlreadyExists). They’re harmless.
What this setup doesn’t give you
Graphiti on GrapheneDB gives you a solid temporal graph and a database you don’t have to run. It isn’t a finished memory for a team. If you take it to production, plan for:
- Getting the data in. Graphiti reads what you hand it. Pulling from your CRM, tickets and chats, and keeping it in sync, is code you write and run.
- Who can see what. Everything in a group is visible to anyone who can query it. Your application decides who gets which memory.
- Knowing it answers well. Without a set of known questions to check against, you won’t know how well it answers, or when that drops.
- The service around it. Graphiti is a library. Authentication, an API for your agents and monitoring the AI calls are yours to build.
None of these are flaws in Graphiti: it’s a framework, and these are the jobs around it. But they’re where most of the work goes once the demo works.
Try it
- Create a database on GrapheneDB. A DS1 is enough to start.
- Clone GrapheneDB/graphiti-graphenedb, fill in
.env, and add the sample customer histories. - Ask what’s true now and what was true before. Then try it with your own data, and check the answers.
The repo’s production checklist covers the rest.