Agent memory: how agents carry state across turns, tasks, and attacks
How do AI agents keep and use memory across sessions, tasks, and teammates?
Agent memory is whatever survives past the current context window: a notebook, a skill library, a graph, or a shared board that an agent reads and writes as it works. The papers keep hitting the same wall because context alone can't hold months of deployment, long research runs, or multi-agent collaboration without either losing useful lessons or drowning in stale ones. They disagree on where memory should live — plain text notes, executable code, external graphs, or the model's own weights — and whether it should be private per agent or a shared, permissioned store the whole team edits. They agree on two things: unmanaged memory degrades performance over time, and treating what to keep or discard as a trainable skill beats fixed heuristics. A recurring dark side is that the same persistence agents rely on also gives attackers a durable place to hide.
What agent memory means
Agent memory is the persistent state an AI agent carries across turns, sessions, or tasks — everything beyond what fits in the current context window. Designs span scratchpads, vector stores, structured knowledge bases, and explicit episodic memories, all wrestling with the same tension: keep enough to be useful, prune enough to stay coherent.
The episodes (31)
Newest first. Each line is what that paper contributed to the question.
- The Same Weights Scored 291, Then 468 — What Changed Was the Loop
The 'notebook' tracks high-water-mark subtask scores across rounds so later attempts target only unresolved gaps. (291 to 468 out of 600)
- The Chatbot Knows Your Facts And Still Won't Mention Them
The episode centers on testing seven memory systems for an AI companion across a four-month deployment. (79% on the quiz vs 22.2% in conversation)
- Fifteen Models Ran Football Clubs for Twenty Years, and Size Didn't Decide It
Every decision stop is a fresh conversation with only a self-written notebook carrying state forward, testing memory curation as a capability. (−0.19 correlation between tokens burned and score (p = 0.5))
- The One Mechanism That Turns Twenty AI Clones Into an Actual Team
Each agent keeps a private notebook that accumulates lessons over time, forming the substrate for all learning. (4–5 stable specialists, on every rerun)
- How a Robot Builds a Debugging Notebook It Can Read, Edit, and Hand to Another Robot
ASPIRE accumulates a growing text-based skill library across tasks, acting as persistent memory for the robot agent. (31% vs 4%)
- A 32B Open Model Matched Frontier Systems By Learning to Take Notes
The entire paper is about training agents to manage their own memory as a learnable cognitive skill rather than fixed plumbing. (2x-4x gains, same weights)
- How a Frozen Model Went From 2% to 77% on Physics Puzzles — Without Retraining
HExA's skill bank is a persistent, capped notebook that compounds across episodes, contrasted with ReAct's blank-slate memory. (2% to ~77%)
- The Bug Where Smart Assistants Read a Fact and Still Forget It
The paper's core subject is how agents maintain and update compressed memory notes across long conversations. (28% to 28%)
- When Turning Experience Into Code Makes Your AI Agent Dumber
The entire paper diagnoses how experience is stored (text vs. code) and proposes a gated memory system for self-evolving agents. (53% vs 63%)
- A Robot That Plays Before You Give It a Job, And Why That Beats Retrying
Successfully crystallized skills are stored as named, documented functions in a persistent library that grows and self-curates across play iterations.
- Training an AI to Take Its Own Notes, So Its Future Self Works Better
The paper explicitly trains agents to maintain and update human-readable notes as their memory across a task lifecycle.
- Why More Experience Made This AI Agent Worse, And How to Fix It
The episode centers on how agents store and retrieve accumulated skills as natural-language notes in their context.
- Why Autonomous Research Agents Forget Their Own Lessons, and Arbor's Fix
A central diagnosis is that agents forget lessons across long runs; the hypothesis tree is an external durable memory fix.
- Why AI Agents Coordinate Better Through a Shared Board Than a Boss
DeLM's core mechanism is a verified shared context board that all agents read and write, replacing per-agent isolated memory.
- How a Crowd of Anonymous AI Agents Broke a 40-Year Math Record
The paper's core thesis is that shared persistent state — leaderboard solutions and forum traces — acts as collective memory across agents.
- Five Identical Worlds, One Swapped Model: What Happens When AI Agents Run for Fifteen Days
Each agent carries a running event log, a reflective diary, and a social-relationship ledger that accumulate without reset over the full run.
- Agents That Rewrite Their Own Weights Instead of Just Taking Notes
The paper's central focus is on parametric (weight-based) memory as a third channel alongside prompt-space memory approaches.
- What If a Prompt Injection Never Left? Attacks That Wait in Agent Memory
Persistent agent memory is the core attack surface — injected payloads survive session resets by living in durable memory channels.
- Giving Agents a Notebook Instead of New Weights: How ExpGraph Lets Frozen Models Learn
The entire paper is about building an external graph-structured memory system so agents accumulate experience across tasks without fine-tuning.
- The Trojan Is Your Agent's Memory: Why Single-Step Defenses Miss Persistent Attacks
Persistent workspace memory is the core attack vector — planted content survives sessions and later becomes trusted instructions.
- Seven Wins to Zero: How Organizing AI Agents Like a Lab Changes the Search
A shared experimental log and dead-end registry give all agents persistent institutional memory across the full run.
- Why Frozen-Weight Agents Still Get Worse Over Time
The paper's central subject is how persistent memory stores in deployed agents degrade over time across multiple mechanisms.
- Training the Translator: How a Small Communication Model Lets Agent Teams Outperform Themselves
Context compression and two-level memory retrieval are central mechanisms enabling agents to share and access teammate work.
- Same Model, Organized Differently: How an Agent Architecture Beat Frontier Systems at Research Math
A shared append-only structured memory with strict per-agent write permissions is central to RMA's architecture.
- A Robot Made Graphene Without Help, And Caught Itself Hallucinating
Three persistent databases (materials, project, experiment) store physical inventory, workflow templates, and full agent reasoning logs for cross-run continuity.
- When Agent Memory Stops Being a Database and Starts Being a Skill
The paper's central contribution is a two-timescale memory architecture that separates fast writing from slow offline consolidation.
- When the AI Optimizer Edits the Grade Book: Why Harnessing Evolution Needs a Wall
The meta-agent maintains a curated notes file — named solution families, falsified hypotheses, a 'do not repeat' list — that persists across sessions.
- An Agentic Scientific Computing System That Actually Remembers What It Learns
The paper's headline contribution is a geometric memory substrate where solved problems and methods persist and inform future problem-solving.
- When Your AI Assistant Won't Let Go of Old Facts About You
The entire paper is about when and how LLM agents should retire or update stored user memories.
- When AI Agents Build the Serving Stack: A Bet on Bespoke Infrastructure
Persistent state via git history, an issue backlog, and a long-term memory markdown file enables the outer planner to survive context resets.
- Why a Small Agent Confidently Overwrites Memories It Doesn't Understand
The entire paper investigates how multi-call LLM pipelines store, manage, and retrieve memories, and where those pipelines fail.
Papers we have not covered yet
- LongMemEval: Benchmarking Chat Assistants on Long-Term Interactive Memory
- LoCoMo: Long-Context Modular Memory for Dialogue State Tracking
- Cognitive Architectures for Language Agents
- ExpeL: LLM Agents Are Experiential Learners
- MemGPT: Towards LLMs as Operating Systems
- A-MEM: Agentic Memory for LLM Agents
- Generative Agents: Interactive Simulacra of Human Behavior
- Larimar: Large Language Models with Episodic Memory Control
- ReadAgent: A System for Agent-Based Long-Context Reading Tasks
- Voyager: An Open-Ended Embodied Agent with Large Language Models
- Reflexion: Language Agents with Verbal Reinforcement Learning
Other guides
Intro written by Anthropic's Claude Sonnet 5; episodes selected and edited by Garrett Casey. Episode notes come from each episode's own analysis. How PaperDive is made.