A long-running assistant needs to remember facts across many sessions.
Best approach?
- ARely on an ever-growing context window
- BUse external memory: store facts, retrieve the relevant ones
- CRe-send the entire history every turn
- DFine-tune the model every night on the day’s conversations so the facts become part of its weights
Answer: B
Use external memory: store facts, retrieve the relevant ones
Why
Context is finite and expensive. Persist facts in external memory and retrieve only what’s relevant - this is how agents “remember” at scale.
- MemoryYour agent rebuilds an expensive document-embedding index from scratch on every run, even when the documents haven’t changed.
- MemoryYour agent keeps its long-term memory in one global store.
- MemoryYour agent saved a user’s shipping address a year ago and now answers a delivery question with it - but the user moved months ago.
- MemoryLong-term memory filled up with one-off details («asked about invoice #412»), and retrieval now returns noise.
More on Way of the Agent
- Course programThe first three modules are free: start in the browser or the app, no card needed.
- Library: guides, skills and promptsReady prompt templates, grouped into collections.
- AI ChroniclesSourced stories from the history of AI.
- ConceptsPlain-language explainers of agent engineering.
- Learn AI agentsApps and courses for learning AI agents, compared honestly.
Real situations from building agents - with the answer and why.
Solve a new one every day on the Path