Agent Memory
How agents remember, retrieve, and reason over context.
Agent memory is the layer that lets an AI agent persist and recall information across steps and sessions — short-term context, long-term stores, and the retrieval strategies that decide what gets back into the prompt.
Test memory in three stages: was the applicable record selected, did it reach the active prompt, and did the answer use it correctly? A 2023 study found that performance on question-answering and key-value retrieval tasks varied with the position of relevant information in the tested models' contexts (Liu et al., Lost in the Middle). That finding motivates a position-sensitive test, rather than a universal claim about today's models. Keep expected source IDs and answer criteria so a retrieval failure can be distinguished from a failure to use supplied evidence. Types of AI agent memory covers authority and access checks.
Most agent memory is a write-and-retrieve loop: the application saves facts, preferences and lessons, then loads the relevant ones into later prompts. The harder part is keeping them true. In the TEPA study, agents with append-only or last-write-wins memory scored 0.210 when facts fully reversed, below the same agents with no memory at all (0.309); revoking stale memories raised the score to 0.950 (arXiv, TEPA: Revoking Stale Memories for Conflict-Robust Language Agents). A second study warns that "a stale stored fact can override current authoritative evidence without warning" (arXiv, The Memory Trust Gap).
Products are converging on background consolidation, but cleanup is not the same as correction. Cognition's Devin keeps each user's memories as markdown files in a Git-backed Memory Drive, and its dreaming pass consolidates notes and removes memories that no session used (Cognition, Memory and dreaming). Mem0's Dream marks replaced facts as superseded, yet "superseded memories still appear in search by default" (Mem0, Dream). Deletion is a separate question: Anthropic says that when a Claude conversation expires or is deleted, related memory entries generated from it are not removed (Anthropic Help Center).
On the show, Oracle's Richmond Alake argues that memory deserves its own engineering discipline, with forgetting designed in from the start: "you don't delete information in memory engineering, you forget" (episode 53). Types of AI agent memory, prompt vs context vs memory engineering and what is context poisoning go further, and agent memory defines the term.
Choose your depth
-
Explain it simply
New to the idea? Start with a plain definition and why forgetting matters.
-
Show me how it works
Want the mechanics? See the kinds of memory and where context ends and memory begins.
-
Help me use it
Building an agent? Practice keeping its context current, then compare memory tools.
11 episodes
- For AI Agent Fleets, the Model Is Rarely the Bottleneck | Theory Ventures' Andy Triedman
- Switching Models Shouldn't Mean Starting Over | Walrus Protocol's Kimberly Logan
- Why Context Alone Isn't Enough for Enterprise AI Agents | WisdomAI CPO Kapil Chhabra
- Slack Wants to Be the Context Harness for Code | CPO Jaime DeLanghe
- Time to Exploit is Negative: AI Broke the Patch Cycle | Dan Lorenc, Chainguard
- The AI Framework Era Is Over: Why Context Is the Moat | Jerry Liu of LlamaIndex
- Agent Memory: The Last Battleground in the AI Stack | Richmond Alake, Oracle
- Context Poisoning is Killing Your AI Agents: How to Stop it | Michel Tricot, Airbyte
- Architecting AI Agents: The Shift from Models to Systems | Aishwarya Srinivasan
- Mastering Multi-Agent Systems | MongoDB’s Mikiko Chandrasekhar
- Got Agents? Agentic Workflows & Architecture | Weaviate, Unstructured & CrewAI
Explainers on this topic
- How to Make Agent Memory Portable Across Apps
- Context Poisoning: Why Good Models Still Fail
- Prompt vs. Context vs. Memory Engineering
- The 4 Types of AI Agent Memory
Terms on this topic
Tool comparisons on this topic
Essay on this topic
Guests on this topic
Andy TriedmanKimberly LoganKapil ChhabraJaime DeLangheDan LorencJerry LiuRichmond AlakeMichel TricotAishwarya SrinivasanMikiko ChandrasekharBrian RaymondBob van LuijtJoão Moura