Agentic Memory
Memory in an agent is one system across timescales, like memory in a brain: where it lives, how it moves, and how it gets written.
the memory stack
5Fast, small and volatile at the top; slow, large and durable at the bottom. Memory moves between the stores along four flows.
Written down the stack, read back up, consolidated into the weights, and forgotten out of every store. Pick a flow to follow it; pick a store for its facts.
Encode. Down the stack. The forward pass writes the KV cache and the recurrent state on its own; the agent decides what goes into external memory.
Retrieve. Up the stack, into the context. Notes come back by retrieval (RAG), the weights by generating what the model knows, a cached prefix by reuse.
Consolidate. Into the weights. Experience is replayed as synthetic data and trained in, as sleep moves memories from hippocampus to neocortex. A larger or longer-context teacher can distil in too.my focus
Forget. Out of every store: truncation, eviction, overwrite, curation and decay, and in the weights interference or deliberate unlearning (SHRED).
how memory gets written
3Every write to memory, fast or slow, is set by three independent knobs.
objective
- next-token likelihood
- preference
- distillation(my focus)
- forgetting term(my focus)
data
- IID
- streaming(my focus)
update
- backprop
- backprop-free(my focus)
The knobs are independent; mine are set to streaming data, distillation and forgetting objectives, and backprop-free consolidation.
trade-offs
6| trait | 01Context windowContext window | 02KV cacheKV cache | 03Recurrent stateRecurrent state | 04External memoryExternal memory | 05Parametric memoryParametric memory |
|---|---|---|---|---|---|
| capacity | low: fixed window | medium: grows per token | low: constant | high: unbounded | medium: fixed, large |
| write cost | low: append | low: a side effect | low: every step | medium: a decision | high: gradient descent |
| read cost | high: every token | medium: dense or sparse | low: constant | medium: a retrieval step | low: free |
| persistence | low: one call | low: a session | medium: the stream | high: across sessions | high: permanent |
| editability | high: edit the text | medium: evict or select | low: opaque | high: edit the note | low: unlearning |
| interference | low: low | low: low | high: overwrite | low: low | high: catastrophic |
open problems
4- Generalise, not memoriseparametricWhat goes into the weights should transfer, not only be recalled.
- Learn from a stream without forgettingstreamingExperience arrives once, in order; the weights must keep what they had.
- A state store stronger than the context windowrecurrent stateFixed in size, carried across the whole stream, and worth reading.
- Consolidation without backpropconsolidateWrite what matters into memory as the stream passes, not in the next offline run.