liveBook · Manning

Memory

Memory is a storage capability or mechanism for retaining information or computational state for later access or use.

How 26 Manning books explain it

Designing AI Systems

Model-managed memory is a capability in which an AI model selects, stores, and retrieves information from persistent memory outside its immediate context window.

How it is used
Preserves selected user facts across turns and sessions without relying on the full conversation history.
How deep it goes
Develops the memory data model, tool workflow, scoping, concurrency choices, and integration with context management.
Examples
Uses a healthcare assistant saving allergies and medications, and a personal assistant storing travel preferences and project details.
What you can do after
Apply model-managed memory via the platform's Session Service and registered memory tools in an assistant workflow.

Read how Designing AI Systems explains memory →

AI Governance

Agent memory is information retained by an agent for use in later interactions or tasks.

How it is used
Carries task context and durable information into later steps or runs so agents can resume work and adapt their strategy.
How deep it goes
Distinguishes memory types and gives retention, partitioning, and deletion guidance without specifying a memory-store implementation.
Examples
Illustrates memory with patient-monitoring history and health data distributed during appointment booking.
What you can do after
Evaluate memory designs for retention, patient isolation, and deletion across stored representations and downstream services.

Read how AI Governance explains memory →

Build a Multi-Agent System (from Scratch)

Memory is a collection of records from an agent's experiences that can influence its future behavior.

How it is used
Gives agents access to past task experiences when processing future tasks.
How deep it goes
Implements episodic memory and lifecycle integration, while leaving recall during a task sub-step out of scope.
Examples
Uses hailstone sequences to motivate reuse and recency, similarity, and reflection recipes to demonstrate memory designs.
What you can do after
Builds episodic memory from scratch and integrates recall and recording into an agent’s task lifecycle.

Read how Build a Multi-Agent System (from Scratch) explains memory →

AI Agents in Action, Second Edition

Agent memory is information retained from prior interactions or external sources that can augment an agent's context.

How it is used
Uses memory to carry relevant past interactions and experiences into an agent’s current context.
How deep it goes
Explains context, storage, state, and retrieval; gives practical guidance on pruning, search, and access boundaries.
Examples
Uses conversation threads, stored user preferences, prior attempts, and working notes to illustrate memory.
What you can do after
Operate/configure memory by separating session context from persisted facts, retrieving selectively, pruning, and applying access filters.

Read how AI Agents in Action, Second Edition explains memory →

Introduction to Generative AI, Second Edition

A memory system is a component that stores and retrieves information about users or prior interactions across conversations.

How it is used
Uses memory to maintain task context and personalize assistance across interactions.
How deep it goes
Explains memory selection and retrieval at a high level, without detailing implementation.
Examples
Illustrates selective retention of search results and assistants remembering project details and user preferences.
What you can do after
Evaluate memory’s benefits, recall limitations, corruption risks, and implications for user control and emotional well-being.

Read how Introduction to Generative AI, Second Edition explains memory →

AI Agents in Action

Agent memory is a pattern for retaining and retrieving information arising from an agent's interactions with users, itself, and other systems.

How it is used
Uses memory to retain agent interactions and retrieve relevant context for later prompts.
How deep it goes
Explains memory types, extraction, retrieval, semantic augmentation, and compression, with setup and testing steps for a memory store.
Examples
Uses personal facts and preferences in a Nexus memory store and exercises comparing conversational, semantic, episodic, and procedural stores.
What you can do after
Operate/configure a Nexus memory store, add personal facts, enable it in chat, and test retrieval.

Read how AI Agents in Action explains memory →

Context Engineering

Information retained across interactions or steps so an AI system can use it later.

How it is used
Provides continuity and personalization across stateless agent calls and sessions.
How deep it goes
Explains storage tiers, memory types, retrieval and write flows, and safeguards; leaves identity and conflict handling outside the minimal graph example.
Examples
Uses an evening-flight preference, coding-agent project knowledge, and Mem0/Qdrant and Cognee implementations.
What you can do after
Applies long-term memory via Mem0 and Qdrant or Cognee, with retrieval and persistence integrated into agent context.

