Unit 04.02: Memory, and why it is usually a context problem
"The agent forgot" is nearly always a description of a context problem rather than a memory one.
Extract facts into fields as they are established
A conversation transcript grows without bound and buries the one line that mattered. A structured record of established facts does not.
The code shows the same three-turn conversation as raw text and as extracted fields.
CONVERSATION = [
("user", "why was I charged twice?"),
("agent", "I see two charges on 14 June."),
("user", "refund the second one"),
]
naive_context = " ".join(text for _, text in CONVERSATION)
structured_context = {
"account": "ACC-1187",
"established_facts": ["two charges on 2026-06-14"],
"current_request": "refund the second charge",
}
print("naive :", naive_context)
print("structured:", structured_context)
print("""
"The agent forgot" is almost never a memory-system problem. It is that the
relevant fact was never extracted from the conversation into a field.
Extract facts into named fields as they are established. A transcript grows
without bound and buries the one line that mattered; three fields do not.
""")
The structured version has three fields: the account, what has been established, and what is being asked now. An agent handed that cannot lose the two charges on 14 June, because the fact is a field rather than a sentence somewhere in a growing transcript.
This is also cheaper. The transcript is re-sent on every turn and grows every turn; the fields do not.
The mistake this prevents
Two further consequences follow once memory persists. Anything holding a customer's question and the facts extracted about them is a store of personal data, and it needs the same scoping, retention limit and deletion path as any other - a crew's memory is not exempt because it was built for convenience. And shared memory across agents means one agent's unverified assumption becomes an established fact for every agent after it, which is the propagation failure Module 9 opens with. Record how a fact was established, not only that it was.
The mistake is enabling a memory feature and treating the problem as solved. Memory systems store and retrieve what you put in them, so a transcript stored verbatim is a transcript retrieved verbatim - with the same burial problem, now with a retrieval step in front of it.
Takeaway
Extract established facts into named fields as the conversation proceeds. Most reported memory failures are facts that were never extracted, not facts that were stored and lost.
