Open source · Prompt & Agent Workflows

Agent Memory Retention Auditor

Audit memory retention, expiry and deletion behavior for agent sessions.

v0.1.0 · Node.js 22+ · MIT

Browse the public repository · View releases

Audit a local memory and session inventory against its retention and access policy, produce a deletion plan, and verify the deletion evidence supplied for records the inventory says are already gone.

This walkthrough uses the tool's public README and checked-in example files. Run the command from a repository checkout with Node.js 22+; inspect the source before using it on your own files.

Run the checked-in example

npm run example                                                            # exit 0
node bin/memory-retention-auditor.mjs --root examples/held --today 2026-09-14         # exit 0
node bin/memory-retention-auditor.mjs --root examples/unevidenced --today 2026-09-14  # exit 1
node bin/memory-retention-auditor.mjs --root examples/incomplete --today 2026-09-14   # exit 2

Read the result

Every record gets a plan row, and the rows with disposition delete — and only those — become the deletion plan.

Where this check stops

Every limit is enforced and named when it is reached, and exceeding one makes the run incomplete rather than truncating silently — the plan that came out of a partial walk would be a list of things to destroy chosen by where the walk stopped. The defaults and their caps are in docs/retention-rules.md.

Before adapting the command to your own workflow, review the accepted inputs, exit codes and safety boundaries in the README.

Compiled with AI assistance from checked-in public documentation and example scripts. Run the example and review the repository's current documentation before relying on its result.