Anthropic has described a memory architecture for AI agents that separates immediate record-keeping from later consolidation. The company calls the offline review process “dreaming”: an agent revisits logs between interactions, identifies useful experience, corrects mistakes and reorganizes notes that can be read in future sessions.

The approach addresses a difficult timing problem. During a task, an agent does not yet know which observation will matter later. Saving everything creates a large, stale archive that consumes time and context to search. Saving too little can discard a lesson needed for a future decision. Anthropic's design allows quick capture during work and more deliberate evaluation afterward.

In the company's definition, agent memory is knowledge gained through interactions and assigned tasks that persists between sessions as readable context. It is distinct from changing model weights, learning within a single conversation or compacting an overflowing context window into a summary. A memory directory can contain facts, strategies, warnings and evidence about how those entries were verified.

Anthropic tested this pattern on Continual Learning Bench, where an agent answers database questions, receives the correct answer and can write material for later attempts. The company reported that more capable Claude models increasingly moved from collecting guesses to maintaining consolidated rules, marking confirmed facts and recording corrections after errors. Later systems completed a learning loop by retaining both a rule and the basis for believing it was true.

A separate experiment used Pokémon Red as a long-horizon environment. In one run about 10,000 steps into the game, Claude Sonnet 3.7 had accumulated 413 files across 225 folders and earned one badge. A newer model, described as Fable 5, kept nine files in two folders plus one top-level document and earned four badges. The comparison was based on individual runs, so it is illustrative rather than a controlled claim that file count alone caused the difference.

Anthropic's interpretation is that useful memory should emphasize durable strategy and hidden information instead of duplicating state already visible to the agent. In the game example, recording current location or money repeatedly could become obsolete and add retrieval work. Plans, tested tactics and warnings about recurring traps were more likely to remain useful.

The research frames memory management as an active part of agent performance, not simply a larger storage allowance. Persistent folders can preserve experience across otherwise fresh sessions, but they also create a maintenance problem: entries need validation, consolidation and removal when they no longer apply. Offline reflection offers one way to perform that maintenance without interrupting the task currently in progress.