Auditable Agent Memory: An Append-Only Fact Ledger with Source-Retaining Compaction
Year: 2026
Type: preprint
Abstract: Large language model (LLM) agents that operate over long horizons depend on external memory and on context compaction. Both can lose information silently: stored facts are overwritten without trace, and context replaced by a summary is discarded. We describe a memory design, with a reference implementation for PostgreSQL, that addresses both under an explicit trust model. Facts are held in an append-only ledger in which a fact changes only when a new version supersedes the previous one. Every version records the authenticated database login that wrote it, the recording time, a stated reason and a source reference. Working context is held as a log of items in the same database, and compaction marks items as replaced by a summary instead of deleting them, so the sources of every summary stay stored and can be listed exactly from the summary's identifier. For agent roles these properties are enforced by database privileges, constraints and triggers. They are conditional on an orchestration layer that builds model requests from the committed log. We state four invariants with proof sketches, analyse the residual risks, and report a 35-case correctness test suite covering privileges, concurrency, ordering, retries and tampering; all 35 cases passed on PostgreSQL 16.16. The design does not establish that recorded facts or reasons are true, and it guarantees retention and exact lookup, not successful search. Its effect on task performance has not been evaluated. The accompanying software is licensed under the MIT License. The correctness tests do not benchmark performance or agent task outcomes. Licensing: the paper is licensed under CC BY 4.0; the accompanying software is licensed under the MIT License.
Author: Carvalhão, David
Language: English
Topic: Access Control and Trust
Subfield: Computer Networks and Communications
Field: Computer Science
Domain: Physical Sciences
Open Access status: green
OpenAlex ID: W7235194363
