Research
Audit-Ready Memory
A study of memory for AI agents that can be audited: every write, read, and removal is an event in one log, and replay rebuilds any past state.

Question
A memory for AI agents that can be audited.
An AI assistant that remembers keeps what it was told and what it looked up. Often nobody can see what it holds, what it used for an answer, or whether something was really removed after a request. For a public organisation, a community group, or a researcher, that makes it hard to explain a decision, to correct a mistake, or to answer a privacy request.
Audit-Ready Memory asks what a memory for agents must look like so that those questions get exact answers. What did the memory hold at a given moment? What was the model shown? What was removed, when, and why?
It is a small open source Python library with a demo app. The memory runs on your own machine, in an embedded ArcadeDB database, with no server and no network. It uses HumemAI's Python package for the engine, ArcadeDB in Python.
Design
One append-only log, and every state rebuilt from it.
The memory is a sequence of events that never change once they are written. No current state is stored anywhere. The state at any point is rebuilt by replaying the log from the start, as a pure fold: the same events in always give the same state out. The store never updates or deletes a record.
The store gives each event a number, seq, that only goes up. It puts the log in one order that does not depend on the clock, so replay still works when clocks disagree. An import with an old time keeps that time and gets a new seq.
There are four kinds of event. A message is one turn of a conversation. A document is text that someone brought. A recall is a read: it names the query and every item that entered the model's context. A deletion is a tombstone that names what it removes and why, and the reason is required.
Why reads are events. Most memory systems log what was written. The question an audit asks is what was used. A recall event answers what the model was shown, and when.
Why nothing is rewritten. If a deletion rewrote history, nobody could show what the system knew at an earlier point, and the deletion itself could not be shown. A lasting record of the removal is the evidence that it happened.
Why search is simple. Search counts the words that a query and an item share. It is deterministic and easy to explain, which suits an audit trail. It is not built to compete on retrieval, and a search for "pumps" does not find "pump".
On the main branch, the log is stored as a graph with three kinds of edge. NEXT links a message to the next one in its conversation, RECALLED links a read to each item it read, and DELETED links a tombstone to each item it removed. A read-only Cypher query can then ask, for example, which reads used one item. Replay does not use the edges.
Deletion
Deletion that holds for every read, and is on record.
Deleting an item appends a tombstone. From then on the item is left out of every read: the visible state, the search, and the text sent to a model. The tombstone records when, why, and, if given, at whose request. A replay names the tombstone that removed each item.
Deletion is not erasure. The original event stays in the log and can still be fetched by its id. If the bytes must be gone from disk, the guide on retention and deletion gives three ways that work today: keep sensitive content outside the log and store only a reference and a digest, delete the whole database folder, or write a new database from the visible events and keep the tombstones.
An item can also carry a time after which it may no longer be used (retain_until). On the main branch, searches skip it from that moment, with no scheduled job. A call to expire() then writes one tombstone for everything that has expired, so the expiry shows in the log like any other deletion. Nothing schedules that call.
Tested
What is built, and how it is checked.
The library, its tests, three examples, and the demo are in the repository. Release 0.0.2, from 14 August 2026, is on PyPI. The main branch adds the graph, enforced keep times, and read-only Cypher queries, and is not released yet (the changelog).
The memory model writes down seven rules, for example that the log is append-only and that deleted content cannot be reached by any read. The code enforces them and the tests assert them.
A benchmark set checks the rules on a documented input with a documented output (the benchmarks guide). The input is 300 operations on a made-up neighbourhood log, generated from a fixed seed, with no personal data.
The 300 operations of the benchmark input, by kind.
| Operation | What it does | Count |
|---|---|---|
| message | A resident writes a message | 187 |
| document | A resident uploads a report | 24 |
| recall | A search of the memory, recorded as a read | 56 |
| delete | A removal with a reason | 30 |
| expire | A sweep that records what has expired | 3 |
The expected output is a SHA-256 digest of the memory state after every 25 operations, 12 checkpoints in all. At the end the state has 300 events, 130 visible messages, 21 visible documents, and 60 deleted items. The digests come from a second, plain implementation of the rules that imports nothing from the library.
The four checks. A check passes when none of its cases fails.
| Check | What is checked |
|---|---|
| Consistency | Every recall returns the expected items in order, the replayed state matches the reference, seq has no gaps, and the graph has exactly the expected edges |
| Replay | Every past point replays to the state it had then; replaying twice, reopening the database, and rebuilding from the exported log give the same state |
| Retention | Each sweep deletes exactly what was due, no recall ever includes expired content, unexpired content survives, and a second sweep writes nothing |
| Deletion | Deleted content is not visible, not found by search, not recalled later, and not in the text sent to a model; the log says when and why it went; the original stays in the log |
The tests, the benchmark set, and the examples run on every push and pull request in GitHub Actions, on Python 3.11 and 3.14 (the workflow).
Measured
Every time limit was met on one machine.
The benchmark set checks correctness. Each check passes or fails, and nothing is timed by default.
Time limits are written down for five everyday operations: writing one event, replaying the whole log, a search with the record of its read, one Cypher query, and reopening the database, each at 1,000 and 10,000 events. They were set on 27 November 2026, before any measurement. They ask whether the memory is fast enough behind an interactive assistant on a modest machine. They do not compare it with other systems. The limit applies to the 95th percentile of each operation.
They were then measured on one machine, three times, on 27 November 2026 (UTC), from the commit that set them: an Intel Core i9-12900HK limited to two cores, with turbo off. All 30 limit checks were met (five operations at two sizes, in each of the three runs), and the correctness checks gave the same result in every run. The closest to its limit was a search with the record of its read at 10,000 events: 226.22 ms at the 95th percentile, against a limit of 2,500 ms. One machine and three runs show that the limits hold there, not on every machine. The table and the raw files are in the repository, with the script that writes one from the other.
Time at the 95th percentile, the median of three runs, with the limit set before measuring.
| Operation | 1,000 events | Limit | 10,000 events | Limit |
|---|---|---|---|---|
| Write one event | 0.99 ms | 50 ms | 1.05 ms | 50 ms |
| Replay the whole log | 17.31 ms | 500 ms | 178.70 ms | 2,000 ms |
| Search and record the read | 28.57 ms | 750 ms | 226.22 ms | 2,500 ms |
| One Cypher query | 0.13 ms | 500 ms | 10.57 ms | 500 ms |
| Reopen the database | 5.91 ms | 10,000 ms | 4.77 ms | 10,000 ms |
The checks also have limits of their own. One made-up input of 300 operations shows that the rules hold on that input, not on every input. The second implementation has the same author as the library, so a misunderstanding that both share would pass. The deletion checks show that content is no longer read, not that it is erased.
Open questions
What is not solved yet.
Tampering. The log is in order, but it is not hash-chained or signed. Anyone who can write to the database files can change the history and leave no trace. The guarantees hold against accidental changes and against an application that overwrites data, not against a determined operator. Hash chaining is a possible extension and is not built.
Erasure. Removing one item from disk while the log still proves what happened is not solved. The three ways above are choices made when the memory is set up.
Scale. Replay reads the whole log on every call, and search reads all visible content, so both take time in proportion to the log. That is fine at the size of the demo and will not be at millions of events. There is no snapshot and no index yet.
One writer. The store counts seq in one process, so two writers on one database would collide. Concurrent writers are not supported and not tested.
Speed. The time limits above are measured on one machine only, and only up to 10,000 events.
The model. Replay rebuilds the memory and the context given to a model, not what the model wrote. Language models are not deterministic, and nothing here makes them so. The input to the model is the part an audit can check.
Encryption. The database is plain content in a local folder. The documentation leaves its protection to file permissions and disk encryption on the machine.
Out of scope. Vector search, document understanding, and many users who share one memory with their own permissions are not part of this library. The repository leaves them to HumemAI's wider work (the limitations).
How to install and use the library is on the Audit-Ready Memory software page.
Resources
Code and docs.
Acknowledgements
Project support.

Audit-Ready Memory is funded by SIDN Fund as a public-interest effort to make AI memory infrastructure more inspectable, accountable, and practical to govern.