# AI use cases for Graphiti (getzep/graphiti)

Repo: [getzep/graphiti](https://github.com/getzep/graphiti) | Use cases: 3 | Page: https://dedupedai.com/use-cases/getzep-graphiti/

Graphiti is a Python framework for building and querying temporal context graphs for AI agents. It turns episodes of text or JSON into entities and facts with validity windows, keeps provenance back to the source data, updates incrementally without recomputing the graph, and retrieves with hybrid semantic, keyword (BM25) and graph traversal search on Neo4j, FalkorDB, Kuzu or Amazon Neptune.

This file holds every use case of this repo. Each one starts with a "## " heading and ends with its URL.

- Give an agent memory that tracks how facts change: https://dedupedai.com/use-cases/getzep-graphiti/give-an-agent-temporal-memory-with-graphiti/
- Build a private knowledge graph with local models: https://dedupedai.com/use-cases/getzep-graphiti/build-a-private-knowledge-graph-with-graphiti-and-ollama/
- Shape the graph with your own entity types: https://dedupedai.com/use-cases/getzep-graphiti/define-custom-entity-types-with-graphiti/

## How to give an agent memory that tracks how facts change with Graphiti

Repo: [getzep/graphiti](https://github.com/getzep/graphiti) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Store each conversation turn or record as an episode so the graph keeps what is true now and what was true before.

**Who it is for:** A developer whose assistant forgets or contradicts user preferences that change over time.

**The problem:** Flat document chunks cannot tell an old fact from its replacement.

**The outcome:** A context graph where superseded facts are invalidated, not deleted, and every fact traces back to its episode.

### Steps

1. Install the library with `pip install graphiti-core` and set `OPENAI_API_KEY` in your environment
2. Start a graph database with `docker compose up` for Neo4j, or `docker compose --profile falkordb up` for FalkorDB
3. Follow the Quickstart Example to connect, build the indices and constraints, and add text and JSON episodes
4. Query with hybrid search for relationships and rerank results by graph distance

### Prompt to paste into your agent

```text
Using getzep/graphiti, install it with `pip install graphiti-core`, start Neo4j with `docker compose up`, ingest <my conversation log> as episodes, and show me one fact that was invalidated by a later episode.
```

### Caveat

Graphiti works best with LLM services that support structured output; smaller models may cause ingestion failures.

Risk, privacy: Episode content is sent to the configured LLM provider for extraction; use a local model for sensitive data.

Risk, cost: Ingestion calls the LLM for every episode; the README sets SEMAPHORE_LIMIT to 10 by default to avoid 429 rate limit errors.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/getzep-graphiti/give-an-agent-temporal-memory-with-graphiti/

## How to build a private knowledge graph with local models with Graphiti

Repo: [getzep/graphiti](https://github.com/getzep/graphiti) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Run extraction and embeddings through Ollama's OpenAI-compatible endpoint so no data leaves your machine.

**Who it is for:** A privacy-minded developer who cannot send documents to a hosted model.

**The problem:** The default setup sends everything to OpenAI.

**The outcome:** Graphiti running against local deepseek-r1:7b and nomic-embed-text models via OpenAIGenericClient.

### Steps

1. Pull the models with `ollama pull deepseek-r1:7b` and `ollama pull nomic-embed-text`
2. Make sure Ollama is running with `ollama serve`
3. Configure OpenAIGenericClient with base_url http://localhost:11434/v1 and an OpenAIEmbedder with embedding_dim 768, as in the README
4. Set structured_output_mode to json_object if your local model does not honor json_schema

### Prompt to paste into your agent

```text
Using getzep/graphiti with a local Ollama server, configure OpenAIGenericClient and OpenAIEmbedder as the README shows, ingest <my notes folder>, and report how many entities were extracted and any extraction failures.
```

### Caveat

Very small local models often emit JSON that does not match the schema; prefer the most capable model you can run.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/getzep-graphiti/build-a-private-knowledge-graph-with-graphiti-and-ollama/

## How to shape the graph with your own entity types with Graphiti

Repo: [getzep/graphiti](https://github.com/getzep/graphiti) | Difficulty: Advanced | Time: 2 hours | Basis: From the README

Declare entity and edge types as Pydantic models so the graph follows your domain, or let structure emerge from the data.

**Who it is for:** A team modeling customers, products or policies that need a predictable schema.

**The problem:** Learned structure alone can produce inconsistent entity types across documents.

**The outcome:** A graph whose nodes and edges use your prescribed types, with room to add learned ones later.

### Steps

1. Install a backend extra, for example `pip install graphiti-core[falkordb]`
2. Define entity and edge types as Pydantic models (prescribed ontology)
3. Ingest episodes and compare the result with what learned ontology produces
4. Disable telemetry if you need to with `export GRAPHITI_TELEMETRY_ENABLED=false`

### Prompt to paste into your agent

```text
Using getzep/graphiti, define Pydantic entity types for <my domain>, ingest <sample records> as episodes, and list the entity types that ended up in the graph.
```

### Caveat

Graphiti is a framework, not a hosted memory product; you run the database, retrieval and service around it.

Risk, security: The reference MCP and REST servers have no authentication or prompt-injection protection; do not expose them to an untrusted network.

Disclaimer: Third-party repos we don't own or vouch for. AI-generated use cases can be wrong: review everything and run at your own risk. Full text: https://dedupedai.com/disclaimer/

URL: https://dedupedai.com/use-cases/getzep-graphiti/define-custom-entity-types-with-graphiti/
