Memory that keeps an agent coherent
An agent that forgets everything between sessions is a stranger every morning. Substrate's Memory service gives agents a persistent semantic store on the appliance, so what they learned yesterday is available today.
· 4 min read
IN SHORT
Substrate's Memory service stores what an agent has observed, decided, and been told as semantic memory on the Czar appliance, and recalls the relevant parts in later sessions. An agent stays coherent across days and shifts without re-learning the site. Memories belong to the site, are scoped by identity and policy, never leave the building, and are traced by Evaluation.
A new colleague takes a few weeks to become useful. They learn which door sticks, which supervisor wants to be told what, which items are always mislabeled by a certain supplier. An agent without memory never gets past the first day. Each session it arrives knowing the general and nothing of the particular.
Substrate's Memory service fixes this. It gives agents on the appliance a persistent semantic store, so what an agent learned yesterday shapes what it does today. This article describes what Memory holds, how it is recalled, and how the site keeps control of it.
What Memory is
Memory is a store of facts, observations, and decisions associated with an agent identity, kept on the appliance across sessions. When an agent encounters something worth keeping, it writes a memory. When it starts work later, it recalls the memories relevant to the situation in front of it.
Recall is semantic rather than literal. The agent does not replay a transcript. It asks the store for what bears on the current task, and the store returns the memories closest in meaning, using the same open embedding models that power Retrieval. An agent handling a receiving exception recalls what it learned about that supplier, not everything it has ever seen.
Memory and Retrieval are different
It is worth drawing the line. Retrieval searches the site's documents, which are authored by people and curated as a library. Memory holds what the agent itself has observed and decided. A procedure manual is Retrieval. The fact that the agent followed that procedure on this machine last Tuesday and the fault recurred is Memory.
Agents use both. A maintenance agent retrieves the procedure, recalls that it did not resolve the fault last time, and proposes the next step the procedure lists rather than the first. That combination is what coherence means in practice.
Scope, policy, and correction
Memories belong to the site, not to the agent and not to Element 31. Each memory is scoped to an agent identity, and the site's policy on the single API decides what that identity may write, what it may recall, and how long memories persist.
A site may give a shift-summary agent a long memory and a dock agent a short one. It may permit a supervisory agent to recall from several agents' memories and forbid the reverse. It may require that memories touching certain subjects be reviewed before they persist. These are policy settings, applied once, and the trace shows them being enforced.
A person with the right role can open an agent's memory and read it. This matters because agents remember what they observe, and observations can be wrong. A supervisor who finds that an agent has remembered a temporary workaround as the standard procedure can correct it or delete it. The trace records who changed what, so the memory's history is as auditable as any other record on the appliance.
Deletion is complete. Memory is stored on the appliance and nowhere else, so a deleted memory is gone rather than lingering in a copy somewhere.
What stays in the building
Memory is written on the appliance and recalled on the appliance. No default path exists from the appliance to the public internet, and the Memory service does not open one. An agent's accumulated knowledge of the site, which over time is a detailed picture of how the floor runs, remains the site's.
A customer with several facilities may want an agent at one to benefit from what an agent at another learned. Memories are the customer's and can be moved between the customer's appliances over declared routes on connected sites or by media on air-gapped ones. Whether to do so is a decision the site makes deliberately, like any other connection.
Memory in the trace
Every write and every recall is traced by the Evaluation service: the agent identity, what was written or recalled, and the operation it was part of. When an agent acts on a remembered fact and the action is questioned, the trace shows which memory it recalled, when that memory was written, and what the agent observed at the time.
This closes a loop that is otherwise hard to close. An agent's behavior in week ten depends on what it remembered from week two. Without the trace, that dependency is invisible. With it, a supervisor can follow the chain and decide whether the memory, the recall, or the action was the problem.
The library service that Memory complements is in Retrieval with citations over the site's documents. How Memory shares identity and policy with the other services is in one API for seven services. The trace that records every memory operation is in tracing every operation with Evaluation.
Questions this raises
- What does an agent remember?
- Whatever it observed, decided, or was told that the site's policy allows it to keep: that a particular dock door sticks, that a supervisor prefers a certain escalation path, that an item was reclassified last week. The site decides the scope and retention of memory for each agent identity.
- Can a person read what an agent remembers?
- Yes. Memories are stored on the appliance and can be inspected by roles the site grants. A supervisor can see what an agent has remembered, correct it, or delete it, and the trace records who did so.
- Do memories ever leave the appliance?
- No. Memory is stored on the appliance and recalled on the appliance. There is no default path out of the building, and the Memory service does not create one. A site with several facilities can move memories between its own appliances if it chooses.
KEEP READING