Agent Memory
Building Stateful AI Agents That Remember, Adapt, and Work Across Time
Chapters 1 and 2 are live on the O’Reilly platform right now. New chapters land every four to six weeks.
No O’Reilly access? Start a free 10-day trial. Many companies and universities already provide access.

Available now
2 chapters live
Next in line
Chapter 3 submitted
Still shapeable
Reader feedback is open
Why read the rough version?
Early means useful now—and changeable.
This is a working technical book, not a polished preview. You get the architecture and examples early; I get the chance to make the final book answer the questions builders actually have.
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 submitted and Chapter 4 is being written. Subscribers hear when a new chapter lands.
What you will learn to build
A memory system you can inspect, operate, and trust.
Chapters 1–3
01Decide what deserves to become memory
Use retention, compression, correction, and forgetting policies instead of storing everything.
Chapters 4–5
02Write memory through an inspectable path
Design triggers, schemas, authority checks, persistence operations, and observable failure handling.
Chapter 6
03Retrieve the right evidence at the right time
Form queries, rank candidates, load context, and evaluate whether recall actually helps.
Chapters 7–10
04Maintain memory as it changes and grows
Handle corrections, rollups, duplicates, resumability, shared ownership, risk, and recovery.
The current map
Ten chapters across three parts.
Part I establishes the contracts. Part II turns them into systems. Part III handles coordination, risk, and recovery.
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
SubmittedWhich 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.