Immune Memory: Contradiction Filtering at Write Time for Long-Term LLM Agents
Long-term memory for LLM agents, as implemented in systems such as MemGPT and Mem0, is optimized for retrieval and scaling but lacks a systematic mechanism for preventing the accumulation of contradictory statements at write time. We formulate the admission problem as separate from storage and retrieval and propose IMMUNE MEMORY, a lightweight layer orthogonal to any existing store. Analogous to innate immunity, which recognizes self/non-self patterns before an adaptive response is launched, the layer intercepts an incoming statement before commit and routes it into one of three categories: ADMIT, QUARANTINE, REJECT. The decision is based on a consistency signal computed against the current memory state and on external verification for sources not marked as trusted. The architecture requires no modification of the store and is compatible with MemGPT, Mem0, and graph backends. This is a position paper: we define the layer interface, a taxonomy of contradictions, a quarantine metadata schema, and a validation protocol on LoCoMo with controlled contradiction injection; the concrete implementation of the consistency signal and the judge prompt are left out of scope as engineering details.
Authors
- Vladislav Tishkov (ORCID: https://orcid.org/0009-0004-0507-6925)
Institutions
- Donetsk National University of Economics and Trade named after Mykhailo Tugan-Baranovsky (UA)
Publication Details
- Published
- 2026-11-02
- DOI
- https://doi.org/10.24108/preprints-3116872
- Primary Topic
- Topic Modeling
- Type
- preprint