Memory integrity is a rule that stops an AI from rewriting its own memory: what it observed outranks what it reconstructed, which outranks what it interpreted, and a lower-authority write can never overwrite a higher one. When a narrative tries to overwrite a fact, the write is diverted to its own record and disclosed, never silently applied.
The failure it stops
An AI records “the lease expires November 15” from a signed document. A week later it “reconstructs” that the lease “probably runs into spring” and overwrites the fact with the guess, then quotes its own guess back to you as the record. That is memory laundering, and most systems do it silently. I built this after our own probe suite caught our own code doing a version of it, and now the rule is enforced in code.
What it does
- Labels by source. A tool result or receipt is an observation; a musing is an interpretation. The label is derived, not claimed.
- Guards overwrites. An interpretation can never overwrite an observation; the write is diverted to its own key and the fact stands.
- Demotes false claims. A write claiming more authority than its source allows is demoted, and the demotion is disclosed.
The honest part
Labels are earned, not claimed. Pre-existing unlabeled data keeps status-quo authority; no protection is fabricated onto old rows. A domain wipe protects observations unless you force it, and forcing is disclosed.
Get it
Free, Apache 2.0, zero dependencies: github.com/davedepew/memory-integrity
pip install memory-integrity
It is part of The Operator’s Honesty Stack, a set of open-source engines that each make one kind of AI dishonesty structurally impossible. The engines are free; the Operator’s Membership is where I publish the playbooks that deploy them, for $19 a month.
FAQ
What is memory integrity for AI?
An authority order over memory records so facts cannot be silently overwritten by guesses.
Is it free?
Yes. Apache 2.0, on GitHub, zero dependencies.
Do I need a database?
No. It ships a reference store, or wire the pure policy into your own.

