Agent Memory Hygiene
Audits agent memory by merging duplicates, verifying or expiring stale facts, resolving contradictions, removing secrets, and refreshing the index.
Latest: v1.0.0
Introduces agent-memory-hygiene 1.0.0, a workflow for keeping long-term memory accurate and organized.
- Adds a recurring audit process to inventory, deduplicate, verify, and re-index memory.
- Defines how to resolve contradictions and handle facts that may have expired.
- Adds safeguards for secrets, commitments, and verbatim user corrections.
- Specifies a hygiene report covering changes, secret counts, and index state.
Agent Memory Hygiene
Overview
Agent memory rots: facts expire, duplicates accumulate, and stale instructions quietly override fresh ones. This workflow audits memory the way you would audit a wiki — every entry needs a source, a date, and a reason to still exist.
When to use
Monthly, after any big project, or whenever the agent cites something that is no longer true.
Workflow
- Inventory — list every memory file/entry with its date and source
- Deduplicate — merge entries that say the same thing; keep the newest source
- Expire — flag facts with natural lifetimes (prices, statuses, deadlines) and verify or delete them
- Resolve contradictions — when two entries disagree, the newer verified one wins and the loser is removed, not annotated forever
- Check for secrets — memory must never contain keys, seeds, passwords, or one-time codes; remove and rotate if found
- Re-index — the summary/index should let a fresh reader find anything in two hops
Guardrails
- Never delete the only record of a commitment or debt without moving it somewhere tracked
- When unsure whether a fact is stale, verify it instead of guessing either way
- Keep the user's corrections verbatim — they outrank any inference
Output format
A hygiene report: entries merged, expired, corrected, secrets found (count only), and the new index state.
Part of the Manteclaw free skill series. These workflow skills are free forever; Manteclaw's paid automation tools (runnable code, not just prompts) live at payhip.com/Manteclaw.
