What's the Difference Between RAG and Agent Memory?
RAG (Retrieval-Augmented Generation) retrieves relevant passages from a fixed document collection at query time and pastes them into the prompt. Agent memory stores what the agent has learned from interactions — corrections, preferences, decisions, behavioral patterns — and updates that knowledge over time. The distinction is not subtle: RAG is read-only retrieval from external corpora; agent memory is read-write learning with feedback loops, forgetting, and consolidation. RAG answers "find me a document about X"; agent memory answers "remember that we decided to use Vitest instead of Jest last week, and that you corrected me on the API endpoint last Tuesday."
The core difference
Property
Agent Memory







