Agents

Agent memory

Agent memory preserves useful state beyond the model’s immediate context.

read/writesearch/saveAgentShort term: this chatLong term: saved
Agent memory preserves useful state beyond the model’s immediate context. Values shown in the worked visual are illustrative unless the labels state otherwise.

How it works

Working memory supports the current run, while persistent memory can survive across sessions. Retrieval and deletion policies matter as much as storage.

A concrete example

Illustrative: store 40 task facts, retrieve the top 6 for the next step, and expire 12 after 30 days.

Do not confuse it with Context window

context is what the model sees now; memory is stored state that may be retrieved later.

Study the full lesson