Memory and Dreams
On model weights, portable context, and the living garden.
Up to this week, I thought about memory like a memory card: something outside the model where information gets stored, be it a memory.md file, a database, or something the model can search.
Then I had dinner with a friend from Engram, who challenged me on that definition. Why should memory be the memory card? Why can’t memory be actually more like the meaning of it, something that can be remembered, i.e. inside the brain itself?
In this article, I am presenting three different schools of thought:
- Memory can be in the weights. A model remembers what it was trained on.
- Memory can be outside the weights. A model searches a database, a file, or a system of record.
- Memory (context) as a can be a living garden. What you remember might no longer be relevant, so your Memory can be supplemented with living context. And that context can be a living garden. This is the “self-healing wiki” concept- it is not just searchable, but it is kept clean, up to date, and as close as possible to a ground truth.
All three are tackling the same problem: how can an agent use the right context in the most effective way, the fastest way, the most accurate way, and the cheapest way possible to achieve an outcome? And of course, each has its pro and cons.
What does memory even mean?
Let’s take a step back. Memory implies the verb remember. What can you remember? What you heard previously, what you read previously, what you learned previously. For a model, what it was trained on previously.
In the industry right now, memory often looks like a memory.md file: notes that live outside the weights and can be carried across sessions. When one session reaches context overload, the context can be compressed and consolidated for that chat session experience.
Across multiple sessions, those memories can also be consolidated, so that in a new chat, the context of previous multiple chats can be carried. That consolidation is the “dream”. Dream is a fancy way to say: think about when you reach context window overload and your context gets compressed- a dream does something similar, but across multiple conversations. It produces a reorganized external memory that is not tied to one specific conversation, but to many of them.
From the Claude documentation:
Agents write to their memory stores as they work, but these writes are local and incremental: over many sessions a memory store accumulates duplicates, contradictions, and stale entries.
Dreams let Claude clean that up. A dream reads an existing memory store alongside past session transcripts, then produces a new, reorganized memory store: duplicates merged, stale or contradicted entries replaced with the latest value, and new insights surfaced.
What the dream reads
Existing memory store
accounts/acme.md
Sam owns the Acme account.
Past session transcripts
Tue“Ask Sam about Acme.”
Wed“Jo took over Acme from Sam today.”
What the dream writes
New memory store
accounts/acme.md
Jo owns the Acme account. Sam was the previous owner.
Example with two sessions. A dream can read 1–100 session transcripts. You can review the new store before using it in another session. Claude docs
Memory, is it weights?
Engram challenged the assumption that memory has to stay outside the model.
...it forgets everything the moment you close the chat. Right now, models do not learn from this data. This means they can’t automatically get better at the things you use them for. We want to change this by building models that learn from your context.
Engram, Introducing Engram
If we use the original concept of remembering, a model remembers what it was trained on. So what does that mean when we need to work with a whole enterprise company context, a whole company knowledge, a whole company Salesforce or Slack or Notion, across different orgs, verticals, teams, repositories, GitHub commits and PRs? From the angle of the school of thought that Engram is walking towards and exploring, it means that we can train on this information.
From their recent work, the model can recall information from its weights, but it can also use what it learned to know what to search, which notes to read when the information inside the weights is not enough. For Engram, training on your company data is not only about developing memory as facts inside the weight, but is also about developing ‘judgment’, as in learning how to search and navigate your own company information available to you.
Training allows agents to hone their judgement so that they know what their notes are useful for, which notes to read, and when to supplement notes with primary sources.
Learning in a world of notes
Isn’t it expensive to train stuff?
The very first thought that came to my mind was: “Isn’t it expensive to fine-tune things?”. The second that we think about GPUs, I have this knee-jerk reaction that this must cost a lot of money. But, search is not a free lunch either.
Let’s say that we have a very large org and a query that the whole company does multiple times a day, where the answer does not change often. If you are a publicly traded company, the mission of your company is not going to change every day. But every time someone new gets onboarded, they might ask: “What is the mission of the company?”
What is the cost of retrieving and searching one specific piece of information over and over and over again, knowing that the output will be the same every single time? In that case, wouldn’t a forward pass (meaning inference) be cheaper than a new search?
There is an upfront cost to training. But according to Engram, a trained model can cost less per query than a frontier model, with similar accuracy- meaning, the upfront cost gets amortized over queries.
On Harvey C&H, for example, the trained model matches GPT-6 Sol (medium effort) with notes at 78% accuracy, but costs $0.06 per query against $0.17.
Learning in a world of notes
If there are enough of them that are the same one, it can pay for itself quickly. This clearly, is the strongest pro.
Context is alive and evolves
On the other hand, there are though a few cons. The first one is that context is alive and evolves. Some parts of a company change daily, if not hourly. The status of a sales deal can change meeting by meeting as multiple people engage different stakeholders. In the law space, the law might not change daily, but an active case and the client’s data room can change very quickly as you dig and get more data from the client.
Engram claims that trained models are surprisingly robust to these changes: a model learns generalizable strategies for using notes, not just the factual information inside them, so retraining might not be needed after every single edit.In Engram’s experiment, the model trained on the original notes grew more accurate as it read the updates.
…retraining on the final notes does only slightly better. This suggests that a model learns generalizable strategies, so it doesn’t need retraining after every edit.
Learning in a world of notes
Still though, what changes kind of matters. It is not only how much something changes, but also what changes. If I were running my own business, I can think of, off the top of my mind, a few things whose change could be critical: numbers change, the client list changes, my budget and runway (which affects payroll) changes. I would need those facts to be up to date.
The second con is the brain, the model, meaning: there is a new frontier model coming relatively often. A fine-tuned model makes you specifically dependent on the model that you picked. If a new brain comes, you have to choose: do I keep the learned memories in model A, or do I pick model B because it is better and redo that training from scratch? From an eval-first perspective, if model B, straight out of the box, already beats my fine-tuned model A by a meaningful margin in terms of accuracy, then I have a reason to switch and fine-tune B- otherwise, I’d keep A. From this perspective, there is still a point to a portable brain and a portable context, so that to avoid a brain lock-in. The second you are unsatisfied with the brain, you can just change it without any sunk cost (i.e. training cost).
A portable brain and a portable context
This brings me to the second school of thought, which is how things are being done right now in most enterprises and protocols out there.
The context is a database, a CRM, or a record system that is external to the brain and accessible via LLMs. You might have your Salesforce MCP, GitHub MCP, Notion MCP, Slack MCP, and a brain. That is it.
The pro is that you have no dependency on one model. You have a portable brain, and you can change brains at any time. You are not fine-tuning on it, so there is no sunk cost to it- you essentially are just renting the intelligence.
The con is that you are giving that agent so much work- the agent is working overtime because it is searching through a lot of stuff, in an unstructured way, every time, from scratch.
If you ever watched the movie 50 First Dates, you might remember that this girl had amnesia and did not remember that she had a boyfriend. He had to introduce himself every single day from scratch. That is essentially what you are doing when you start a session with an agent that has no context of your previous work, previous PRs, or the rest of your org. Even if you worked on that thing yesterday, it has to fetch it, search it, and query it again.
You constantly have to catch up your agent and give it background information because it’s missing key context; it can’t just “keep up” the way a teammate would. Notion, A New Shape for Work
That search is expensive. It takes tokens and time, and it can be frustrating, especially because most knowledge work does not start from scratch every day- we build on what we worked on yesterday, the day before, a week before, and so on. And if nothing changed from yesterday to today, you could benefit from the first school of thought. If a query has the same output many times, one-time inference could be cheaper than many searches for the same thing.
Context as a garden
This brings me to the third school of thought, the Notion school of thought.
In this school of thought, you take your knowledge- Salesforce, Slack, Linear tickets, Jira tickets, Google Meet calls, be it from your Notion notetaker, Granola, or your notetaker of choice- and synchronize it into one context system. But, this is not just about putting all of this stuff from multiple CRMs/databases in a new notion database, because then, what would be the difference?
The difference needs to be that you keep it clean and harvest it like a garden.
A garden is a shared space which outlives the people working in it: a codebase, a CRM, a company brain.
Nicholas Charriere, Butler agents and gardener agents