Read how Context Engineering explains memory →

Building Reliable AI Systems

A memory mechanism stores and retrieves information so an AI system can retain context across task steps or interactions.

How it is used
Maintains context across interactions and multistep agent workflows.
How deep it goes
Explains session and persistent memory, then implements full-history and LLM-based summary patterns with their storage trade-offs.
Examples
Uses a travel assistant’s window-seat follow-up and Python message-list and summarization examples.
What you can do after
Apply it via LangChain to retain message histories and generate conversation summaries.

Read how Building Reliable AI Systems explains memory →

AI Agents and Applications

Memory is stored information that an agent or application can retain and use across steps or interactions.

How it is used
Maintains conversational context for follow-up questions and stateful agent workflows.
How deep it goes
Works through chat-history integration and checkpoint-based state, while deferring system-specific long-term memory implementation.
Examples
Uses Roman-history follow-ups and a travel assistant's weather conversation to demonstrate context resolution.
What you can do after
Apply it via LangChain chat history and LangGraph checkpoints to support stateful conversations.

Read how AI Agents and Applications explains memory →

Fast Python: High performance techniques for large datasets

How it is used
Connects memory hierarchy to data-processing speed and storage efficiency.
How deep it goes
Compares hierarchy capacities and latencies and reports matrix timings, while deferring detailed explanation of cache and matrix representation.
Examples
Uses NumPy row and column operations and illustrative desktop hierarchy measurements.
What you can do after
Evaluate memory-related performance using hierarchy comparisons and hardware-specific timing experiments.

Read how Fast Python: High performance techniques for large datasets explains memory →

Grokking AI Applications

Application memory is persisted conversational or task-related information that a software system can retrieve across interactions.

How it is used
Uses application-managed context to overcome the LLM’s statelessness across conversational turns.
How deep it goes
Explains statelessness, history capture, and prompt reinjection, then demonstrates a simple list-based implementation.
Examples
Demonstrates memory through Andrea’s name, disabled assistant memory, history snippets, and a Python chat loop.
What you can do after
Build it from scratch by storing conversation turns and injecting them into each subsequent model prompt.

Read how Grokking AI Applications explains memory →

Build an AI Agent (From Scratch)

Agent memory is a mechanism for retaining and retrieving information across an agent's reasoning steps or interactions.

How it is used
Adds memory to an agent loop for in-run context control, session continuity, and cross-session knowledge retention.
How deep it goes
Implements context reduction, sessions, and vector-backed long-term memory; limits memory conflict handling to add and skip.
Examples
Uses prior problem-solving attempts and user profile information to distinguish persistent records from changing facts.
What you can do after
Builds from scratch session continuity and long-term memory, including extraction, duplicate checks, storage, and retrieval.

Read how Build an AI Agent (From Scratch) explains memory →

Architecting for Autonomy

A storage system that preserves information for possible retrieval and reuse by an agent across interactions or tasks.

How it is used
Governs whether agent-created information persists or is reused across matters.
How deep it goes
Distinguishes current-matter notes from persistent memory and identifies lifecycle, access, lineage, reuse, and isolation controls.
Examples
Contrasts a current-matter note with persistent memory and considers stale memory after an amended supplier obligation.
What you can do after
Configure memory governance with purpose, reuse, retention, access, lineage, and matter-isolation controls.

Read how Architecting for Autonomy explains memory →

Modern C

Main memory is the linearly addressable storage that holds a running program's instructions and data.

How it is used
Frames C storage behavior within a concrete machine model.
How deep it goes
Defines linear addressing and illustrates storage realization through assembler, but defers broader architectural detail.
Examples
Uses x86_64 assembler instructions that adjust the stack and load or store values at register-relative memory locations.
What you can do after
Evaluate how a simple C function's variables and operations correspond to registers and memory locations.

Read how Modern C explains memory →

Designing AI Agents

An agent capability for retaining or retrieving information across or within tasks.

