VFlash: Fast, Accurate Visual Planning via Flash Primitive Decoding
u_Unrolled
D9: AI Agents & Tool Use · Agent Memory — What to Keep, Where, and How to Forget
Phase 5/Domain 9/Lesson 4

Agent Memory — What to Keep, Where, and How to Forget

20 min read·Advanced· Unrolled Pro
Agent Memory — What to Keep, Where, and How to Forget

You already know: the context window is a budget, and summarizing old turns trades detail for room (D7 Context engineering); embeddings find text by meaning (D8 Embeddings); databases give you keys, updates and transactions (D1 Databases); every step of an agent re-sends its history (Agent fundamentals).

Why this matters for Atlas. A model remembers nothing between calls. Everything an agent "knows" about this task, this user or past sessions is something your code chose to put back into the context. Memory is the system that decides what to keep, where to keep it, when to bring it back, and when to throw it away. Done badly, the agent forgets what matters, recalls things that are no longer true, leaks one user's details into another's session, or keeps data it was asked to delete. This lesson builds a working memory system and measures each design choice.


1. A memory hierarchy, like the one in your computer

The question. Where should an agent keep what it knows?

Start from nothing. The same idea as CPU caches and RAM (D1 Operating systems): a small fast tier close to the "processor", backed by large slow tiers.

That's the preview. The full lesson, with its code and exercises, is part of Unrolled Pro.
Staff AI & Pro Tier Lesson

Unlock "Agent Memory — What to Keep, Where, and How to Forget"

The foundations are free forever. Unrolled Pro unlocks the complete lesson, production architectures, and 55 battle-tested ML system design case studies.

Everything included with Pro:
All 234+ Deep-Dive Lessons across transformer internals, inference, RAG & agents
55 Staff-Level ML & System Design Case Studies with mathematical capacity estimates
AI Engineer Sheet & Exercises with worked solutions, self-checks, and code
100 Landmark Research Papers guided walkthroughs & progress tracking
14-Day Money-Back Guarantee — 100% full refund if you aren't satisfied
View Plans & Unlock All Lessons

From ₹167/mo (~$2/mo) · Cancel anytime · Instant activation

100% Risk-Free: 14-day no-questions-asked money-back guarantee
Build Atlas · Part 8 of 9: Let it actUse this lesson in the project: Give Atlas tools, memory and a loop, then put a gateway between the model and the tools so that a fooled model still can't do damage.