Dreams
Difference Between Session and Persistent Agents
- Session-Based Agents: Confined entirely to an ephemeral context window. State, trajectory, and acquired context are wiped upon task completion or context limit exhaustion. The agent's identity is static, dictated strictly by the initial system prompt.
- Persistent Agents: Maintain continuous state across interactions via external storage mechanisms (e.g., local vector databases, full-text search cross-session recall, or structured workspaces). Identity is dynamic; agents incrementally update a unified model of the user, operating context, and system configuration (such as the SOUL.md or global context files utilized in OpenClaw and Hermes) over an extended timeline.
Problems Solved by Persistence
- Contextual Attrition: Eliminates the requirement for users to manually re-establish context, operational constraints, or historical preferences at the start of every interaction.
- Procedural Bottlenecks: Enables autonomous skill generation. Persistent frameworks allow agents to write, store, and execute machine-readable workflows (e.g., SKILL.md directories or compatible agent skills) derived from past problem-solving sequences.
- Asynchronous Execution: Detaches the agent from active user-facing windows, allowing for continuous background operations, cron jobs, and scheduled automations across integrated multi-channel environments.
Definition of "Memories"
In agentic architectures, memories are structural data representations mapped to storage and retrieval pipelines. Following the cognitive-science-inspired taxonomy formalized for language agents in the CoALA framework, they are typically categorized into:
- Short-term (Working) Memory: Immediate in-context learning bounded by the LLM's token limit.
- Declarative/Semantic Memory: Factual data structures regarding user constraints, tool specifications, and environmental states.
- Episodic Memory: Raw interaction trajectories, successful tool executions, and step-by-step session histories.
- Procedural Memory: Reusable, executable logic and specialized tool-calling sequences synthesized by the agent over time.
The Degradation Caused by Large, Unmanaged Memory Storage
- Retrieval Pollution: Continuous accumulation of raw episodic memory drastically lowers the signal-to-noise ratio. Retrieving data from massive, uncurated databases introduces irrelevant, redundant, or outdated context into the active prompt.
- Contextual Contradiction: Storing conflicting user preferences or deprecated tool syntaxes across a long timeline introduces logical collisions, degrading decision-making accuracy.
- Inference Overhead: Injecting excessively large retrieved context sets directly increases inference latency, token expenditure, and attention-mechanism dilution during execution.
Mechanism of "Dreaming"
Dreaming functions as an asynchronous, scheduled background process operating outside the active user-interaction loop. It parses raw session history and memory stores to extract high-signal patterns, abstract shared procedures, and correct recurring failure states. By synthesizing new, compact memory entries and pruning redundant raw data, it restructures the memory architecture. As a concrete example, in 2026 Anthropic introduced a research-preview "dreaming" feature for Claude Managed Agents: a scheduled process that reviews past agent sessions and memory stores, extracts patterns across multiple agents, and curates the memory bank so the active context window remains optimized for future sessions.
Research Terminology
In computational literature, the class of techniques marketed as "dreaming" is more formally described as:
- Offline Memory Consolidation
- Asynchronous Context Curation
- Cross-session Abstraction
- Complementary Learning Systems (CLS) — the neuroscience theory (McClelland, McNaughton & O'Reilly, 1995) of fast hippocampal encoding paired with slow neocortical integration, frequently cited as the design inspiration for two-timescale agent memory.
Relevant Literature
- Auto-Dreamer: Learning Offline Memory Consolidation for Language Agents (arXiv:2605.20616): Details the decoupling of fast per-session memory acquisition from slow cross-session consolidation. The paper presents a learned offline consolidator trained via Group Relative Policy Optimization (GRPO) that treats memory regions as read-only evidence, synthesizes compact replacement sets, and abstracts procedures across sessions. This reduces active memory bank size substantially while improving agent performance.
- Cognitive Architectures for Language Agents (CoALA) (arXiv:2309.02427): Proposes a conceptual framework organizing language agents around modular memory components (working, episodic, semantic, procedural), structured action spaces, and decision-making procedures, providing the memory taxonomy widely adopted in subsequent agent systems.
- Memory in the Age of AI Agents (arXiv:2512.13564): Surveys the fragmenting landscape of agent memory research, including consolidation pathways from episodic to semantic memory, the transition to in-weights implicit knowledge, and multi-agent memory governance.