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.
Related
More in LLM & Agentic
LLM Lifecycle
PreviewComplete lifecycle of large language models from pre-training through fine-tuning, RLHF, and deployment — with architecture diagrams and production considerations.
How LLMs Call Tools
PreviewHow LLMs use function calling and tool use — the mechanics behind tool-calling agents, from prompt engineering to structured output.
When to Fine-Tune: The Decision Framework
PreviewShould you fine-tune at all? A structured decision framework for prompt engineering vs RAG vs fine-tuning.
LoRA, QLoRA & PEFT Methods
PreviewHow LoRA works inside transformer layers, QLoRA for memory-efficient training, and the full PEFT method comparison with code examples.
Get full access to all 87+ sections with code examples, diagrams, and interactive animations.
Unlock Premium