
Agent memory gives AI systems a way to retain knowledge from interactions and tasks between sessions. Anthropic’s research explains that Claude can improve this memory through notes, reflection on transcripts, and organized representations, while evaluations show that selective memory can outperform indiscriminate recording.
What Is Agent Memory?
Anthropic defines agent memory as knowledge Claude gains from experience, including interactions with users and assigned tasks, then retains between sessions as context it can read later. The definition excludes changes to model weights, knowledge gained only within one conversation, and compaction, where summaries replace earlier conversation turns.
That boundary matters for agencies building websites with AI agents. Memory, as described by Anthropic, is a persistent store of task- or user-derived knowledge. It is separate from a model’s training parameters, the temporary context available during one conversation, and a summary created to fit within a new context window.
The Memory in the Age of AI Agents survey by Yuyang Hu and 46 other authors takes a broader view, classifying agent memory by form, function, and lifecycle. Its forms include token-level, parametric, and latent memory; its functions include factual, experiential, and working memory. The survey also covers memory benchmarks, open-source frameworks, automation, reinforcement learning, multimodal memory, multi-agent systems, and trustworthiness.
How Claude Writes Memory Notes
Claude can tag salient events while a session is active and write them to a memory store such as a folder of notes. A note may record a verified fact, a failure, an explanation of why an answer was wrong, a confirmed rule, or a warning about a recurring trap. The agent can later read those files and apply them to a new session.
Anthropic tested this approach with the database task in Continual Learning Bench 1.0, where Claude answered questions by looking up information in a database. After each answer, the grader supplied the correct solution, allowing Claude to write memory for later questions. Claude started each question in a fresh session, but it could retrieve files from a persistent memory directory.
Claude Sonnet 4.6 generated several untested guesses about wrong answers, while Claude Opus 4.7 consolidated its notes into one reference document and distinguished checked facts from unconfirmed ones. Claude Sonnet 5 marked answers confirmed after grading and wrote corrections for errors. Claude Opus 5 closed the loop by recording rules, the evidence for those rules, earlier answers, and traps discovered along the way. Claude Opus 5.5 and Claude Sonnet 5.5 also captured validated rules, although their performance without memory was slightly higher than Opus 5’s.
Why Selective Memory Performed Better
Anthropic’s Pokémon Red evaluation compared Claude Sonnet 3.7 with Claude Fable 5 after approximately 10,000 game steps. Sonnet 3.7 created 413 files across 225 folders and earned one badge. Fable 5 created nine files across two folders, added one top-level file named global.md, and earned four badges.
Sonnet 3.7 recorded each battle, item, character, and other changing game details. Since facts such as the player’s money and map position were already visible on the screen, the stored copies became outdated. Around step 10,000, Sonnet 3.7 created six files, deleted nine, and took no game action during the next 17 steps.
Fable 5 concentrated on information that had to be worked out, such as strategy, plans, and tested rules. Its global.md file held the current goal, a plan for the gyms, and rules for using memory. Separate folders held navigation plans and gameplay strategies. One note recorded a tested catch technique after seven consecutive Poké Balls failed to catch a Magikarp: vary the timing by adding wait presses between menu steps.
Claude Opus 5.5 used a similar compact structure, with notes tracking the current goal and next steps and rewritten during play, and beat the game.
How Dreaming Corrects and Organizes Memory
Dreaming lets Claude reflect on existing logs or transcripts during idle time between interactions. Anthropic says this process can correct mistakes, create notes, build new representations, and determine what should be loaded into future sessions.
During the Pokémon test, Claude incorrectly recorded that a PokéCenter near Mt. Moon was on the east side of the map. That error caused it to head away from the cave and fall onto the route it had already traveled. The agent then misdiagnosed the problem because its navigation tool did not show the one-way ledge drop.
When Anthropic ran dreaming over the memory folder, Claude checked the note against the original transcript, found the location error, and rewrote it. With the corrected note, Claude returned to the cave and reached Cerulean City. With the uncorrected note, it returned to the earlier route three times and ended in Pewter City without reaching Cerulean City.
Dreaming can also create a wiki, a collection of Claude-maintained pages that group knowledge about one subject and link it to related notes. Anthropic explored this representation using about 350,000 internal files, roughly 420 million tokens, from Stainless, a software company Anthropic acquired.
What the Research Says About Memory Selection
The biological work cited by Anthropic offers a parallel for selecting memories. A 2024 Science study by Wannan Yang and colleagues recorded large-scale neural activity in mice during maze trials. Sharp wave ripples after some trials replayed activity from those trials, and later ripples during non-rapid eye movement sleep replayed the sequences most frequently reactivated while the mice were awake. The study identified awake sharp wave ripple replay as a candidate mechanism for selecting experiences for long-term consolidation.
A separate review in Nature Reviews Neuroscience describes sleep-dependent systems consolidation, including the role of hippocampal and neocortical memory systems.
These studies do not test Claude, but they provide the research basis for Anthropic’s distinction between capturing experiences and selecting which ones receive further processing.
How Should Agencies Approach Memory Steering?
Anthropic’s results favor giving capable models a clear purpose while allowing them to decide what to retain. Simply telling Opus 4.7 and Opus 5 that a memory folder was available gave both a noticeable performance boost. Telling them to “record only failures” removed much of that benefit. For stronger models, Anthropic says allowing freedom to judge salience performed better than imposing fixed rules.
Steering helped older models more. Sonnet 4.6 often failed to read memory or test its theories. Prompting it to read memory files and explicitly test those theories nearly doubled its benchmark score. Sonnet 5 read its memory before answering nine out of ten times without a prompt, compared with less than half the time for Sonnet 4.6.
Consider which knowledge to persist, how to organize it, and how to check stale or incorrect notes against the underlying interaction.
What to Do Now
- List the client tasks that require knowledge from an earlier interaction.
- Separate current state from durable rules, strategies, and verified facts.
- Review stored notes against original transcripts for factual errors and outdated information.
- Test memory retrieval in a fresh session using the intended client workflow.
FAQ
What Is Agent Memory?
Anthropic defines agent memory as knowledge Claude gains from users and assigned tasks and retains between sessions as context it can read later.
How Does Dreaming Improve AI Agent Memory?
Dreaming lets Claude review logs or transcripts during idle time, correct mistakes, create notes, build new representations, and select memory for future sessions.
Why Is Selective Memory Better Than Recording Everything?
In Anthropic’s Pokémon test, Claude Fable 5 used nine files and earned four badges, while Claude Sonnet 3.7 used 413 files across 225 folders and earned one badge.
Sources
Want help with this in Myrtle Beach or Long Island? Talk to us.
NewSunSEO
Grow in Google and AI Search
AI-SEO, local search, paid ads and websites from one team, with offices on Long Island and in Myrtle Beach.
- AI-SEO
- Local AI-SEO
- AI Consulting
- PPC
- Web Design
- Web Development
- Long Island Office(631) 320-1700
- Myrtle Beach Office(843) 492-7131
Request a Free Proposal
Tell us about your business and where you want to grow.
We will reply by email to talk through your goals and what a proposal would include.
We use your details only to reply to you and send what you asked for. See our Privacy Policy.