Memory & stateMulti-agent
Memory tiers (page in, page out)
Like a computer's RAM and disk: a little in the context, the rest stored and fetched when needed.
What it is
Working memory is the context window; older events and facts move to storage (episodic logs, a fact store) and are paged back in by search when relevant. The agent manages its own memory through tools.
When to use it
- Agents that run for hours or days
- Conversations far longer than any window
When to skip it
- Short tasks: retrieval adds steps and can miss things
Why (the trade-off)
No window is big enough for an always-on or long-running agent. Tiers trade a little retrieval for unbounded history.
Where it sits
Memory layer, between the context window and long-term storage.
What it needs first
- Shared memory (plan and notes)it's the storage tier
What can be added to it
Nothing builds on it directly.
Effect of adding it
- cost —
- latency ↑
- reliability ↑
- safety —
Risks it handles
- The plan falls out of context · partial
- A context window fills up · partial
Learn first (AI Engineering)
depth 4+1 production note with numbers.