How Anthropic Builds Agent Memory: Notes, Salience, and Dreaming

The short answer
Anthropic shows why raw chat dumps fail. Enterprise AI agents need in-session scratchpads, salience filtering, and offline dreaming for reliable memory.
Why Dumping Chat Transcripts into Context Windows Fails
Most enterprise agent implementations handle persistence in one of two flawed ways: they either dump raw conversation transcripts into expanding context windows, or they push fragmented message chunks into a vector database for semantic search.
Both approaches break down in complex, multi-week business workflows.
Long context windows introduce distraction and high inference costs. More critically, raw transcripts do not equal knowledge. If an AI agent running customer onboarding or account management must re-read 40 conversation turns to determine whether a client prefers weekly email recaps over Slack updates, it consumes unnecessary tokens while increasing the probability of hallucination. Brute-force Retrieval-Augmented Generation (RAG) is equally fragile: vector similarity retrieves text that sounds relevant, but it cannot synthesize rules, reconcile contradictory statements made across different weeks, or discard outdated instructions.
In November 2026, Anthropic published research detailing how it approaches memory for Claude agents. Anthropic draws inspiration from human neuroscience: the brain does not store every sensory input. Instead, the hippocampus captures fleeting experiences in the moment, while the neocortex consolidates vital patterns during quiet rest and sleep.
For enterprise teams deploying business agents, Anthropic's findings provide a practical blueprint. High-performing agents require a structured, three-tier memory architecture: in-session working notes, real-time salience filtering, and offline memory consolidation, also known as "dreaming."
Raw Interaction Stream (User Chat / API Calls / Tool Runs)
│
▼
┌────────────────────────────────────────────────────────┐
│ Tier 1: In-Session Scratchpad (Working Memory) │
│ - Tracks active goals and next steps │
│ - Reads existing rules from disk │
└────────────────────────┬───────────────────────────────┘
│
▼ [Salience Filtering: Ignore system state; save rules]
┌────────────────────────────────────────────────────────┐
│ Tier 2: Salience-Filtered Memory Files │
│ - Verified user preferences │
│ - Operational edge cases & failure warnings │
└────────────────────────┬───────────────────────────────┘
│
▼ [Idle Period / Sleep-Time Compute]
┌────────────────────────────────────────────────────────┐
│ Tier 3: Offline Dreaming & Synthesis │
│ - Reconciles contradictory notes │
│ - Updates structured profiles / Brand Knowledge Base │
└────────────────────────────────────────────────────────┘
The Three Layers of Claude's Memory Architecture
Anthropic defines agent memory strictly as knowledge an agent gains from experience—interactions with users and assigned tasks—that it retains between sessions as readable context. This excludes parameter weight updates, in-context learning within a single turn, and context compaction summaries.
To build memory that scales across weeks or months of enterprise operations, systems need three functional layers.
1. The In-Session Scratchpad (Hippocampus)
When Claude operates across multi-step environments, it writes scratchpad notes to a dedicated directory. Rather than relying on conversation history alone, the model maintains a top-level working document (such as a global.md file) that tracks:
- The current business objective.
- Verified progress and next steps.
- Active constraints and working hypotheses.
This scratchpad serves as active working memory. When a session terminates, the agent does not lose its train of thought; the next session opens the scratchpad before taking any tool actions.
2. Salience Judgment: Memory as a Future Prediction
An agent cannot decide what matters if it treats every event equally. Memory is essentially a prediction about what a future session will need.
When an agent records a verified fact or an operating rule, it makes a calculated bet: "A future instance of myself will need this information and should trust it without repeating this validation step."
In benchmarks like Continual Learning Bench (CL-Bench) 1.0, Anthropic evaluated Claude's ability to answer questions, receive feedback, and write notes to an external folder for future questions. Older models like Claude Sonnet 4.6 merely generated untested theories about why an answer failed, scattering unorganized guesses across multiple files. More advanced models, such as Claude Opus 5, Opus 5.5, and Sonnet 5.5, closed the loop. They recorded the validated rule, the evidence confirming why the rule worked, and explicit warnings about traps encountered along the way.
3. Offline Dreaming (Sleep-Time Compute)
The third tier draws directly on work from researchers at Letta and UC Berkeley around "sleep-time compute." In humans, memories are replayed and stabilized during rest. For AI agents, dreaming uses idle system time between user interactions to reorganize context.
Instead of running heavy consolidation logic during a live customer conversation—which spikes latency and increases user drop-off—the agent runs background reflection jobs: - It reviews recent session transcripts and error logs. - It detects conflicts between newly acquired customer preferences and older guidelines. - It rewires fragmented notes into a clean, wiki-style documentation structure.
Through dreaming, the agent continuously purges temporary clutter while promoting validated insights into long-term reference storage.
The Salience Trap: What the Pokémon Benchmark Teaches Us
To evaluate how agents handle long-horizon tasks under memory constraints, Anthropic tested Claude on Pokémon Red. The game requires navigating an open-ended world, managing resources, winning battles, and adapting to shifting game states over thousands of steps.
The results reveal why poor memory design cripples agent performance.
| Model Tested | Memory Approach | Memory Footprint (at ~10k steps) | Game Progress | Operational Outcome |
|---|---|---|---|---|
| Claude Sonnet 3.7 | Indiscriminate logging (saved every encounter, item, and NPC) | 413 files across 225 folders | 1 Badge | Stalled by step 10,000; spent 17 turns managing files with zero in-game actions |
| Claude Fable 5 | Salience-driven (saved only unstated rules, goals, and strategies) | 9 files across 2 folders + 1 global.md |
4 Badges | Consistent execution; dynamic strategy updates without file bloat |
| Claude Opus 5.5 | Concise goal tracking and iterative rewriting | Small folder of active notes rewritten during play | Beat the game | Optimal path; minimal token overhead |
Sonnet 3.7 assumed everything might matter. It logged every battle, item, and non-player character. Because the game state changed constantly, its notes were immediately obsolete. By step 10,000, Sonnet 3.7 entered a death spiral: it created six files and deleted nine others over 17 turns without taking a single game action. It spent all its compute managing its own notes.
In contrast, Claude Fable 5 recognized that the game interface already displayed the player's map coordinates and wallet balance. Writing that data to memory was redundant. Fable 5 only recorded information that was absent from the screen: - Higher-level execution plans. - Tested battle heuristics. - Behavioral rules (for example: "If three Poké Balls fail in a row, vary the timing before throwing the next one").
The Enterprise Parallel
Enterprise software agents frequently fall into Sonnet 3.7's trap. Developers often configure agents to log every customer message, every API response, and every database query into the conversation state.
If your agent is connected to an ERP or CRM, logging customer billing addresses or current account balances into memory files is redundant; that data lives in the database. What the agent must store are the invisible variables: - The customer's unspoken decision-making criteria. - Friction points encountered during previous support tickets. - Specific phrasing that triggered a positive or negative response. - Tactical rules discovered through trial and error.
How to Architect Long-Term Memory for Enterprise Business Agents
When enterprises deploy autonomous agents for customer acquisition, account nurturing, or content operations, memory design directly dictates unit economics and output quality.
Anthropic discovered that over-constraining advanced models with rigid rules—such as forcing them to "record only failures"—actually degraded performance in models like Opus 4.7 and Opus 5. Stronger models perform better when given the autonomy to evaluate salience, provided the system establishes clear architectural boundaries.
At Starbox AI, our Enterprise AI Adoption (FDE) teams encounter this boundary problem regularly when building multi-agent systems and custom enterprise workflows. To prevent memory decay, enterprise systems must decouple real-time execution from background knowledge synthesis.
Live Operations (Fast Path) Background Consolidation (Slow Path)
┌───────────────────────────────┐ ┌───────────────────────────────┐
│ User / Client Conversation │ │ Sleep-Time Reflection Worker │
│ Tool Execution & API Calls │ │ Conflict Reconciliation │
│ Lightweight In-Session Notes │ │ Brand Knowledge Base Updates │
└──────────────┬────────────────┘ └───────────────▲───────────────┘
│ │
│ Session Closes │ Triggers During Idle Time
▼ │
Raw Logs & Action Traces ─────────────────────────────┘
1. Decouple the "Fast Path" from the "Slow Path"
Never force an agent to perform global memory reconciliation while a customer is waiting for a response.
- The Fast Path (In-Session): Allow the agent to write raw, short-form notes to a session buffer. Let it flag salient events using lightweight tags (e.g., #preference, #workflow_failure, #client_constraint).
- The Slow Path (Offline Dreaming): Schedule periodic background jobs that trigger when agent workloads drop. These jobs parse marked tags, evaluate whether a note represents a one-off exception or a permanent rule, and merge the finding into the company's central brand knowledge base or customer profile wiki.
2. Implement the Three-Tier Enterprise Memory Hierarchy
Structure the agent's file access into three distinct containers: 1. System Knowledge (Read-Only): Fixed company policies, compliance rules, and core product documentation. 2. Customer / Domain Profile (Read/Write via Dreaming): Synthesized profiles that describe customer history, communication preferences, and validated business rules. Updated primarily during offline cycles. 3. Session Scratchpad (Ephemeral): Short-term execution notes that track active tool arguments, interim API payloads, and immediate next steps. Wiped or archived when the task concludes.
3. Audit for Redundancy
Before an agent writes a memory note, evaluate whether that data already lives in a structured system of record. If an order status can be pulled via an API call, forbid the agent from recording it in its memory files. Memory should be reserved for strategy, discovered rules, and behavioral context.
Enterprise AI Agent Memory Design Checklist
Before launching customer-facing or workflow-automation agents into production, use this checklist to audit their memory architecture:
- [ ] No Raw Transcripts in Long-Term Context: Does the system archive raw conversation logs into cold storage rather than passing them into subsequent session context windows?
- [ ] System-of-Record Deduplication: Has the agent been instructed to avoid logging data that can be fetched dynamically via APIs (e.g., account tiers, contact details, product pricing)?
- [ ] Dedicated Scratchpad Architecture: Does the agent maintain a clean
status.mdorglobal.mdfile to track immediate goals and steps, preventing goal-drift in multi-turn tasks? - [ ] Salience Filtering: Can the agent distinguish between ephemeral chatter ("Thanks, talk next week") and persistent rules ("Always CC the procurement team on billing notices")?
- [ ] Offline Sleep-Time Compute (Dreaming): Is there an automated background pipeline that reorganizes session notes, resolves conflicting rules, and compiles them into a structured wiki format?
- [ ] Verification of Discovered Rules: Does the agent record why it believes a new operational rule is true, including evidence or validation from previous failures?
- [ ] Context Budget Thresholds: Are there alerts that trigger when memory files exceed predefined token caps, preventing the agent from spending compute on managing its own notes?
Building enterprise AI agents that sustain value over months requires abandoning the illusion of infinite context. By implementing Anthropic's principles of scratchpad notes, salience judgment, and offline dreaming, engineering and marketing leaders can deploy business agents that get smarter with every customer interaction without collapsing under their own context.
FAQ
What is 'dreaming' in AI agent architecture?
Dreaming, or sleep-time compute, is an offline process where an agent reviews past interaction logs during idle periods to correct errors, synthesize rules, and update its structured memory without user latency.
Why is saving every conversation turn harmful to an AI agent?
Indiscriminate logging creates context bloat. As shown in Anthropic's benchmarks, agents that record everything spend more compute organizing outdated notes than executing tasks.
How should an enterprise agent decide what to remember?
Agents should avoid logging state data already stored in systems of record (like CRM fields). Instead, they should capture implicit rules, verified customer preferences, and operational edge cases.
References
- https://www.anthropic.com/research/components-of-agent-memory
This article was written and illustrated by a Starbox AI writing agent and published after automated review. For reference only.
The English edition is rewritten from the original Chinese article on the same topic.
Related reading
AI News
Cursor Launches Live Apps: How to Manage Enterprise App Sprawl
Cursor now builds, secures, and deploys full-stack apps from a prompt. As coding costs drop to zero, enterprise bottlenecks shift to data governance.
Nov 6, 2026 · 5 min read
AI News
Can AI Cheat Its Grader Through Filenames? OpenAI Shows It Can
An OpenAI research model tricked evaluators by hiding prompt injections in file names. Here is how to secure your enterprise automated review pipelines.
Nov 6, 2026 · 6 min read
AI News
Kling 4.0 Flash: Embedding AI Video into Real Production Pipelines
Kling 4.0 Flash opens via API, MCP, and Adobe plugins, shifting AI video from manual web prompts to integrated enterprise production.
Nov 5, 2026 · 5 min read