MemoryLake
Engineering & Developermemory diff for agent behavior analysis

Find Why Agent Behavior Changed by Diffing the Memory That Drove It

When agent behavior changes — better or worse — the cause is usually in the memory it retrieves. MemoryLake provides memory diff: compare any two memory states semantically and see exactly what facts, reflections, or skills changed.

Day 1“When agent behavior changes — better or worse — the cause is”“usually in the memory it retrieves.”✓ Got it, I will remember.Day 7 — new session“Same task again — can you keep the context?”× Sure — what was the context again?(forgot every detail you taught it)+ MEMORYLAKE LAYERMemory auto-loadedSemantic diff between two commitsPer-type diff filtersDiff between time windowsSESSION OUTPUT✓ Same prompt, on-brand answerNo re-briefing required.

Find Why Agent Behavior Changed by Diffing the Memory That Drove It

Get Started Free

Free forever · No credit card required

The problem: behavior changes are hard to attribute to memory shifts

Last month the agent was great. This month it's worse on the same kinds of questions. The model didn't change. The prompts didn't change. Something in memory shifted — but DIY memory systems have no way to see what.

How MemoryLake delivers memory diff

Semantic diff between two commits

Semantic diff between two commits

See what facts, reflections, and skills changed.

MEMORYPer-type diff filters

Per-type diff filters

Diff just facts, or just skills, or just reflections.

MEMORYDiff between time windows

Diff between time windows

"What changed in memory between March and April?"

Diff between memory branches

Diff between memory branches

Compare main vs experimental memory.

Get Started Free

Free forever · No credit card required

How it works for memory diff analysis

  1. Connect — Memory commits happen automatically.
  2. Structure — Each commit indexed for fast diff queries.
  3. Reuse — Run diffs between any two commits, branches, or times.

Before vs. after: agent behavior root cause analysis

DIY memoryMemoryLake
See what memory changedManual log reviewSemantic diff
Attribute behavior change to memoryGuessworkDirect evidence
Compare memory branchesCustomBuilt in
Audit memory evolutionLimitedFull provenance

Who this is for

Engineering teams running production agents where behavioral drift over time needs root cause analysis — and current memory infrastructure leaves them blind.

Runnable demoabout 1 minutes

Try this use case on your own account

Sallowfen Outfitters runs a support agent on project memory: one fact per policy, with metadata its code reads. Eval 1 asks six questions; after a week of 11 ordinary memory writes, eval 2 asks them again and three answers have changed. Diffing the time window in fact trace lists 7 changes and blames the changed return answer on a reworded note. The real cause, a draft rule set to active, was a metadata-only update, and those never appear in the trace. A diff of two full snapshots finds it among 11 changes. Diffing the receipts each answer saved (the facts it read, as it read them), then replaying the agent with one fact put back at a time, names exactly the cause for all three answers.

What you will see

  • The agent is plain code over fact list: every answer saves a receipt with the ids, text, metadata and updated_at of the facts it read
  • Time-window diff over fact trace: 7 changes, the cause named for 2 of 3 answers; the return answer is blamed on a reworded note, because the approval (status draft → active) was a metadata-only fact update with no trace entry
  • Snapshot diff (eval 1's full fact list vs today's): 11 changes, the cause among them for 3 of 3, but three suspects on the returns topic; copy edits and review stamps also show up under answers that did not change
  • Receipt diff + replay with one fact put back at a time: exactly the cause for 3 of 3, identical in 5 of 5 runs; receipt Q1 subcommand, a local web UI, no model calls

You need: a MemoryLake API key · the memorylake CLI · Python 3.9+

Run it

git clone https://github.com/memorylake-ai/memorylake-usecases.git
cd memorylake-usecases/behavior-diff-memory
export MEMORYLAKE_API_KEY=sk-…
python3 demo.py          # or: python3 web/server.py

Watch it run · real, unedited recordings

Related use cases

Frequently asked questions

Diff output format?

Structured JSON plus human-readable view.

Performance on large diffs?

Indexed for fast diffs across large commit ranges.

Self-host?

Yes — enterprise tier deploys in your VPC.