Skip to content
BENIBIX Learn

Agent Memory vs Context Window

People often think an agent remembers all it ever saw in its context window. It does not. The context window is just what the model can see right now, and it is wiped when the task ends. Agent memory is kept outside the model and read back in later. If a fact was never saved, the next task will not know it.

AI🤖 AI Agents

Agent Memory

How an agent keeps facts from one task for the next one.

Agent memory is how an agent keeps facts beyond one task. Short-term memory is the context window. It holds the chat so far, and it is gone when the task ends. Long-term memory is kept outside the model, in files or a database, and read back in later. The agent or its harness picks what is worth saving and when to load it.

Example
Lucy's assistant saves a note that she likes short answers with sources. Next week, in a new chat, it reads the note and writes that way.
Why it matters
It lets an agent learn your project and your habits. Then it does not have to ask again each time.
Full entry
AI💬 LLMs

Context Window

The most text, in tokens, a model can read at one time.

The context window is the most text a language model can take in at one time. It is counted in tokens. It holds all of one request: the instructions, the chat so far, any pasted files and the answer being written. Sizes run from a few thousand tokens in small models to over a million in some large ones. Text that does not fit is cut off. The model cannot see it.

Example
Jack pastes a 900-page book into a chat with a 200,000-token context window. The book is about 450,000 tokens, so the tool only takes in part of it.
Why it matters
It sets how long a chat can run. It also sets how big a file you can hand over before the model starts to lose things.
Full entry

In one line

Agent Memory
How an agent keeps facts from one task for the next one.
Context Window
The most text, in tokens, a model can read at one time.