Working Memory
What is working memory?
Working memory is the task-relevant information an AI agent actively maintains while solving a current problem. It functions like a temporary workspace containing the goal, important evidence, intermediate results, current plan, and unresolved questions.
Working memory helps the agent connect one step to the next without repeatedly rebuilding its understanding from the complete history.
What working memory can contain
For a research agent, working memory might track:
- the question being answered;
- accepted sources and extracted facts;
- claims that still need verification;
- current search strategy;
- draft conclusions;
- remaining tasks and stopping criteria.
After each tool result, the agent can update this workspace. Irrelevant raw output may be discarded or summarized, while important evidence remains available for later decisions.
Working memory versus context
[Context](/glossary/context/) is all information supplied to the model for one inference. Working memory is the organized task information the system actively maintains. It may be included in context, but context can also contain instructions, tool definitions, user messages, and retrieved documents that are not part of working memory.
Because the [context window](/glossary/context-window/) is limited, applications may store working memory outside the model and inject only the relevant fields at each step.
Working memory versus short-term memory
Working memory is defined by active use in the current task. Short-term memory is defined by temporary duration. A recent conversation summary may remain in short-term memory even when it is not part of the agent’s active workspace. In simple implementations, the same data structure may serve both roles.
Working memory also overlaps with agent state, but they are not identical. State may include operational fields such as retry counts, permissions, and workflow status. Working memory emphasizes information being used to understand and solve the problem.
Common problems
If working memory contains every observation, it becomes noisy and expensive to place into context. If it is summarized too aggressively, the agent may lose a critical constraint or source detail. Incorrect intermediate conclusions can also influence later steps.
Builders should use explicit fields, preserve source links for important claims, separate facts from hypotheses, and refresh information when the environment changes.
Why it matters
Good working memory keeps multi-step work coherent. It allows an agent to remember what it has tried, avoid duplicated actions, and focus on unresolved parts of the goal. The objective is a compact, accurate representation of current work—not a complete transcript. See [Memory in AI Agents](/memory-in-ai-agents/) for how working memory fits into the wider memory lifecycle.
Learn More
Memory in AI AgentsContinue with the full AIRundown guide →