# Repository Briefing: getzep/graphiti
> Source: https://repoforai.com/repo/getzep/graphiti (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/getzep/graphiti
- **Official Docs / Website**: https://help.getzep.com/graphiti
- **Category**: RAG, Data & Memory (知识库 / 爬虫 / 记忆层)
- **Primary Language**: Python
- **License**: Apache-2.0
- **Engineering Health**: A+ (98/100 · Maintenance 35/35 · Adoption 23/25 · Releases 20/20 · License 20/20)
- **Latest Release**: mcp-v1.1.5 (2026-11-24) — https://github.com/getzep/graphiti/releases
- **Review Snapshot**: 2026-12-03
- **Deployment / Stack Signals**: Docker, Self-Hosted, MCP, API
- **Momentum**: 33,288 ★ total (+8 24h / +143 7d) · 3,438 forks
- **Topics**: `agents`, `graph`, `llms`, `rag`
- **When to Use**: Best for: Teams building agent memory over changing customer histories, policies, or operational events, where answers need current and historical relationships with source evidence. Skip if: Passage retrieval already answers the questions, or you need managed ingestion, tenancy, and governance rather than a framework your team operates.

## Overview
```text
### Architecture & Core Mechanics
Graphiti is an Apache-2.0 Python framework for constructing and querying temporal graphs, not a standalone database engine. `graphiti_core/` ingests text or structured JSON as episodes. Model-assisted extraction and deduplication turn these inputs into entities and relationship edges while retaining links to their sources. An edge records when a fact is valid; when a new fact supersedes it, the old one remains available for historical queries rather than being deleted.

The `graphiti-core` manifest targets Python 3.10+ and includes Pydantic 2.11.5+, the Neo4j driver 5.26.0+, and the OpenAI client 1.91.0+. Pydantic models extend the entity and relationship schema, while the `graph_driver` constructor argument selects the storage implementation. Inference and embeddings can be configured separately from storage. The tree separates the Python core, HTTP service (`server/`), and MCP service (`mcp_server/`), so an application can embed the library or call it across a service boundary.

### Key Capabilities & Differentiators
Graphiti incrementally incorporates new episodes instead of rebuilding the entire graph. It can infer entity and relationship structure from inputs or use application-defined Pydantic types. For retrieval, it combines semantic embeddings, BM25 keyword matching, and graph traversal. The quickstart exercises relationship search, graph-distance reranking, and predefined node-search recipes. Validity windows and source links let applications ask not only what is relevant, but what was true at a given time and which evidence produced the fact.

Storage choices include Neo4j, FalkorDB, Amazon Neptune, and embedded Relate; Neptune uses an OpenSearch Serverless collection for full-text search. OpenAI is the default for inference and embeddings, with optional Anthropic, Gemini, and Groq integrations for inference. `OpenAIGenericClient` can target hosted or local OpenAI-compatible `/v1` endpoints such as Ollama or vLLM. Compatibility with the API is not enough on its own: extraction and deduplication depend on reliable structured JSON output, especially when evaluating smaller models.

### Trade-offs & Limitations
Graphiti earns its extra complexity when time and relationships change the answer. A vector index over document chunks is simpler when relevant passages are sufficient, and a batch-oriented GraphRAG pipeline is a better fit when the main output is a synthesis of a largely stable corpus. Graphiti takes on graph construction and temporal tracking, but compared with managed Zep it leaves ingestion integration, user and thread modeling, tenancy, authorization, and operations to the application team.

Ingestion speed and graph quality depend on provider quotas and the reliability of extraction and deduplication. `SEMAPHORE_LIMIT` defaults to 10 concurrent operations; tune it against observed throughput and HTTP 429 errors rather than assuming higher concurrency helps. Before committing, test whether representative episodes produce correct entity matches, fact supersession, and historical results. A local endpoint can reduce external data exposure, but only if the relevant model calls are routed locally, and serving those models adds operational work.

### Hardware & Deployment Guide
Install `graphiti-core` on Python 3.10+, configure the graph and model clients, and initialize graph indexes and constraints before ingestion. Relate requires Python 3.11+ and runs in-process; its default `:memory:` storage is ephemeral, so pass a file path when persistence is required. The supplied Docker Compose setup builds the HTTP service from the repository root, runs Neo4j 5.26.2, and publishes the API at `127.0.0.1:8000`. It waits for Neo4j health and probes the API at `/healthcheck`. Replace the development database password before exposing a deployment.

With hosted models, size the application and graph backend for workload rather than local inference; for a local deployment, configure the inference and embedding endpoints separately and benchmark their resource use. Pin core and MCP versions independently: core `v0.32.1` replaces `v0.32.0` without functional code changes, while `mcp-v1.1.5` replaces an MCP release that failed to publish Docker images. The MCP update passes the selected group to the core and rejects UUIDs from other groups in affected operations, including `delete_episode` and `get_episode_entities`. That check does not replace application-level authorization.
```

## Key Capabilities
```text
- Temporal model: Relationship edges carry validity windows, so superseded facts remain available for historical queries.
- Provenance and schema: Source episodes retain ingested text or structured JSON; Pydantic models define custom entity and edge types.
- Retrieval: Semantic embeddings, BM25 keyword matching, and graph traversal support node and edge search, with graph-distance reranking.
- Storage: Neo4j and FalkorDB are server backends; Neptune uses OpenSearch Serverless for full-text search, while Relate can run in-process.
- Model integration: OpenAI is the default for inference and embeddings; `OpenAIGenericClient` supports compatible `/v1` endpoints and defaults to `json_schema` mode.
- API and MCP: The supplied Compose API binds to `127.0.0.1:8000`; MCP `mcp-v1.1.5` delivers group-scoped checks for affected UUID-based operations.
```

## Quick Start / Clone
```bash
pip install graphiti-core
```
