# Working Memory

- **Canonical URL:** https://getaimath.com/dictionary/working-memory/
- **Topics:** [Context, Memory & Retrieval](https://getaimath.com/dictionary/category/context-memory-and-retrieval/)
- **Last updated:** 2026-11-25

## What is Working Memory?

**In one sentence:** Working memory is the information an AI is actively using to solve the current task.

It is like the scratch paper on your desk while doing math. For an agent, it includes the current goal, recent steps and results. It must stay focused and tidy to avoid confusion.

![Context Window vs. Memory: Your Desk vs. The Filing Cabinet — Simple cartoon comparing the AI Context Window (a small desk that can only fit a few pages right now) with External Memory & Search (a big filing cabinet where a librarian grabs just the 3 pages you need).](https://getaimath.com/diagrams/context-memory-and-retrieval.png)
*Napkin Diagram (Context, Memory & Retrieval): The context window is the small desk the AI can see right now; search grabs the right pages from the filing cabinet.*

## What is an example of Working Memory?

An agent tracking "step 3 of 5: test passed, now fix the login page" is using working memory.

## Why does Working Memory matter?

Good working memory helps agents stay on track during long tasks.

## Related Concepts

- [Long-Term Memory](https://getaimath.com/dictionary/long-term-memory/): Long-term memory in AI is information saved outside the model and brought back in later conversations.
- [Conversation History](https://getaimath.com/dictionary/conversation-history/): Conversation history is the record of past messages in a chat, sent back to the model so it knows what was said.
- [Short-Term Memory](https://getaimath.com/dictionary/short-term-memory/): In AI, short-term memory is the information a model can use right now, which is basically what is in its current context.
- [Sliding Window Attention](https://getaimath.com/dictionary/sliding-window-attention/): Sliding window attention lets each token look only at a fixed number of nearby earlier tokens, instead of all of them.
- [Long Context](https://getaimath.com/dictionary/long-context/): Long context means a model can handle very large inputs, often hundreds of thousands or millions of tokens.
- [Retrieval](https://getaimath.com/dictionary/retrieval/): Retrieval is finding and fetching the most relevant information from a large collection, such as documents, notes or web pages.

---
Source: The AI Math Dictionary (https://getaimath.com/dictionary/working-memory/)
