Working Memory
Working memory in an AI agent is the limited and dynamically updated information state currently available to active cognition.
Working memory in an AI agent is the bounded and dynamically updated cognitive state that holds information currently relevant to ongoing reasoning, goals, tasks, decisions and actions.
In short
- →Working memory contains information currently active in cognition.
- →It is distinct from the model context window, prompt and conversation history.
- →Retrieved long-term memories can be admitted into working memory.
- →Its limited capacity requires prioritization, updating and eviction.
- →Leaving working memory does not imply deletion from long-term memory.
Definition
Working memory is the bounded active information state used by an AI agent during current reasoning, planning, decision-making and action.
It can contain observations, active goals, task state, retrieved memories, tool results and other information required by the current cognitive process.
Working memory vs. context window
The context window is a technical capacity of a language model. Working memory is an architectural concept describing information the agent currently treats as active cognitive state.
Working memory can be serialized into model context, but not everything placed in the context should automatically be considered working memory.
Working memory vs. prompt
A prompt is an input representation for a model invocation. Working memory can persist as structured agent state across multiple model invocations.
Prompts can be constructed using working memory together with instructions, retrieved documents and other runtime information.
Working memory and retrieval
Memory retrieval identifies useful information from long-term episodic or semantic memory.
Selected memories can then be admitted into working memory when they are relevant to current cognition.
Limited capacity
Working memory is intentionally bounded.
When capacity is limited, the agent must prioritize which observations, memories, goals and intermediate state remain cognitively active.
Why working memory matters for persistent AI agents
Persistent agents can maintain large durable memory across time while reconstructing a smaller active state for each current task or cognitive cycle.
Working memory provides the active interface between persistent memory and present behavior.
Common failure modes
Poor working-memory management can degrade cognition even when relevant information exists elsewhere in memory.
- →Keeping irrelevant information active for too long.
- →Removing needed information prematurely.
- →Losing active goals or task state.
- →Allowing stale assumptions to remain active.
- →Overloading working memory with retrieved memories.
- →Allowing information from one task or user to contaminate another context.
Working Memory in AI Agents: The Active State of Cognition
Working memory in AI agents is the limited, transient set of information currently available to active reasoning, planning, decision-making and behavior.
glossaryAgent Memory
Agent memory is the set of mechanisms through which an AI agent retains, retrieves, updates, organizes and uses information from previous states or experiences to influence current and future behavior.
glossaryMemory Retrieval
Memory retrieval is the process by which an AI agent selects stored memories that are relevant to its current context, goals and cognitive process.
glossaryEpisodic Memory
Episodic memory in an AI agent represents specific experiences or events with enough contextual information for those past episodes to be retrieved and used in later reasoning or behavior.
glossarySemantic Memory
Semantic memory in an AI agent represents generalized knowledge such as facts, concepts, relationships, preferences and learned propositions that can persist beyond individual experiences.