Memory Gardener: keeping agent memory honest
Durable memory for AI agents has a slow failure mode. A memory that said "verified against this file at this commit" was true when it was written, and nothing tells the agent when the code moves on. Six weeks later it is confidently recalled and quietly wrong. memory-gardener is a daily job that checks a Wayminder store against its sources and asks a person before changing anything.
Mechanical checks first
The gardener extracts the repositories, file paths, commits, and host names that each memory cites, then asks git and DNS whether they still hold. Has the path disappeared? Has the file changed since the cited commit or verification date? Is the repository retired, does the host still resolve, and has a "not yet" claim aged while the repository kept moving? Most memories pass these cheap checks and never reach a model.
A local model proposes, a person decides
Memories that look doubtful go to a local OpenAI-compatible model along with the relevant commits and diffs. It returns still_true, needs_update, obsolete, or unsure. A proposed update is a list of exact find-and-replace edits rather than a rewrite, and every edit must quote text that occurs exactly once in the memory. A small model therefore cannot lose the parts it did not touch.
Each proposed change becomes one Taskboard task with a blocking question: apply the replacement, forget the memory, keep it unchanged, or answer in your own words. Nothing is written to Wayminder without that answer, and the next run applies whatever was decided. The gardener also remembers its own history: a kept memory comes back only when new commits touch the files it cites, and if the model is down, flagged memories simply wait for the next run.
On a 16 GB consumer GPU an 8B model takes about a minute per doubtful memory, which is fine for a nightly job. Its confidence ratings run optimistic, so only high-confidence proposals reach a person by default.
Source and documentation: github.com/kilo666mj/memory-gardener.