Skip to slide
Chapter 3 · How Memory Is Built and Retrieved
22 / 40

CHAPTER 03 · How Memory Is Built and Retrieved · 7 / 7

Key takeaways

  • There are five mechanism families (context-resident compression, retrieval stores, reflective self-improvement, hierarchical virtual context, policy-learned management), each with different tradeoffs and no single winner.
  • Write by extraction, not raw logging: structured summaries for episodes, regenerated documents for preferences, staged facts for semantics.
  • Consolidation (ADD, UPDATE, NO-OP, with recency-based conflict resolution and an audit trail) is how a real system keeps memory coherent; AgentCore is the worked example.
  • Distilled memory trades a little factual recall for huge compression and far better preference inference than raw-history RAG.
  • Retrieval needs multi-factor scoring (similarity plus recency, context, and success) plus diversity filtering, not just similarity.
  • The filesystem plus agentic search, subagents, and compaction give a simple, practical memory and context system, as in the Claude Agent SDK.

Continue to Chapter 4 for how all of this fails.


← → arrow keys work too