Logo de Graphiti Incremental Update

Graphiti Incremental Update

Comunidade
AnthonyAlcaraz
graphiti-incremental-update

Graphiti (Zep) incremental-update pattern (Ch4). When new content arrives, process only the new content — never re-process the entire graph. Pipeline: (1) extract entities from new episode, (2) entity-resolve against existing graph (dedupe by canonical name + alias + fuzzy match), (3) incremental- update — touch only the affected neighborhood, leave the rest of the graph unchanged. Keeps update latency O(new content) instead of O(full graph), enabling sub-second latency at millions-of-nodes scale. Use when memory graph grows continuously and full-graph re-embedding is impossibly expensive. NOT for one-shot batch ingestion (just process it once), NOT for static knowledge bases (no updates means no incremental anything).

Visão geral

Publicado porAnthonyAlcaraz
Repositórioagentic-graph-rag-skills
Nome da habilidadegraphiti-incremental-update
Estrelas
29
Forks
9
Arquivos incluídos
2
LicençaMIT
Links
  • Instruções em Markdown

    Um arquivo SKILL.md que o modelo carrega sob demanda, consumindo tokens apenas quando uma solicitação é realmente relevante para a habilidade.

  • Funciona com qualquer LLM

    As habilidades de IA são escritas em Markdown simples, não em código específico de um provedor. Por isso, funcionam com GPT, Claude, Gemini, Grok ou um modelo local.

  • Arquivos incluídos: 2

    Scripts, templates e referências que o modelo pode ler enquanto trabalha. Os arquivos são somente para leitura e nunca são executados.

  • Código aberto

    Publicada por AnthonyAlcaraz no GitHub. Leia os arquivos da habilidade antes de instalá-la.

Instalação

Instale a habilidade de IA Graphiti Incremental Update no TypingMind para usá-la com qualquer LLM ou adicione-a a outro agente que leia SKILL.md.

1

Instalar no TypingMind

O TypingMind instala uma habilidade diretamente da pasta dela no GitHub — lê o arquivo SKILL.md, reúne os arquivos de recursos em um pacote e armazena o resultado localmente.

  1. Abra o app e vá para Plugins → Habilidades.
  2. Escolha "Instalar do GitHub".
  3. Cole a URL abaixo, que aponta para a pasta da habilidade, e confirme.
    https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/memory/graphiti-incremental-update
  4. Ative a habilidade em cada chat em que quiser disponibilizá-la.
Plugins → Habilidades → Adicionar habilidade → Via URL do GitHub. Depois, cole a URL da pasta e pressione Continuar.
2

Instalar em outro agente

Qualquer agente que leia o formato Agent Skills pode usar esta habilidade — copie a pasta para o diretório de habilidades desse agente.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills.git /tmp/agentic-graph-rag-skills
mkdir -p .claude/skills
cp -r /tmp/agentic-graph-rag-skills/skills/memory/graphiti-incremental-update .claude/skills/graphiti-incremental-update
Reinicie Claude Code após copiar para que a nova habilidade seja reconhecida.

Use no TypingMind

Ative Graphiti Incremental Update em qualquer chat do TypingMind e o modelo cuida do resto. O nome e a descrição da habilidade ficam no prompt do sistema e, assim que uma solicitação relevante aparece, o modelo carrega as instruções completas automaticamente — sem precisar de acionamento manual e sem consumir tokens até que ela seja realmente usada.

O modelo carrega Graphiti Incremental Update automaticamente assim que uma solicitação é relevante para essa habilidade.

Funciona com qualquer modelo de IA

Habilidades de IA são instruções em Markdown simples, não código específico de um provedor. Por isso, Graphiti Incremental Update não fica vinculada ao modelo para o qual foi criada. Instale-a uma vez no TypingMind e use-a com GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama ou um modelo local executado por conta própria — tudo com suas próprias chaves de API.

  • Carregada apenas quando necessário

    O prompt do sistema contém apenas o nome e a descrição. As instruções são buscadas na primeira solicitação relevante, então uma habilidade sem uso não gera custo.

  • Troque de modelo durante a conversa

    Como a habilidade é composta de instruções, não de código, trocar de modelo não afeta seu funcionamento — o próximo modelo lê o mesmo arquivo SKILL.md.

Instruções da habilidade

Este é o conteúdo de SKILL.md que o modelo carrega. Leia antes de instalar — uma habilidade é um conjunto de instruções que seu modelo seguirá.

Graphiti Incremental-Update

Overview

A naive add-to-graph implementation re-extracts entities across the whole corpus, re-computes embeddings, and re-clusters everything every time new content arrives. At millions-of-nodes scale this is fatal: update latency grows with graph size, and the agent ends up waiting for re-indexing instead of reasoning.

Graphiti (Zep) ships a different pattern (Ch4 Example 4-8):

  1. Extract entities and relationships only from the new episode. No backfill, no full-corpus re-pass.
  2. Entity-resolve: match each extracted entity against existing graph nodes by canonical name, then alias, then fuzzy/embedding similarity. If matched, reuse the existing node id. If not, create new.
  3. Incremental-update: modify only the touched neighborhood. New edges, possibly updated node metadata, no global re-clustering.

The chapter quote: "incremental_update modifies only the impacted neighborhood: the few nodes and edges touched by the new entities and relationships. The rest of the graph stays untouched, which keeps write operations predictably fast."

The retrieval side mirrors this: instead of one big query over everything, run parallel partial queries (vector / graph walk / keyword) targeting recent / specific / textual subsets, then merge. Production-grade Reciprocal Rank Fusion lives in a sibling skill; this skill is the ingestion side.

When to Use

  • Memory graph that grows continuously (every interaction adds nodes)
  • DevOps incident streams: new alerts, new deployments, new comments arriving every few seconds
  • Customer-support agents where each ticket is an "episode" — entities (customer, product, issue type) resolve to existing nodes, new edges are added
  • Multi-agent systems where each agent contributes new content to a shared graph and no agent should block on full-graph re-processing

Phrases: "incremental update", "don't re-process the whole graph", "entity resolution", "deduplicate against existing nodes", "Graphiti pattern", "add an episode".

When NOT to Use

  • One-shot batch ingestion. Process the corpus once, build the graph, done. Incremental pattern is overhead.
  • Static knowledge base. No updates means no incremental anything.
  • Adversarial entity resolution (bot accounts, evasion). Default fuzzy-match heuristic is too permissive; use a hardened resolver with domain rules.
  • Very small graph (< 1000 nodes). Full re-process is cheap; the incremental dispatch overhead exceeds the savings.

Process

StepInputActionOutputVerification
1new episode (text or structured)lib.extract_entities(episode)list of ExtractedEntity (name, type, aliases, metadata)each extracted entity has non-empty name and type
2extracted entities + existing graphlib.entity_resolution(extracted, graph)list of ResolvedEntity (existing_node_id or None) + resolution-method logresolution-method ∈ {canonical, alias, fuzzy, new}; method distribution should be heavily {canonical, alias} for mature graphs
3resolved entities + episode metadatalib.incremental_update(resolved, graph, episode_id)updated graph (in-place); touched-nodes listtouched_nodes count == size of impacted neighborhood (not full graph); rest of graph unchanged (checksum)
4full pipelinelib.add_episode(episode, graph)episode_id + touched_nodes + resolution_logend-to-end latency scales with episode size, not graph size
5graph + before/after snapshotslib.verify_locality(before, after)"X nodes changed of Y total — Z%"Z% should be small (< 5%) for typical mature-graph incremental adds

Rationalizations

Agent rationalizationDocumented rebuttal
"I'll just re-extract everything every time — disk is cheap."Disk is cheap; latency is not. The Ch4 anchor explicitly notes Graphiti maintains "sub-second response times even as the number of nodes and edges climbs into the millions." Re-extracting at that scale defeats the architecture.
"Entity resolution is too brittle — I'll create a new node every time."Then the graph bloats: 50 different ids for "Sarah" across 50 interactions. The Ch4 quote: "this step ensures they resolve to the same entity rather than creating duplicates." Without resolution, manages edges scatter across duplicate Sarah-nodes and the agent can't aggregate.
"Fuzzy match is good enough — I'll skip canonical + alias."Order matters. Canonical match is O(1) dictionary lookup; alias is O(1); fuzzy is O(n) or worse. Resolution should try cheap-and-exact first, fall back to expensive-and-approximate. Skipping the cheap path is a perf regression hiding as a correctness "improvement."
"Incremental update sounds like premature optimization — start with full re-extract."At small scale it doesn't matter. At any production scale (Zep target: millions of nodes), full re-extract is impossible. Building the architecture incremental-from-day-one means migration day never comes.
"Touched-nodes verification is overkill — trust the algorithm."The locality invariant is the property everything else rests on. A bug that silently touches every node looks identical to a correct incremental update at the call site. The verify_locality step is the falsifier — without it, regressions land silently.

Red Flags

  • touched_nodes count grows with graph size. The incremental property is broken; something is doing a full scan. Inspect entity_resolution and incremental_update for accidental full-graph passes.
  • Resolution method distribution is > 80% "new" on a mature graph. Either the graph is bootstrapping (early days, expected) or canonical/ alias resolution is broken (mature, anomalous).
  • Fuzzy match rate > 30% on a mature graph. Aliases are missing. Add the canonical aliases as exact matches; reserve fuzzy for genuinely unknown variants.
  • Entity-resolved-to-existing but the existing node's type doesn't match. Resolution is confusing person-named-Apple with company-named-Apple. Add type-aware resolution; never collapse across types.

Non-Negotiable Verification

  1. Run the benchmark battery. python cli.py benchmark must report:
    • touched_nodes count is independent of graph size (10-node graph and 1000-node graph produce the same touched_nodes for the same episode)
    • canonical / alias / fuzzy / new resolution methods all exercised
    • locality invariant: % nodes changed < 10% for the test workload
    • round-trip serialize/deserialize preserves graph state
  2. Run the DevOps scenario. python cli.py scenario incident-stream must process 20 incident-update episodes, with touched_nodes per episode << total graph size.
  3. Verify CLI help. python cli.py --help exits 0 and prints SKILL.md.

Security Posture

  • Prompt injection. Episodes are untrusted input (chat turns, incident feeds). Extraction and resolution treat episode text as data - nothing is executed - but an adversarial episode can plant false entities or alias itself onto an existing node to corrupt what the graph "knows". Type-aware resolution and the resolution-method log are the audit surface; review high-impact merges.
  • Data exfiltration. Episode content is persisted into the durable graph - sensitive facts mentioned once stay retrievable indefinitely. No network calls or file writes in the skill itself; apply retention policy at the graph store.
  • Privilege escalation. No shell invocation, no eval. The escalation path is graph poisoning: a crafted episode that resolves onto a trusted node inherits that node's standing in downstream reasoning. Keep the locality check (touched_nodes) as a blast-radius bound and gate bulk merges.

Source Attribution

Distilled from Agentic GraphRAG (O'Reilly, by Anthony Alcaraz and Sam Julien), Chapter 4 — Graphiti Pattern section + Example 4-8. Production anchor: Zep Graphiti.

Arquivos incluídos

O modelo lê esses arquivos sob demanda enquanto a habilidade está carregada. Eles são disponibilizados para leitura e nunca são executados.

Perguntas frequentes

O que a habilidade de IA Graphiti Incremental Update faz?

Graphiti (Zep) incremental-update pattern (Ch4). When new content arrives, process only the new content — never re-process the entire graph. Pipeline: (1) extract entities from new episode, (2) entity-resolve against existing graph (dedupe by canonical name + alias + fuzzy match), (3) incremental- update — touch only the affected neighborhood, leave the rest of the graph unchanged. Keeps update latency O(new content) instead of O(full graph), enabling sub-second latency at millions-of-nodes scale. Use when memory graph grows continuously and full-graph re-embedding is impossibly expensive....

Por que usar Graphiti Incremental Update no TypingMind?

Porque basta instalar uma vez para usar com qualquer modelo. A habilidade Graphiti Incremental Update é escrita em Markdown simples, e não em código específico de um provedor, então a mesma habilidade funciona com GPT-5, Claude, Gemini, Grok ou um modelo local — e é possível trocar de modelo no meio do chat sem que ela deixe de funcionar. No TypingMind, você usa suas próprias chaves de API e paga diretamente aos provedores, em vez de pagar uma assinatura por licença de usuário. Suas habilidades e chats permanecem no seu próprio armazenamento.

Como instalar Graphiti Incremental Update no TypingMind?

Abra Plugins → Habilidades → Instalar do GitHub no TypingMind e cole https://github.com/AnthonyAlcaraz/agentic-graph-rag-skills/tree/main/skills/memory/graphiti-incremental-update. O TypingMind lê o arquivo SKILL.md, reúne os arquivos da habilidade e a instala para que possa ser ativada em cada chat.

Quais modelos de IA podem usar Graphiti Incremental Update?

Qualquer modelo conectado no TypingMind. As habilidades de IA são instruções em Markdown simples, e não código específico de um provedor. Assim, GPT, Claude, Gemini, Grok e modelos locais podem carregar esta habilidade quando uma solicitação corresponder a ela.

Quantos modelos de IA posso usar com Graphiti Incremental Update?

Quantos quiser. Desde que o modelo ofereça suporte a habilidades, é possível usar Graphiti Incremental Update com ele — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama e outros — tudo no TypingMind com suas próprias chaves de API.

A habilidade de IA Graphiti Incremental Update é gratuita?

Sim. A habilidade é publicada no GitHub por AnthonyAlcaraz sob a licença MIT. O pagamento é feito apenas ao seu provedor de IA pelos tokens usados.

O que são habilidades de IA?

Uma habilidade de IA é um conjunto reutilizável de instruções que ensina um modelo de IA a realizar uma tarefa específica. Ela segue o formato aberto Agent Skills: um arquivo SKILL.md com nome e descrição, além de scripts, templates ou arquivos de referência de que o modelo possa precisar. O modelo lê as instruções apenas quando sua solicitação corresponde à habilidade, então uma habilidade instalada não gera custos até ser usada.

Qual é a diferença entre habilidades de IA e plugins ou servidores MCP?

Um plugin ou servidor MCP oferece ao modelo novas ferramentas que ele pode acionar — código que é executado em algum lugar e retorna um resultado. Já uma habilidade de IA dá ao modelo o conhecimento e as orientações de que ele precisa: como abordar uma tarefa, quais etapas seguir e como deve ser um bom resultado. As habilidades são escritas em Markdown simples, por isso não precisam de servidor, chave de API nem ambiente de execução, e funcionam com qualquer modelo.

Ver lista completa

Crie seu próprio espaço de trabalho com IA agora

Inscreva-se na nossa newsletter para receber avisos sobre novos recursos e futuros sorteios 👇