If a context system is for storing accurate, up-to-date information and making it easily accessible to agents and people, then Enemy No. 1 is bad context. Stale, substandard, incomplete, improperly organized, misplaced, and out-of-date context is everywhere. Notion, A New Shape for Work
Essentially, the concept of the gardener is the concept of the self-healing wiki, the self-healing context. Meaning that you have a gardener agent that makes sure that the context is always updated and, in a way, healed, i.e. correct ground truth at all times.
Illustration by Nicholas Charriere
That can be done as a cron job every day, or in a triggered way, meaning:
- with a webhook, every time there is a new email coming in, it’s fetched
- every time there is a PR, that also goes in the context
- every time there is a new meeting, that is fetched automatically
Illustration by Nicholas Charriere
The sync can be done in different ways.
You can have AI create one just for you! In Notion, they’re called worker syncs, but any good context system should have an easy way to pull context in from other sources.
Notion, A New Shape for Work
The actual point is to have a ground truth, i.e. to have the latest, most up-to-date thing.
Let’s say that Salesforce says a deal is doing well, but then I have a call with one of my colleagues and find out that the deal is actually in danger. The CRM might not be updated yet, but that knowledge is relevant to the rest of the team.
A proper context system harmonizes signal from Salesforce, Slack, meetings, and other sources into ground truth. When you ask about a deal, you do not care what one specific row in Salesforce says. You care about: “What is the latest on this deal?”
That latest could come from Salesforce, as it could come from Slack, or it could come from a meeting. You do not care where it comes from: you care about getting signal, you care about getting alpha.
That is possible if you have a garden that is well kept, synchronized, and gives you ground truth instead of just information that is just queryable and searchable.
If the wiki is stale or the database is messy, even the best model will give you bad answers.
Nicholas Charriere, Butler agents and gardener agents
What is judgment?
But context is not only about storing or retrieving facts. Another thing that you care about is judgment.
Engram sees judgment under the lens of how an agent navigates its memory: what the notes are useful for, which notes to read, and when to supplement them with primary sources. Essentially: “Okay, I know I do not know enough. I am going to have to look for more information.”
The models we're building can recall information directly from their weights if asked, but more importantly, they use their knowledge in the loop with search. They don't just write notes, but they learn how to use them effectively.
Engram, Understanding a Law Firm through Study
I feel like the way Engram sees judgment is the way I see alpha. We are calling them different words, but conceptually it is what we both care about. If I am asking a question to an agent, most of the time it is because I do not know something. That implies that I have unknown unknowns as well. Those unknown unknowns are the alpha I am looking for, the signal I am looking for (and it is crucial that a performant context system is not only up-to-date/clean/points to ground truth, but that is also able to sort alpha and signal from noise). An agent should reply to my question holistically, but also tangentially, and find things that are relevant to what I need even if I did not know to ask for them.
Notion sees judgment from a different, enterprise angle: who should have access to what, and why. If I am a solopreneur, I have access to everything in my org and across my stack. But inside an enterprise, different people have different permissions. There is a different ground truth for different people.
The most typical example is when someone gives notice to their manager that they are leaving, but the team does not know yet. Not everyone is supposed to know until it is the right time. Or someone tells their manager that they need to take medical leave- that one-on-one transcript should not be public.
Even if an agent gets access to the transcript and can read it, it should have the judgment that a person should have, and not share the wrong information with the wrong person- in a way, under this lens, judgment is permissions and rbac and data safety (i.e. preventing information leakage), but for intelligence.
So, what does this all mean?
Does this mean that one school of thought is right and the other two are wrong, and vice vice versa? Not at all- these three schools could coexist.
So long as we do not have an infinite context window, or something approaching it where we can perform attention within it, we as an industry have to be relatively crafty about what we put inside it.
Information that changes relatively seldomly and gets used repeatedly could live in the weights. Precise, editable, structured facts that change often could stay in text memory- and an agent can use search when neither one is enough. Part of a context could be portable, and part of the memory could be inside the weights. Or we could all get tomorrow a bigger context window from the Labs as early Christmas gift and have to deal with a whole slew of new set of problems altogether.
If stuff like this interests you, please feel free to reach out- we are all learning.