How it is used
Preserves and retrieves selected state and evidence across decision and handoff boundaries under explicit authority.
How deep it goes
Defines retention authority and summarizes four optional patterns, their responsibilities, retrieval choices, and evaluation measures.
Examples
Uses a delegated worker handoff and an authoritative team rule in a controlled rollout to illustrate retained context.
What you can do after
Evaluate memory designs against downstream decision quality, failure recurrence, latency, and token cost.

Read how Designing AI Agents explains memory →

AI for Everyday IT

Physical memory is the hardware memory available to a computer system for storing active data and programs.

How it is used
Analyzes Oracle database configurations to find instances using more than 75% of available physical memory.
How deep it goes
Explains unit conversion and usage formulas, then applies them in a query while stopping short of broader hardware diagnostics.
Examples
Uses a configuration query, a row containing 15297 MB, and a CTE that normalizes M and G values.
What you can do after
Diagnose memory pressure by querying configurations, converting units, calculating usage, and filtering instances above a utilization threshold.

Read how AI for Everyday IT explains memory →

Fabulous Adventures in Data Structures and Algorithms

Memory is computer storage capacity available to hold program data during execution.

How it is used
Evaluates representation choices by comparing memory consumption with execution time and search performance.
How deep it goes
Calculates asymptotic and approximate byte costs, then stops short of a complete runtime memory model.
Examples
Compares Life-cell arrays, packed bits, ENABLE word lists, sorted C# lists, and trie nodes.
What you can do after
Evaluate memory–time trade-offs and estimate representation costs for arrays, strings, sorted lists, and tries.

Read how Fabulous Adventures in Data Structures and Algorithms explains memory →

Rust in Action: Systems programming concepts and techniques

RAM is volatile computer memory that stores data and instructions available to a running processor.

How it is used
Uses RAM to hold instructions and data for a CHIP-8 CPU, then connects memory to operating-system interaction and thread costs.
How deep it goes
Models RAM as a fixed byte array and demonstrates instruction reads and function loading, while broader OS memory behavior is introduced through examples.
Examples
Shows a 4 KB CHIP-8 memory array, function bytes loaded at 0x100, and memory demand from threads.
What you can do after
Build it from scratch by adding a memory array to a CHIP-8 CPU and loading function opcodes into RAM.

Read how Rust in Action: Systems programming concepts and techniques explains memory →

Build AI-Enhanced Web Apps

A software component or mechanism that retains information from prior interactions so an AI application can use ongoing context.

How it is used
Builds context-aware AI applications by retaining conversation history across ongoing interactions.
How deep it goes
Explains retrieval, session identifiers, message conversion, memory construction, and invocation, while leaving storage integration application-managed.
Examples
Uses session histories, stored messages, and a follow-up question that asks what the user previously asked.
What you can do after
Build it from scratch by retrieving messages, constructing ChatMessageHistory and memory, and invoking a ConversationChain.

Read how Build AI-Enhanced Web Apps explains memory →

Machines that Think

The capacity to encode, retain, and retrieve information, including information carried between successive sequence positions.

How it is used
Distinguishes human remembering from artificial memory and examines the implications of conversational continuity.
How deep it goes
Explains reconstructive recall and fixed parameters, but does not detail how added memory systems are implemented.
Examples
Contrasts recall that modifies memory with prompts and corrections that influence a language model within a conversation.
What you can do after
Evaluate apparent memory by distinguishing reconstructed experience, fixed parameters, and conversational continuity.

Read how Machines that Think explains memory →

Domain-Specific Small Language Models

State retained over time for a chatbot or agent, including both recent conversational context and more durable stored information.

How it is used
Enriches prompts for RAG systems, chatbots, and agents with relevant context from prior interactions.
How deep it goes
Defines session and cross-session memory, outlines retrieval mechanisms, and demonstrates a Memoripy workflow.
Examples
Demonstrates Memoripy storage, recent-history loading, relevant-interaction retrieval, response generation, and memory updates.
What you can do after
Apply Memoripy to retrieve and update conversational memory in language-model applications.

