Skip to content
    Book two in the Super AI Engineering Series

    Your agent forgets you exist.

    Brilliant for one conversation, amnesiac between them. Bigger context windows did not fix that and never will. This book is the complete map of agent memory: 30 techniques, 184 diagrams, not a single line of code.

    Paperback · Kindle · free on Kindle Unlimited · or sample Chapter 1 first, no signup

    Free on Kindle Unlimited · Amazon's standard returns

    Agent Memory Made Simple: The Complete Visual Guide to Memory for AI Agents

    Memory is not the same thing as context

    Context is what the agent is looking at right now. Memory is what it can go and get. A longer prompt costs more on every single turn, dilutes the model's attention, and still vanishes the moment the session ends. No context window, at any size, gives an agent something to remember you by next week. That is a different problem, and it has thirty techniques of its own.

    30 techniques. One visual language.

    From the simplest chat buffer to memory systems serving millions of users. Every chapter opens with an analogy, shows the mechanism as a diagram, and closes with the tradeoffs.

    The conversation

    • Conversation buffers
    • Sliding windows
    • Summary memory
    • Summary buffers
    • Token budgets

    What the agent keeps

    • Vector memory
    • Entity records
    • Knowledge graphs
    • Episodic memory
    • Semantic facts
    • Procedural skills

    Memory architectures

    • Working memory and salience
    • Hierarchical tiers
    • Consolidation
    • Compaction
    • Self-reflection
    • Memory routing

    Time and forgetting

    • Recency weighting
    • Validity intervals
    • Decay and reinforcement
    • Deliberate deletion

    Recall and coordination

    • Hybrid retrieval and re-ranking
    • Cross-session identity
    • Shared memory across agents
    • Memory exposed as tools

    Systems and proof

    • The operating-system model
    • Build versus buy
    • Evaluating memory
    • Standard benchmarks
    • Production patterns

    Written for people shipping agents

    Agent builders

    You shipped something that worked in the demo and fell apart in week three. This explains why, and hands you the toolkit.

    Engineers choosing an architecture

    Deciding between building a memory layer and buying one. Make the call with the real tradeoffs in front of you.

    Technical PMs

    Understand what your team is building, and why the memory question keeps eating the roadmap, without reading twenty papers.

    Why this book vs. everything else

     This BookFramework docsPapersBlog posts
    No code required
    Covers 30 techniques
    Tradeoffs stated every chapterpartial
    Framework-agnosticpartial
    Illustrated throughoutpartialpartial

    Formats and updates

    • Kindle $9.99 · free with Kindle Unlimited
    • Paperback $24.99 · 6 x 9 in, 467 pages
    • Hardcover $39.99 · case laminate, 467 pages
    • 184 custom illustrations across 28 chapters
    • A companion open-source notebook for every technique

    From the creator of RAG Techniques and GenAI Agents

    Nir Diamant is an AI researcher and open-source educator. His GitHub repositories have earned over 80,000 stars and are used by more than 500,000 developers every month. This book distils his Agent Memory Techniques repository, thirty runnable notebooks, into a visual, code-free format. His DiamantAI Newsletter reaches 40,000+ subscribers and ranks in the top 0.1% on Substack.

    It follows RAG Made Simple, an Amazon bestseller in Generative AI. The two overlap in one place, retrieval, and this one assumes no knowledge of the first.

    Build agents that remember.

    Stop rebuilding the same memory layer badly. Get the intuition that transfers to any language, any stack, and whatever the field invents next.

    Get the book, $59Paperback · Kindle · free on Kindle Unlimited

    All formats on Amazon as Kindle, paperback and hardcover · free with Kindle Unlimited