Working memory
Working memory is a limited, temporary store of information available for immediate access or manipulation during an active task or interaction.
AI Agents in Action, Second Edition
Short-term memory is the recent interaction history of the current session that remains directly in the model's context window.
- How it is used
- Keeps recent session interactions available for an agent’s immediate analysis and response.
- How deep it goes
- Defines the active buffer and explains context-window trade-offs, while deferring detailed memory architectures and context strategies.
- Examples
- Uses conversation turns and tool calls as the basic record, with Redis or PostgreSQL as deployment storage examples.
- What you can do after
- Operate/configure it by deciding which turns and tool outputs to retain, summarize, filter, or evict.
Read how AI Agents in Action, Second Edition explains working memory →
Building Reliable AI Systems
An agent memory that temporarily retains information, typically for the duration of a single session.
- How it is used
- Keeps session details available across turns so agents can handle follow-up requests without repeatedly asking for context.
- How deep it goes
- Explains temporary storage through scenarios and a minimal Python class, then compares full buffers with periodic summarization.
- Examples
- Uses flight-seat follow-ups, order tracking, device troubleshooting, and Python message-list implementations.
- What you can do after
- Build it from scratch with a session-scoped list, and choose buffering or summarization according to conversation length and recall needs.
Read how Building Reliable AI Systems explains working memory →
Natural Language Processing in Action, Second Edition
Short-term memory is a temporary store for information that remains available over a limited span of processing.
- How it is used
- Structures recurrent-network memory by separating recently processed tokens from information retained over longer spans.
- How deep it goes
- Explains hidden and cell states plus four LSTM gates and their update equations.
- Examples
- Uses LSTM gate equations, hidden-state vectors, cell-state vectors, and a gate-architecture figure.
- What you can do after
- Understand how LSTMs retain recent token information and regulate its update and output.
Read how Natural Language Processing in Action, Second Edition explains working memory →
The Art of AI Product Development
Agent memory held within the model's current prompt context and available for immediate processing.
- How it is used
- Supports continuity across conversations and multistep agent workflows by carrying relevant information in the current prompt.
- How deep it goes
- Explains stored content, prompt representations, and context trade-offs, but stops short of implementation details.
- Examples
- Uses chatbot continuity, trend research, roadmap synthesis, conversations, task outcomes, and retrieved data as examples.
- What you can do after
- Operate agent workflows by selecting useful context while managing latency, token count, and potential inaccuracies.
Read how The Art of AI Product Development explains working memory →
Domain-Specific Small Language Models
Conversation memory that keeps recent interactions within a session so they can be reused immediately.
- How it is used
- Supports conversational applications by reusing recent session context for the next prompt.
- How deep it goes
- Defines the session boundary and explains relevance-based retrieval, but stops short of exhaustive algorithm details.
- Examples
- Uses recent interactions, a memory manager flow, and a stored interaction record with embeddings and concepts.
- What you can do after
- Operate a session memory layer that preserves recent context and reuses it in response generation.
Read how Domain-Specific Small Language Models explains working memory →
Inside AI
Working memory is the component of an expert system that stores input data and intermediate facts produced during reasoning.
- How it is used
- Coordinates input facts and deductions between the knowledge base and inference engine in rule-based expert systems.
- How deep it goes
- Explains stored inputs, generated facts, rule cycles, and the no-trigger stopping condition without implementation details.
- Examples
- Uses gardening expertise and MYCIN’s bacterial-diagnosis inputs to illustrate expert-system reasoning.
- What you can do after
- Evaluate how facts move through a rule-based expert system during inference.
Introduction to Generative AI, Second Edition
Short-term memory is an agent capability for retaining relevant intermediate information from the current task or interaction.
- How it is used
- Supports agents in tracking relevant results across chained tool calls and previous interactions.
- How deep it goes
- Explains selective retention and application-dependent context choices, but stops short of implementation detail.
- Examples
- Uses chained searches, retained final results, discarded documents, and LangGraph state as examples.
- What you can do after
- Evaluate which intermediate results an agent should retain or discard during multistep tasks.
Read how Introduction to Generative AI, Second Edition explains working memory →
Related concepts
- memorykind of · Memory is a storage resource or mechanism that retains data or computational state for access during computation or later use.
- context windowequivalent to · A context window is the bounded sequence of tokens or other input information a model can access when processing or generating an output.
- statecontrasts with · State is information or a configuration describing the condition of a system, entity, or computation at a particular time and potentially influencing subsequent behavior or decisions.
- cognitive loadused by · Cognitive load is the mental effort required to process information, retain it in working memory, or perform a task.
- cognitionkind of · Cognition is the set of processes by which an agent acquires, processes, represents, and uses information.
- trajectoryuses · A trajectory is an ordered sequence of states, actions, events, or operations that records or describes progression through successive steps or over time.
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.






