Agent memory persists context that the model window cannot hold
An LLM’s context window is ephemeral; it resets every session. Agent memory systems solve this by extracting entities, facts, and summaries from conversations, storing them externally, and retrieving relevant context on demand. The result is an agent that remembers what was discussed, decided, and corrected across sessions.
Three architectural approaches dominate. Vector stores (Mem0) embed conversation fragments and retrieve by semantic similarity. Knowledge graphs (Zep, Letta) model entities and relationships explicitly, enabling temporal and relational queries. File-based systems (AGENTS.md, autolearn plugins) write structured rules and corrections to the repo itself, which the agent reads at session start. Each trades precision for simplicity: vector stores are easy to set up but fuzzy; graphs are precise but heavy; files are deterministic but manual. See persistent memory lets corrections compound and memory can become a vector for persistent attacks.