Skip to content

Part 4: Memory Systems

Overview

Memory is what separates stateless chat from stateful agents. Without memory, agents cannot learn, maintain context, or improve over time.

This section covers: - How memory works in agentic systems - Short-term vs long-term memory - Memory retrieval and compression - Episodic and procedural memory


Memory Types at a Glance

Type Duration Use Case Storage
Context Window This turn Current task LLM
Episodic Hours/days What happened Vector DB
Semantic Persistent Knowledge KB/Graph
Procedural Persistent How to do things Learned patterns

Why Memory Matters

  • Context: Keep track of ongoing work
  • Learning: Remember past successes and failures
  • Grounding: Anchor to specific past events
  • Efficiency: Don't recompute what's known

Chapter Map


Key Challenge

The Context Window Dilemma: - LLMs have finite context windows (100K-1M tokens) - Agents generate lots of tokens (actions, reflections, observations) - Must choose what to keep and what to forget


Next: Start with Memory Fundamentals


Last Updated: August 9, 2026