Early Release O'Reilly Media
Agent
Memory
Building Stateful AI Agents That Remember, Adapt, and Work Across Time
Chapters 1–3 are live on the O’Reilly platform right now. New chapters land every four to six weeks.
O’Reilly subscription required. Your company or university may provide access, or you can start a free 10-day trial.

Explore the chapters
Select a chapter to see its summary and availability.
Scroll horizontally to view all ten chapters.
Part I
Choosing What Becomes Memory
Which encountered information earns a durable representation and what future job that memory must perform.
Read it early.
Help make it better.
The architecture and examples are available while the manuscript is still taking shape. Your questions and experience can improve the final book.
Read the working chapters now
Early Release chapters arrive before copyedit, so you can use the material months before the finished book ships.
Your feedback can still change the book
This is the window where questions, thin spots, and examples from working engineers can still shape the final manuscript.
Follow the build as it happens
Chapter 3 is now live, and Chapter 4 is next. Subscribers hear when a new chapter lands.
Build memory you can inspect, maintain, and trust.
From choosing what to remember to recovering when memory fails.
Chapters 1–3
Decide what deserves to become memory
Use retention, compression, correction, and forgetting policies instead of storing everything.
Chapters 4–5
Write memory through an inspectable path
Design triggers, schemas, authority checks, persistence operations, and observable failure handling.
Chapter 6
Retrieve the right evidence at the right time
Form queries, rank candidates, load context, and evaluate whether recall actually helps.
Chapters 7–10
Maintain memory as it changes and grows
Handle corrections, rollups, duplicates, resumability, shared ownership, risk, and recovery.
Ten chapters.
Three parts.
Part I establishes the contracts. Part II turns them into systems. Part III handles coordination, risk, and recovery.
Read the complete table of contents
Part I
Agents, Memory, and the Act of Remembering
The Work of Remembering
Live nowWhat memory means for an agent, how it differs from context, and why continuity changes everything.
What the Agent Can Read and Write
Live nowWhere memory lives, the five working verbs, and giving the agent a memory API.
Choosing What Becomes Memory
Live nowWhich encountered information earns a durable representation and what future job that memory must perform.
Part II
Building and Managing Agent Memory
How Memory Gets Written
WritingWrite triggers, schemas, policy decisions, persistence operations, observability, and failure handling.
Where Memory Lives and Who Controls It
Client versus server, portability, inspectability, ownership, and the control model.
Finding the Right Memory
Retrieval, ranking, context loading, caching, and evaluating whether recall improves the result.
Keeping Memory Useful Over Time
Rollups, corrections, versioning, duplicate detection, and maintenance strategies.
More Than Memory: State and Resumability
Checkpoints, durable work, resume, replay, and human pause points.
Part III
Shared Memory, Risk, and Recovery
Shared Memory: Coordination, Boundaries, and Conflict
Ownership, leakage, multi-agent coordination, provenance, and conflict.
Dangerous Memory: Risk, Failure, and Recovery
Poisoning, detection, repair, rollback, and designing memory to fail safely.