The scenario
The system learned that Priya owns the billing service. Priya moved teams in August. Every answer since has been confidently wrong, and the customer-facing agent has been routing escalations to someone who left. Deleting the memory fixes today’s answer and destroys the record. Six months from now nobody can explain why the agent said what it said in July — and for a regulated workload, “we deleted it” is the wrong answer to an auditor.Step 1 — Supersede it, with the reason
state="invalidated" takes it out of retrieval without removing it. The
reason is stored alongside, so the correction is self-documenting rather than
a mysterious gap.
Step 2 — Record what is true now
Step 3 — Read the history
Step 4 — Fix a detail without invalidating
For a wrong date or a typo, correct the field rather than superseding the whole memory:Evals
- Record a fact, retrieve it, confirm it comes back.
- Invalidate it with a reason. Retrieve again — it must not come back.
- Read the history and confirm the old content and the reason are both intact.
- Ask a question that the superseded fact would have answered. Check the answer now reflects the replacement rather than sitting between the two.
Guardrails
- Always pass a
reason. A correction with no reason is indistinguishable six months later from a mistake, and it is the field an auditor reads first. - Correcting is owner-only. A read-only member of a shared space cannot invalidate, by design.
- Do not fix a wrong fact by recording a right one and leaving both. Retrieval will happily return the pair, and the model will average them.
Built from
Both are complete, runnable scripts:memory_basics.py,
time_travel.py.
The full field list is on Memories.