What is short-term memory?

Definition

Short-term memory tracks active details such as the current goal, recent tool results, intermediate calculations, open questions, and progress through a plan. It helps the agent connect one step to the next without treating each action as a fresh task.

This memory is usually scoped and temporary. Systems should define when it expires, what can be promoted to longer-lived storage, and how sensitive session data is isolated from unrelated users or tasks.

ELI5

Short-term memory is the agent's scratchpad for the job it is doing now. It holds details that matter for the next few steps but may not need to be kept forever.

For example, while fixing a test, an agent might keep the error message, the file it changed, and the next command it plans to run. Those notes can be discarded after the task is complete.

Frequently asked questions

Is short-term memory the same as a context window?

Not exactly. A context window is what the model can process at once, while short-term memory may be stored outside it and retrieved as needed.

How long should short-term memory last?

It should last only as long as the task or session requires, under explicit retention and isolation rules.

Videos explaining short-term memory

  1. Kay Malcolm in a light attention-blue top on a black background beside the headline “AGENT MEMORY NEEDS DATA”.