What building a shared memory taught me about helping AI build on earlier work
By Tim Hauptrief
It started while I was watching Reiner Pope’s recorded lecture, How GPT, Claude, and Gemini are actually trained and served.
I was learning about the machinery behind large language models when I started picturing a railway.
The railway was my analogy. But it helped me think about a question that reaches beyond the model itself:
What happens when we need to make the same journey tomorrow?
What if the system around an AI model could bring the right evidence into each new task? Could preserving earlier work give the model better context, reduce how much it has to infer, and save me from explaining the same things again?
That is the possibility I am exploring with the shared project library I have been building. Better responses and lower token use over time are outcomes to test, not results I have established.
A Powerful Engine Can Still Repeat the Journey
A language model processes text as smaller pieces called tokens. It uses the available context and calculations shaped by training to generate a response one token at a time. Earlier text helps condition what comes next.
Some models use a mixture-of-experts architecture, selecting particular parts of a network to perform some of that processing. The term “experts” can sound like a team of specialists, but it describes a computational arrangement. Shazeer and colleagues demonstrated an influential approach using a learned gating network to select among smaller networks. Shazeer et al., 2017
That is where my railway comparison needs limits. The experts are computational components, not little workers with specialist knowledge at stations. A token does not follow a literal train route through them, and not every model uses this architecture.
My external library does not send evidence directly to individual experts. The surrounding software retrieves records and includes relevant material in the model’s context. The model processes that input through its own architecture. This changes the information available for a response; it does not by itself retrain the model or change its learned weights.
The analogy became more useful when I stepped outside the model.
The model was the engine. The software organizing its work was the station. Connections to tools and outside information were the tracks. An external library was the warehouse where useful material could wait until needed again.
For a new task, the station looks for useful material in the warehouse and loads the relevant records for the next journey. In the actual workflow, that means selecting evidence and placing it in context before asking the model to continue. The train helps me picture that movement of information, rather than the internal path of an individual token.
I spend a considerable amount of time building software with AI assistants. Sometimes they work independently. Sometimes I ask them to challenge one another’s conclusions.
They can accomplish remarkable things.
They can also repeat an investigation we have already completed, forget why we rejected an approach, or recommend something we previously found unsuitable.
A capable engine does not automatically know which journeys have already been made.
A Summary Can Lose the Reason
A model’s active context is finite. Depending on the application, long conversations may be summarized, shortened, or supplemented with retrieved information.
A project lasting months accumulates more than a conversation.
It develops a history: decisions, assumptions, experiments, failures, corrections, and unfinished questions.
A summary might preserve the conclusion while losing the reason behind it.
Sometimes the reason matters more.
“Don’t use that motor” is useful advice.
“Don’t use that motor with this battery, expected load, and controller” is advice we can examine when the design changes.
Without the conditions attached, yesterday’s sensible conclusion can become tomorrow’s misleading shortcut.
That continuity problem also appeared in What My AI Team Did While I Was Away. Returning to a project means recovering what changed, what was checked, and what remains unfinished.
A confident recap is helpful only if those distinctions survive it.
What If We Preserved the Work?
That question became part of the thinking behind the external project library I have been building, which I refer to as my second brain.
It contains project history, research, code, decisions, test results, failures, and corrections.
Instead of expecting a conversation to carry an entire project forward, we preserve records outside it.
The aim is for an assistant beginning a new session to find relevant material and recover enough context to continue responsibly. This is the practical problem I mean by AI agent memory.
There is an established research foundation for combining models with retrieved information. Lewis and colleagues studied retrieval-augmented generation, pairing a language model with an external information index. Their work supports the general approach; it does not establish that my project library improves a particular workflow. Lewis et al., 2020
Nor does a larger library mean every assistant should read everything.
In Lost in the Middle, Liu and colleagues found that models’ performance on selected retrieval and question-answering tasks could depend substantially on where relevant information appeared in the context. The study concerns the models and tasks evaluated, but it illustrates why fitting information into a context is not the same as using it effectively. Liu et al., 2023
The useful question is whether the assistant can find the right record, recognize its status, and identify what still applies.
I want it to recover more than what we decided.
I want it to recover what we knew when we decided it.
Suppose a new session begins with only “help me choose a motor.” The assistant may need to ask about the battery, expected load, and earlier tests. If it can retrieve those records first, it has more of the conditions needed to answer. It may need fewer assumptions and less explanation from me, while still asking about anything missing or changed.
That is the connection I want to test: relevant evidence creates better context; better context may reduce unsupported assumptions; fewer misunderstandings may reduce repeated explanation and correction. More records alone do not guarantee that chain will hold.
Two Different Kinds of Reuse
KV caching helped me think about this, although the distinction matters.
During generation, a transformer can reuse previously computed attention keys and values rather than recomputing them for earlier tokens at every step. Hugging Face’s documentation explains this mechanism and its role in efficient generation. Hugging Face, “How caching works”
An external project library preserves records that can be retrieved and processed again.
These mechanisms save different kinds of work. Retrieving a document does not make it free for the model to read.
But recovering a useful investigation may still be preferable to rebuilding it.
Imagine spending an afternoon comparing motors, reviewing electrical requirements, reading technical manuals, and checking a proposed design.
The next day, another question comes up.
We could start the research again.
Or we could retrieve the earlier work, inspect its assumptions, and investigate what has changed.
The second approach might save searching, explanation, and repeated analysis. Whether it does—and by how much—depends on the task and the quality of the records.
What I Would Measure Over Time
The test is whether the whole workflow becomes more useful as relevant records accumulate. I would compare similar tasks using the same model and settings, with and without access to the project library, and record differences in task difficulty.
I would track whether responses satisfy the task and are supported by evidence, how often the assistant makes unsupported assumptions, how much explanation I need to repeat, and how many corrections or retries are required.
I would also count total input and output tokens across the workflow, including retrieved text, summaries, tool-related model calls, reviews, and failed attempts. Building and maintaining the records has a cost too. Counting only the final answer could hide work moved elsewhere.
The hypothesis is that relevant accumulated evidence may reduce repeated research, explanation, and correction enough to lower token use for comparable tasks. Retrieval can also add tokens, and an expanding or poorly selected library could increase usage. KV caching can reduce repeated computation without reducing the amount of text supplied, so token counts, cost, and latency need separate attention.
A growing library does not establish a downward trend. I would need repeated measurements that preserve both improvements and failures before claiming better responses or declining token use over time.
A Library Can Preserve Mistakes Too
What happens when we save something incorrect?
What happens when the original recommendation is easy to retrieve, but its correction is buried elsewhere?
External memory can give an old mistake a longer life.
That is one reason I wrote The Records Were There. The Claims Needed Work. Possessing records and making a justified claim from them are separate accomplishments.
A useful record should show whether something was proposed or tested, and keep corrections and open questions visible next to what they address.
In our records, we try to keep each item linked to its version, its supporting evidence, and any later corrections.
Even familiar technical safeguards have limited jobs.
A cryptographic hash can help detect whether content has changed relative to a trusted reference. It does not establish that the content is true. NIST’s Secure Hash Standard describes algorithms for generating message digests used to detect changes. NIST, FIPS 180-4
A preserved test report tells us what was recorded. We still need to examine what was tested, under which conditions, and what the result supports.
The library becomes more useful when those limits travel with the information. Those safeguards matter to the context question: readily available evidence can reduce guessing only if the assistant can distinguish a supported finding from a proposal, an outdated result, or an unresolved question.
Finding Information Is Not Permission to Act
This connects with my broader work on Binder, where I am exploring how to keep permission to act separate from access to information.
The practical question is how to make it clear, and testable, who may do what, and on what basis.
An assistant might find a document describing a past decision. That does not automatically authorize a new action.
As I explored in When Permission Changes Hands, information and authority need careful treatment when work moves through a team.
An old document can describe a decision that no longer fits.
Someone should check before old information turns into a new action.
Criticism Belongs in the Memory
I often ask different AI systems to review one another’s work.
Agreement does not guarantee correctness. Different systems can repeat the same error or rely on the same source.
The value is in what the criticism reveals.
Did a reviewer find a missing condition? Did someone identify a test that did not examine the intended behavior? Did a later observation contradict an explanation we had accepted?
Those are the kinds of contributions I discussed in What Another Reviewer Catches.
If the review changes our understanding, the correction should remain available to future work.
Otherwise, the team may learn a lesson in one conversation and lose it in the next.
I want a library that helps the team remain correctable.
The Motor Example Gets Real
A small tracked robot project with my son makes these questions tangible.
As described in Building Blu Robotics, the work begins with motors, electronics, a chassis, and plenty of mechanical questions.
Suppose we record that a particular motor performed adequately.
Later, we change the battery, add weight, or move from a smooth floor to rough ground.
Retrieving the earlier recommendation could help. It could also mislead us if “worked before” becomes “will work now.”
The useful record would preserve the conditions.
What was the robot carrying? What surface was it on? What did we measure? What remained an estimate?
I would eventually like to explore how recorded sensor observations could inform later tasks.
A robot encounters an obstacle. We record a prediction, attempt a maneuver, and compare the expected outcome with what happened.
On a later attempt, the previous observation becomes something to examine.
Recording the event does not establish that the system understood its cause.
But it gives us a practical way to explore the difference between remembering an outcome and learning something dependable from it.
Old Engineering Still Has Plenty to Teach Us
The ambition to make accumulated knowledge easier to use predates modern AI.
In his 1945 essay As We May Think, Vannevar Bush imagined a system for consulting stored material and following associative trails through it. His proposal was not a language-model memory architecture, but it belongs to the longer history of helping people recover and connect knowledge. Bush, 1945
That history is encouraging.
We have decades of work in information retrieval, databases, version control, and computer security to draw from.
We do not have to invent every component to discover a useful combination.
We do have to test whether the combination does what we expect.
Back to the Railway
By the end of the lecture, I was thinking about useful AI somewhat differently.
The model is an extraordinary engine.
Better engines matter.
So does the railway around them.
The station organizes the work. The tracks connect tools and information. The warehouse preserves material worth returning to. The rules define what may move and who may authorize it.
The records help us reconstruct the journey.
A bigger engine might move more freight.
A better railway could help us move the right freight to the right destination—and recognize when yesterday’s route no longer fits today’s conditions.
That is the possibility I keep coming back to.
Useful AI may depend not only on what a model knows, but on whether the surrounding system can recover earlier work, check whether its assumptions still apply, and build on it without losing the corrections.
The possibility I am exploring is that better records can create better context for the next response. As useful evidence accumulates, the assistant may need less repeated explanation and fewer rounds of correction. Whether that improves results and reduces total token use over time is something I still need to measure.
The engine need not change for the next journey to begin with better information. The surrounding system can preserve what we learned and bring the relevant evidence back into view.
That seems worth exploring.
One journey at a time.
AI Agent Memory: Common Questions
Is KV caching the same as AI memory?
No. KV caching reuses attention keys and values computed for tokens. An external memory system preserves records for later retrieval. Retrieved records still need to be processed by the model.
Why not just summarize long conversations?
Summaries can help, but they may omit the conditions, evidence, or reasoning behind a decision. Preserving the underlying records lets an assistant examine those details when circumstances change.
Can external memory make AI worse?
It can preserve incorrect or outdated information. Useful AI memory systems need records that make evidence, corrections, and unresolved questions easy to find and assess.
Does retrieving a record give an assistant permission to act on it?
No. Access to information and permission to take a new action are separate. A past decision may no longer fit the current situation.

Leave a Reply