graphiti: temporal knowledge graphs for AI agents, as an open-source Python library
A plain-English guide to graphiti — the open-source Python library for temporal knowledge graphs in AI agent memory. Neo4j-backed. Built by the zep team. Full control, self-host your own production memory layer.
Short version: graphiti is the open-source Python library from the zep team for building temporal knowledge graphs for AI agent memory. Neo4j-backed. Full-control self-host when you want to own the stack. If you liked zep's capabilities but want the library rather than the platform, graphiti is the pick. Apache-2.0 licensed. 20-minute install. By getzep.
What is graphiti?
graphiti is the library version of zep's memory platform. Same core ideas — temporal knowledge graphs, time-aware retrieval — but shipped as a Python library you deploy yourself on Neo4j. Where zep is a managed platform with enterprise features bolted on, graphiti is the primitive you build with.
The core abstractions: nodes (entities in your domain), edges (relationships between them), temporal validity (both nodes and edges have effective dates). Your agent can ask "what did we believe about X as of this date?" and get a correct answer grounded in the graph as of that moment.
Who this is for
- Python teams who want full control over their memory stack.
- Engineering teams comfortable running Neo4j in production.
- Anyone whose agent really needs temporal semantics (financial history, changing entity state, regulated workflows).
- Developers who want the zep capabilities without the managed platform.
Skip this if
You're early-stage or solo — Neo4j is operational overhead. Start with memory-mcp or mem0. If you want managed graph memory without Ops, use zep (same team).
What problem it solves
Flat memory stores silently overwrite history. If Amara's role was "CX analyst" and became "CX lead" on April 15, a flat store just has "CX lead" now — the history is gone. For many workflows (compliance, auditing, reasoning about past state), that lost history is the whole ball game.
graphiti keeps time as a first-class dimension. Every node and edge has effective dates. Queries can be "as of" a specific moment. Your agent can reason about what was true when, which matters more than most founders realize until they need it.
How to install it (plain English)
- Set up Neo4j. Local: Docker container. Production: managed Neo4j Aura or self-hosted cluster.
- Install graphiti.
pip install graphiti-core. - Initialize. Point graphiti at your Neo4j instance.
- Add episodes. Feed it text, conversations, or structured data. graphiti extracts entities and relations with temporal metadata.
- Query with time awareness. Search supports "as of" semantics.
Full walkthrough: /memory/tools/graphiti.
What you can do with it (for a non-technical founder)
If your team is building a memory-heavy AI product:
- Own your memory stack — self-host, no third-party dependency, full control over data.
- Audit-ready history — every change is tracked temporally; questions about past state have real answers.
- Rich graph queries — Neo4j + Cypher means you can do structural queries mem0 can't express.
- Agent-in-the-loop extraction — graphiti uses LLMs to extract graph structure from raw input.
- Upgrade path to zep — if you outgrow self-hosting Neo4j, migrate to zep managed without rewriting your schema.
What CLO adds on top
graphiti is the temporal knowledge store your product's agent reads and writes. Cognition CLO is the retention layer for your internal team's knowledge. Build on graphiti for production memory; layer CLO when you care about which of your employees is keeping up with org knowledge.
FAQ
Do I need Neo4j? Can I use something simpler?
graphiti is Neo4j-first. For a simpler graph memory without Neo4j ops, look at cognee (local SQLite/DuckDB or pluggable backend).
How is it different from zep?
Same team. graphiti is the library; zep is the platform built on top. If you want the primitive, pick graphiti. If you want the managed/enterprise version, pick zep. See /blog/zep-vs-graphiti.
Does graphiti support multi-user scoping?
Yes — you scope queries by user/session IDs in your graph design. It's not as ergonomic as mem0's user_id parameter; you're working at the graph level.
What LLM does it use for extraction?
Configurable — OpenAI, Anthropic, or local models. Extraction is the heaviest operation; pick a cheap model (gpt-4o-mini, Haiku) to keep costs down.
How does it compare to mem0?
mem0 is vector-first with optional graph augmentation. graphiti is graph-first with temporal semantics. Use mem0 for multi-user semantic search. Use graphiti when time + structure matter more than vector retrieval.
What's the community like?
Smaller than mem0 but solid — concentrated around the zep team's roadmap. Getting enterprise-grade attention via the commercial zep product.
Ready to install? Full walkthrough at /memory/tools/graphiti. Comparison with zep: /blog/zep-vs-graphiti. Credit to the getzep team — star the repo if temporal memory is on your roadmap.
Share this post: