Skip to main content
The repository includes a deterministic incident at examples/langgraph-memory. It uses a real StateGraph, MemorySaver, and InMemoryStore without a live model or paid API. The user first says they live in San Francisco, then corrects the city to Oakland. The captured failing turn intentionally retrieves the superseded San Francisco memory. Its checkpoint records the graph state immediately before retrieval. The executor forks that checkpoint twice:
  1. The baseline reruns retrieval and generation with the original policy and must reproduce San Francisco.
  2. The treatment applies the proposed memory-status intervention, reruns the same nodes, and selects Oakland.
  3. Engram compares the observed stages and reports selection as the earliest divergence.

Run it

From the Engram repository:
In another terminal:
Open http://localhost:3100/?mode=incidents, select the failing city answer, enter Oakland as expected evidence, and run the proposed repair. The Replay step should say Real agent replay, show selection as the earliest divergence, and pass the answer check. Run the complete executor contract without Studio:

Isolation boundary

Each replay variant receives a fresh MemorySaver, InMemoryStore, and thread ID. The executor supports only blocked side effects. A production integration must create equivalent replay-safe copies of its checkpointer and Store and must prevent arbitrary graph nodes from writing to production systems. The graph answer is deterministic so normal tests remain free of paid calls. Replace that node with the application’s real model boundary only after model identity, sampling, tools, and side effects are captured or controlled well enough for the replay claim you want to make.

Read the adapter guide

Configure selection, update classification, custom content mapping, and explicit context loading.