← deck | labs
vcn #33 | hands-on hour starts at 9pm

Nine memory labs. Three tiers. Open a tab. Run the code.

Companion to the talk. Each lab is one static page with a copy-pasteable recipe you can run on your laptop. Tier 1 maps to the live talk demos. Tier 2 stacks them into the shape of a real production agent. Tier 3 covers the advanced moves: defense against memory poisoning, self-hosted graphs, and how to actually measure whether memory is working.

Tier 1 | live talk demos the four layers, one at a time
01 | ~90 seconds
easy procedural
Init a CLAUDE.md

Drop a markdown file in your project root. Start Claude Code. Watch it follow the rules. Then prove v2.1.59+ auto-memory survives a session restart with one question.

rules files
02 | ~3 min
easy persistent state
Mem0 in three lines

Drop-in memory layer for any agent. `pip install mem0ai`, set OPENAI_API_KEY, call add() and search(). Vector + graph + reranker behind one managed API.

drop-in
03 | ~4 min
easy runtime
Letta three tiers, live

Spin up an agent on the Letta free tier. Send one message. Then dump Core, Recall, and Archival so you can see which tier holds which fact. The runtime that gave agent memory structure.

core | recall | archival
04 | ~5 min
medium graph
Zep | what was true on Tuesday

Add a fact. Supersede it. Query the graph and watch valid_at / invalid_at write themselves. Graphiti is the canonical graph-beats-vector case when time matters.

temporal edges
Tier 2 | production patterns reliability, then the hybrid stack
05 | ~6 min
medium reliability
LangGraph checkpointer

Build a 3-node graph, kill it mid-run, resume from the last checkpoint. Then walk history and fork from an earlier snapshot. Not memory, but the layer everyone forgets they need.

resume | time-travel
06 | ~10 min
medium composition
Hybrid stack: LangGraph + Mem0 + rules.md

One agent, three layers doing different jobs. LangGraph owns the loop, Mem0 owns user facts, a markdown rules file owns behavior. Restart Python twice and watch all three persist correctly.

real production shape
Tier 3 | advanced defense, in-house graphs, measuring it
07 | ~7 min
hard defensive red-team
Memory poisoning — defensive

Implant a false memory, watch your agent take the bait, then ship provenance + allowlist + reconfirm-on-destructive defenses. Don't ship the attack. Ship the guards.

mnemonic sovereignty
08 | ~8 min
hard self-hosted
Graphiti standalone (no Zep Cloud)

Run the graph engine behind Zep in your own infra. Neo4j in Docker + graphiti-core. Same temporal semantics, full data sovereignty, the tradeoff is you operate Neo4j.

in-house
09 | take-home
hard eval
LOCOMO eval harness

The benchmark every memory blog now cites. We ship the adapter pattern + bench script + per-framework configs for Mem0, Letta, Zep. Run a real bake-off on Monday with a budget.

benchmark
what to bring

Laptop. Python 3.10+. An OpenAI key (every Tier 1/2/3 lab uses it for either an LLM call or fact extraction). A free Letta token from app.letta.com and a free Zep key from getzep.com take a minute each to mint. Docker for Lab 08.

order of operations

20 minutes: do 01 + 02. Full hour: all of Tier 1 in order, then 05 (LangGraph) and 06 (hybrid). Take 07/08/09 home; they reward longer sessions. Each tier builds the mental model the next tier needs.

All labs are single-file, no build, view-source friendly. Python recipes are ASCII-only so they run on Windows without UnicodeEncodeError. Lift any pattern you want.