Read how Domain-Specific Small Language Models explains memory →

Build Python Web Apps with Streamlit

Application memory is the transient information retained by a running application while it executes.

How it is used
Preserves conversation and application state across reruns or graph invocations so interactive applications can continue prior work.
How deep it goes
Explains state loss, in-memory checkpointing, and thread-based recall, while deferring durable database persistence to alternative checkpointers.
Examples
Uses a task list, a follow-up chatbot message, MemorySaver, and thread ID 1 as concrete examples.
What you can do after
Apply it via LangGraph by compiling a graph with MemorySaver and invoking it with a consistent thread ID.

Read how Build Python Web Apps with Streamlit explains memory →

ScyllaDB in Action

Memory is volatile storage available to a computing instance for holding active program and database state.

How it is used
Frames memory as one resource in ScyllaDB cluster planning alongside storage, CPU, networking, and cost.
How deep it goes
Identifies memory as a sizing concern but stops short of explaining capacity formulas, allocation, or workload-specific requirements.
What you can do after
Evaluate memory as part of a cluster baseline and validate the choice through production-level workload testing.

Read how ScyllaDB in Action explains memory →

WordPress Power Toolkit: Harness AI to build next-level websites

AI memory is an AI assistant capability that retains relevant user-provided information for retrieval across future interactions.

How it is used
Carries user details into future chats as a time-saving feature alongside custom instructions.
How deep it goes
Explains explicit and automatic saving, gives examples of remembered details, and shows how to review or change them.
Examples
Uses a book preference, personal-profile details, and prompts such as “Remember this” and “Show me what you remember.”
What you can do after
Operate memory by asking GPT to display remembered items, then add, update, or remove them.

Read how WordPress Power Toolkit: Harness AI to build next-level websites explains memory →

Building LLM Applications with DSPy

Stored information about prior interactions or user facts that a chatbot can use in later turns or sessions.

How it is used
Maintains interaction history so chatbots can resolve follow-ups and support conversations across queries or sessions.
How deep it goes
Shows history passed into a DSPy prediction and appended after a turn, without detailing long-term storage.
Examples
Uses subscription cancellation follow-ups, a history-provided answer about water freezing, and questions about favorite food and Spain’s capital.
What you can do after
Apply via DSPy’s History class to supply prior exchanges to a prediction and support follow-up questions.

Read how Building LLM Applications with DSPy explains memory →

Build Applications with Local AI Models on a Mac

Storage that holds data and instructions for use by a computer's processor.

How it is used
Maintains chatbot context across turns by supplying earlier conversation messages again.
How deep it goes
Explains apparent recall through resent history and calls for script-managed conversation loops, without showing implementation details here.
Examples
Uses interactive chat, follow-up questions, and a notebook analogy to illustrate how earlier turns are supplied again.
What you can do after
Build a back-and-forth chatbot loop that lets the model respond in the context of earlier turns.

Read how Build Applications with Local AI Models on a Mac explains memory →

Also covered in

What to know first

Related concepts

Questions about memory

What is memory?

Memory is a storage capability or mechanism for retaining information or computational state for later access or use.

Which Manning books explain memory?

Designing AI Systems, AI Governance, Build a Multi-Agent System (from Scratch), AI Agents in Action, Second Edition, Introduction to Generative AI, Second Edition, AI Agents in Action, Context Engineering, Building Reliable AI Systems and 18 more.

What should I know before learning memory?

Manning books that teach memory usually introduce language model, AI agent, vector database and context window first.

What is the difference between memory and collaboration?

Memory is a storage capability or mechanism for retaining information or computational state for later access or use. Collaboration is the coordinated work of multiple participants who contribute toward a shared goal or outcome.

What kinds of memory are there?

Kinds of memory include working memory and episodic memory.

What is memory a kind of?

Memory is a kind of cognitive function. A cognitive function is one of the agent capabilities represented in the framework as perception, memory, reasoning, action, reflection, collaboration, or governance.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.