Anthropic: The components of agent memory
Understanding Agent Memory
Agent memory is defined as knowledge Claude gains from experience—such as user interactions or assigned tasks—that is retained across sessions as accessible context. This excludes internal weight updates, standard in-context learning, or simple context compaction. Effective agent memory functions similarly to the human brain, utilizing a division of labor between real-time capture and offline consolidation.
The Role of Dreaming
"Dreaming" is a process where models use idle compute time between interactions to reorganize, reflect on, and refine their memory. Much like how the human hippocampus replays experiences during sleep to integrate them into the neocortex, Claude uses dreaming to:
- Correct errors: By comparing memory notes against original session transcripts, Claude can identify and fix hallucinations or outdated information.
- Build representations: Claude can construct "wikis"—linked collections of pages that map knowledge—to improve retrieval efficiency.
- Promote hierarchy: Dreaming allows the model to float critical information to the top of the memory hierarchy, ensuring it is injected into the context window at the start of new sessions.
- Refine focus: Through reflection, Claude can update its own instructions for memory creation, ensuring it prioritizes relevant data over redundant logs.
Memory as a Predictive Tool
Memory acts as a prediction of what future sessions will require. Anthropic’s evaluations using the Continual Learning Bench (CL-Bench) 1.0 demonstrate that frontier models like Claude Opus 5 can "close the loop" by recording failures, theorizing causes, and codifying successful rules for future use.
Models that successfully manage memory demonstrate:
- Salience judgment: More capable models, such as Fable 5, prioritize strategic insights (e.g., "If 3+ balls fail, vary timing") over redundant, transient state data (e.g., current location or money).
- Reduced overhead: By maintaining a concise, structured memory, agents avoid the performance degradation seen in models that store information indiscriminately.
Strategic Implications of Memory Design
Anthropic highlights several key findings regarding the implementation of agent memory:
- Autonomy vs. Steering: While general guidance is helpful, setting rigid rules for what to remember can actually hinder performance in frontier models. Allowing the model to judge salience is generally more effective.
- The Utility of Wikis: In complex tasks like legal brief generation, wikis significantly outperform raw file search by synthesizing information across documents. However, if a wiki becomes as large as the source material, it loses its utility as an abstraction.
- Compute Trade-offs: Memory maintenance requires compute. While dreaming is powerful, it must be balanced against the cost of continuous verification. Future systems will likely need to tune the cadence of dreaming based on memory access frequency and the volatility of the information being stored.
Sources
- OriginalThe components of agent memory