Your Claude is going to dream tonight. Don't disturb it.
Do replicants dream? If they do, do they dream of electric sheep?
Screenshot from the movie "Blade Runner"
In 1968, when Philip K. Dick, the author of the original novel of the science - fiction movie "Blade Runner", typed out this abstract and forward - looking question on his typewriter, he probably didn't expect that more than half a century later, the tech giants in Silicon Valley would seriously provide an answer.
Yes, they can not only dream of electric sheep, but also visualize their dreams.
Yesterday, at the developer conference in San Francisco, Anthropic released a series of new features of the intelligent agent construction platform Managed Agents, including memory expansion, result output, multi - agent collaboration, and "Dreaming".
According to Anthropic itself, "Memory and dreaming together form a robust, self - improving agent memory system."
With all these talks about dreaming and memory, those who don't pay much attention to the AI field might be quite confused. When did these human - related words start to be so smoothly applied to AI?
As early as 2024 when OpenAI launched the o1 series, the term "a series of AI models designed to spend more time thinking before responding" was used so naturally that no one stopped to question why a program that statistically predicts the next token can be called "thinking".
Then came reasoning, memory, reflection, and imagining. One by one, things that only humans can do were brought to product press conferences.
Screenshot from the movie "Paprika" which explores dreams
"Thinking" can be explained as a metaphor, and "memory" can barely be regarded as an extension of technical jargon, but "dreaming" is really going too far. For thousands of years, literature, history, and philosophy have not fully understood it, yet AI companies can simply say: We have not only created machines that can think, but also machines that can dream.
What is dreaming? Is there no other engineering term that can accurately describe this?
AI also has to pay for dreaming
As early as the Claude Code leakage incident, some netizens found that Anthropic was preparing a feature called Auto Dreaming. At that time, everyone was wondering if AI, like humans, needs to sleep and get enough rest to become more focused and smarter?
However, as long as you understand the working principle of current AI Agents, you will find that the so - called "dreaming" is essentially just an automated offline log batch processing.
AI Agents are now good at completing some long - chain and complex tasks. For example, "Help me research the latest financial reports of these five competitors and organize them into a table." In this process, the Agent needs to jump between different web pages, read multiple documents, call different tools, and may even encounter anti - crawler mechanisms and have to retry.
After this long and complicated online task is completed, the Agent's background will leave a large number of operation logs.
Image generated by AI
Anthropic's "dreaming" function allows the Agent to re - sort out these historical records during idle time. It will look for patterns, such as finding that "every time this pop - up window appears, clicking the top - right corner can close it", so as to optimize the next operation path.
"Memory" is responsible for capturing what is learned during work, while "dreaming" refines these memories between conversations and shares them among different Agents.
To put it simply, this is a reinforcement learning and self - correction mechanism based on historical data.
Introduction to dreams: https://platform.claude.com/docs/en/managed-agents/dreams
The Dreams in the updated Managed Agents at this developer conference is a background processing task that we need to trigger manually. Claude can read the conversation history of up to 100 sessions at a time, and then generate a brand - new memory for us to review before deciding whether to use it.
The AutoDream that was quietly launched in Claude Code before will check in the background whether the Agent "should dream" every time a round of conversation with the Agent is over. By default, it runs once every 24 hours.
The Hermes Agent also has a similar dreaming function. The Hermes Agent is mainly designed to be self - learning and self - evolving. It not only supports automatically summarizing experience from past tasks and storing it in the memory file.
One of its functions called Curator can automatically organize these refined operation guides into Skills.
These Skills will be scored, duplicate ones will be merged, those that are not used for a long time will be automatically archived, and they even have a life cycle like active, stale, and archived. We can also pin important Skills to prevent the system from automatically deleting them.
In recent updates, OpenClaw has also added relevant mechanisms, such as persistent memory across conversations, scheduled task scheduling, isolated execution of sub - Agents, and a dreaming function directly called Dreaming.
OpenClaw's dreaming: https://docs.openclaw.ai/concepts/dreaming
In OpenClaw's dreaming mechanism, it summarizes the process of dreaming into three stages: light, REM, and deep. The first two are responsible for sorting, reflecting, and theme summarization, and the deep stage is when the content is really written into the long - term memory MEMORY.md.
The consolidation in the deep - sleep stage is determined by six weighted signals to decide whether to write into the long - term memory. These six signals include frequency, relevance, query diversity, timeliness, cross - day repetition, and concept richness.
Image generated by AI
Writing into the long - term memory will generate two files. One is a machine - oriented state file stored in memory/.dreams/; the other is a user - readable record written into DREAMS.md and reports generated by stage.
In addition, Dreaming can run automatically at a fixed time. By default, it runs a full process at 3 a.m. every day in the order of light → REM → deep.
In addition to the output of dreaming, OpenClaw also maintains a document called Dream Diary. The system will automatically generate a "dream diary" that records the memory - sorting process in a narrative way, emphasizing interpretability and reviewability rather than writing to the database in a black - box manner.
In neuroscience, there is a very classic understanding: the information humans acquire during the day first enters a more temporary storage system; during sleep, the brain replays, consolidates, and cleans up this information, keeping the important part and discarding the meaningless part.
Image generated by AI
We don't remember the color of every car on our way to work yesterday, but we remember how to get to the company.
These dreams do sound similar to human dreams. The only difference might be that when Claude is dreaming, it is still consuming our Tokens.
However, neither Anthropic nor OpenClaw chose to call it "session - based optimization" or "post - task tuning", which are more engineering - oriented names.
After all, when these complex names are simply changed to "dreaming", what we feel is no longer just a software function, but more like a "digital life with inner activities".
AI's memory is a trivial context
Since we've mentioned "dreaming", we have to talk about its prerequisite, memory.
In the past period, the hottest words in the AI circle have changed from prompt engineering to context engineering, Skill engineering, and Harness engineering. But no matter how it changes, context engineering is still the most valuable at present.
The system prompt, user input, short - term conversation, long - term memory, retrieved documents, output of tool and Skill calls, and the current user state, when stacked together, form the "context" that the agent is really using.
Making the Agent remember more and more useful content has been a difficult problem for a long time.
Manus published a technical blog last year specifically on how Manus optimizes context engineering. It mentioned defining the KV - Cache hit rate as one of the most important single indicators for AI Agents in the production environment. At the same time, at the tool - calling level, it gives priority to "masking" rather than "removing"; and uses the file system as the ultimate context.
To understand the so - called KV Cache (key - value cache), we can imagine the large model as an extremely obsessive - compulsive person who can only read one character at a time.
When it processes a sentence, it calculates a Key and a Value vector for each generated Token. To avoid recalculating from the beginning every time, it stores these (K, V) key - value pairs, which is the KV Cache.
KV Cache (key - value cache) is a low - level acceleration technology used by large models to "trade space for time" when generating text. The cache allows the model to predict the next word without recalculating all the previous words. Image generated by AI.
As long as the conversation continues, the KV Cache will keep saving. Generally, when facing a large model with a context of up to 128k, a 70B - parameter model running with a 128k context can consume 64 GB of video memory just for the KV Cache.
This is why the context window of most models is currently at most in the millions.
Yesterday, a new company called Subquadratic, which received a $29 million seed - round financing, released a new model called SubQ on X, which features a longer context.