Early ReleaseO'Reilly Media

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.

Agent Memory by Benjamin Labaschin, an O'Reilly Early Release book featuring an adult horned grebe

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.

01

Read the working chapters now

Early Release chapters arrive before copyedit, so you can use the material months before the finished book ships.

02

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.

03

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

01

Decide what deserves to become memory

Use retention, compression, correction, and forgetting policies instead of storing everything.

Chapters 4–5

02

Write memory through an inspectable path

Design triggers, schemas, authority checks, persistence operations, and observable failure handling.

Chapter 6

03

Retrieve the right evidence at the right time

Form queries, rank candidates, load context, and evaluate whether recall actually helps.

Chapters 7–10

04

Maintain 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

01

The Work of Remembering

Live now

What memory means for an agent, how it differs from context, and why continuity changes everything.

02

What the Agent Can Read and Write

Live now

Where memory lives, the five working verbs, and giving the agent a memory API.

03

Choosing What Becomes Memory

Submitted

Which encountered information earns a durable representation and what future job that memory must perform.

Part II

Building and Managing Agent Memory

04

How Memory Gets Written

Writing

Write triggers, schemas, policy decisions, persistence operations, observability, and failure handling.

05

Where Memory Lives and Who Controls It

Client versus server, portability, inspectability, ownership, and the control model.

06

Finding the Right Memory

Retrieval, ranking, context loading, caching, and evaluating whether recall improves the result.

07

Keeping Memory Useful Over Time

Rollups, corrections, versioning, duplicate detection, and maintenance strategies.

08

More Than Memory: State and Resumability

Checkpoints, durable work, resume, replay, and human pause points.

Part III

Shared Memory, Risk, and Recovery

09

Shared Memory: Coordination, Boundaries, and Conflict

Ownership, leakage, multi-agent coordination, provenance, and conflict.

10

Dangerous Memory: Risk, Failure, and Recovery

Poisoning, detection, repair, rollback, and designing memory to fail safely.

Stay in the loop

Get updates on new posts, talks, and book progress

No spam — just updates when something new ships or the book hits a milestone.