Memory Implementation & Patterns
Production-ready memory code, episodic vs semantic vs procedural memory, and system design patterns.
Last updated
Memory Implementation & Patterns
The cognitive types — episodic, semantic, procedural — and how to actually build them: short-term compaction strategies, a write–retrieve–update loop, and the production memory-system design that ties it together.
The previous section sorted memory by where it lives. This one sorts it by what it stores — the cognitive-science taxonomy that every serious framework (LangMem, Letta, Mem0, Zep) has converged on. Three types: episodic (“what happened”), semantic (“what’s true”), procedural (“how to act”). Getting an agent to remember isn’t one feature — it’s three different pipelines with different write triggers, retrieval methods, and update rules. Conflate them and you get the classic failure: a vector store full of raw transcripts that retrieves nothing useful.