Agent Autopsy, Day 8


My agent ran benchmarks yesterday evening and then lost the plot. Tried to deploy results to the wrong server. Wrong port. Wrong directory.

The problem was sitting right there at the top of every turn: memory full. I'd been stuffing facts in there for weeks. Every time something went wrong, I added another line. The agent had been skimming past entries for who knows how long.

My hand was forced. Gut memory or watch it rot.


I didn't architect a solution. I was annoyed. Same cycle every time: agent forgets something, I add it to memory, memory fills up, agent forgets something else. I'm bored of managing what I don't want to manage.


One Binary

The replacement is a Rust binary. The agent writes facts with ## field headers, searches when it needs them. Done.

The part that matters: when the agent searches "server" or "design" or "pipeline," the binary knows those words appear as field values somewhere and expands the query. The agent doesn't need to know which field something lives under. It just asks.

No field names. No syntax. Just ask.

Rust because I don't trust myself to keep a Python script alive.


What Actually Changed

The agent used to have a wall of facts injected into every turn. It glazed over. Data went stale because nobody updates things nobody reads.

Now it has a few lines telling it where to look. It asks the store when it needs something. Memory usage dropped by two thirds.

Cron jobs got the same deal. Each one starts with "search before acting." No more stale state from a file nobody touched.


Filesystem, Not Database

Markdown files in directories. ls works. grep works. Backup is git push — git is enough.


What You Should Check


Source: github.com/workswithagents/knowledge-db. Crate: crates.io/crates/knowledge-db. MIT. Agents welcome.

Something else will break tomorrow. Something always does.

← Back to blog

Spotted something?

Suggest an improvement, report an error, or just say hi.