Skip to Content
Agent Memory
book

Agent Memory

by Benjamin Labaschin
December 2027
300 pages
1h 32m
English
O'Reilly Media, Inc.

Overview

AI agents have quickly become the dominant way large language models interact with users, systems, and workflows, but with their limited context windows users are required to repeat lengthy prompts every session. And as agents move from prototypes into real workflows, the lack of persistent memory becomes one of the most expensive problems teams face. In Agent Memory, Ben Labaschin, head of AI and engineering at Workhelix, shows you what it actually takes to build agents that remember: what they should store, how to retrieve it reliably, and how to design the infrastructure that keeps memory accurate and useful over time.

You'll work through the real engineering challenges that come with treating memory as part of the production stack, such as defining what's worth remembering, keeping retrieval reliable as history grows, and integrating memory with the orchestration, checkpoints, and recovery logic your agents already depend on. The result is a blueprint for memory systems that can be monitored, governed, repaired, and trusted—not just in demos, but at scale.

  • Distinguish memory, context, state, and model knowledge in production systems
  • Decide what agents should write, retrieve, update, summarize, and forget
  • Build durable memory pipelines for long-running and resumable agent workflows
  • Evaluate retrieval quality, memory drift, and failure modes as history accumulates
  • Govern memory with retention policies, privacy controls, and observability
  • Detect, repair, and contain stale, incorrect, or harmful memory before it compounds
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

AI Agents and Applications

AI Agents and Applications

Roberto Infante
An Illustrated Guide to AI Agents

An Illustrated Guide to AI Agents

Maarten Grootendorst, Jay Alammar

Publisher Resources

ISBN: 0642572370473Errata Page