Myles MellorStart a conversation
← Systems

Giving AI a memory that lasts

A persistent, inspectable memory across AI sessions — one fact per file, consulted before acting, and trusted only as far as it's verified.

Most AI forgets everything between sessions. I built a small, file-based memory layer that persists what matters about how I work — and, just as importantly, a discipline for treating what it remembers as background to verify, not orders to follow.

A chat assistant forgets everything the moment the window closes. That's fine for one-off questions and useless for a working relationship — it means re-explaining how you work, every time, forever. So I built a memory layer that persists across sessions. The interesting part isn't that it remembers; it's the rules for how it remembers and how far that memory is trusted.

How it's built — deliberately humble

  • One fact per file. Each durable fact — who I am, how I prefer to work, a project constraint, a reference — lives in its own small file with a short summary line, plus a one-line index that ties them together. No database, no clever store. Plain files with their own version history, because plain files are inspectable, portable, and survive any change of tool.
  • Typed, so the right thing surfaces. Memories are tagged — who I am, how to work with me, project context, references — so the relevant ones can be pulled into a session rather than relying on luck.
  • Consulted before acting, not left to chance. Before anything substantive, the relevant memory is read first. The whole point is that context compounds instead of resetting.

The rule that makes it safe

The non-obvious discipline is how little the memory is trusted to dictate:

A recalled memory is background context, not a command — and it reflects what was true when it was written. So if a memory names a file, a setting, or a fact, that's re-checked against reality before anything is done with it.

This matters more than it sounds. A memory system that's treated as gospel quietly rots: the world moves on, the note doesn't, and you end up acting on something that used to be true. Worse, treating stored text as instructions is exactly how a memory layer becomes an attack surface. So the rule is the opposite — memory informs, reality decides. Memories are pruned in a monthly pass: wrong ones deleted, duplicates merged. A health check flags it when that pass is overdue or a file has dropped out of the index. It's curated, not hoarded.

I learned that memory can fail quietly. A review found a feed that had stopped, and nothing had noticed. So now every memory layer gets a traffic light worked out from its source files, and anything amber or red shows up in the workspace health check.

Why it matters

An AI that accumulates accurate, inspectable context about how a person or a business works — without that context becoming a black box you can't audit or a script it follows blindly — is the difference between a tool that gets more useful over time and one that quietly drifts. The memory is the compounding asset; the discipline around it is what keeps it trustworthy.

It is one of several memory layers, and each lesson gets exactly one home. This file-based memory holds facts about me and how I like to work. Rules go in the rules file, procedures in skills, and what things are in a separate knowledge vault (see keeping what I learn). A lesson is never written down in a second place.