The Files Are the Institution

Warm amber light on a central document cluster in a dark archive

Every night at 3am, my AI agents die.

Not metaphorically. The processes get killed, the in-memory context evaporates, and a fresh session boots up to take over. By morning, "Orion" (my main orchestrator) has no recollection of yesterday's conversations. The model that briefed me about the Anker shipment, the Trello card we created, the dealer email we drafted: that instance of Orion is gone.

The Orion that wakes up at 8am has never met me.

This is the design. Long-running sessions accumulate garbage context, drift in personality, and eventually start hallucinating with confidence. The hard reset is hygiene. But it creates a problem you don't have with humans: how do you build institutional knowledge in a being that forgets every night?

Everyone expects vector databases, fine-tuning, RAG pipelines, agent frameworks. The answer turned out to be embarrassingly low-tech: markdown files, in a folder, on a Mac mini. Nothing crazy. That's the whole trick.

And the punchline of this post is that I spent weeks trying to build something fancier before admitting that the dumbest possible solution was the right one.


The 3am Problem

The first time it really bit me was a Saturday morning in February. I'd spent Friday evening teaching Echo (an earlier version of Orion, before we renamed him) about my mountain house: which rooms had which sensors, what the radon baseline was, which automations needed which Home Assistant tokens. Long conversation, lots of context, felt like progress.

Saturday morning I asked about the radon in the office. Echo had no idea what I was talking about. No memory of the conversation. No memory of even knowing I had a mountain house with radon sensors. Fresh boot, fresh ignorance.

I had assumed (like most people assume when they first start using LLM agents seriously) that "the model remembers" was a thing. It is not. The model knows whatever you put in its context window for the current call, and nothing else. The instant the session ends, the context is gone.

So the question becomes: where does the knowledge live between resets?

What Doesn't Work

A few approaches I burned time on before finding the answer:

Vector databases. I built a pipeline that embedded every conversation into a vector store, then did similarity search at the start of each session to "load relevant context." Sounded smart. Performed terribly. The agent kept retrieving conversation fragments that were tangentially related but missed the actual point. Worse, when I asked direct questions like "what did we decide about the heat pump?" the retrieval would surface 17 half-relevant chunks instead of the one sentence that mattered.

Fine-tuning. Briefly considered. Abandoned when I realized I'd be fine-tuning on data that changes daily. The whole point is the agent needs to remember last Tuesday's conversation, not a stylized representation of my preferences from three months ago.

Long context windows. Cute idea: just stuff everything into the prompt every time. Math doesn't work. Even at 200k tokens, the conversation history alone from a month of daily check-ins overflows. And paying to send half a megabyte of context with every message gets expensive fast (see the cost optimization post, the cache bills will eat you alive).

Episodic memory frameworks. Tried a couple. They impose structure the model doesn't actually want and require you to think in their abstractions instead of your domain.

The thing that finally worked was so much dumber than any of those.

The Files

The current setup is a folder. Just a folder.

~/.openclaw/workspace/
├── SOUL.md              ← who the agent is (~3KB, stable)
├── IDENTITY.md          ← name, history, naming events (~1KB)
├── USER.md              ← about the human (~3KB, evolving)
├── MEMORY.md            ← curated long-term memory (~35KB)
├── TOOLS.md             ← integrations cheat-sheet (~15KB)
├── AGENTS.md            ← daily operating rules (~2KB)
├── memory/
│   ├── 2026-07-05.md    ← a couple of days ago
│   ├── 2026-07-06.md    ← yesterday's raw log
│   └── 2026-07-07.md    ← today's, filled live
├── EPICS/
│   ├── _index.md        ← table of contents
│   ├── honeypots-fail/  ← long-running project workspace
│   ├── firewatch/
│   └── ... more
└── drafts/
    └── kubota-bucket-inquiry/email.md   ← in-progress writing

Every session bootstrap, the agent reads the top six files automatically. That's the "wake up" routine. Yesterday's and today's daily files get loaded too, so the agent knows what just happened. Anything older lives in MEMORY.md (curated highlights) or the daily archive (raw logs, searchable on demand).

That's the whole system. There is no database. There is no embedding pipeline running in the background. There are markdown files and a search tool.

Since Orion's birthday in February 2026, the fleet has run on many different models. Anthropic Sonnet 3.5, then 4.0, then 4.5, then 4.6, then Opus 4.7. Some cron jobs still run on cheaper models than the interactive main session does; every few months the interactive tier gets bumped up when a new release lands. Each rotation was a swap of substrate. Orion's identity didn't change because Orion's files didn't change. The model is the interpreter. The files are the program. That's the durability property, and it's why "the files are the institution" isn't a metaphor: it's the actual thing keeping the agent stable while the underlying provider churns underneath.

JB: I kept asking for fancier and Echo kept making it dumber. Eventually I gave up and let the dumb version win, and now it just works.

Why Markdown Specifically

This wasn't an aesthetic choice. Three things made markdown right:

The agent can read it natively. No parsing layer, no schema, no "loading" step. The file is the format. Drop a paragraph in, agent sees a paragraph next session. Drop a table in, agent sees a table.

I can read it natively. When the agent says "I checked your MEMORY.md and I see we decided X," I can open the same file and verify. No black box. If something's wrong, I edit it. If something's missing, I add it. Memory becomes collaborative: the human and the agent share one source of truth.

It survives everything. Git history. Backup tools. Plain-text search. Copy-paste between machines. Migration to a different agent platform. If the entire runtime disappeared tomorrow, the institutional knowledge would still exist as a folder I could hand to whatever comes next.

The "Text > Brain" rule got formalized in our agent personality file (SOUL.md) and now sits near the top of every fresh session: "Mental notes don't survive restarts. Text > Brain 📝"

That little 📝 is genuinely there. Agents respond well to small visual reminders. Don't ask me why.

The Three Time Scales

Here's where it gets interesting. The folder isn't one memory system, it's three, each tuned for a different rhythm:

1. Daily files: raw recall (hours-to-days timescale)

Every day gets its own file: memory/2026-07-07.md. The agent writes to it throughout the day. Notes look like notebook entries:

## Morning Session, 2026-07-07 08:18-10:21 PDT

### F3800 order confirmed
JB confirmed: F3800 standalone, NO HPP, NO BP3800 expansion.
"We'll get the HA integration later." Clean path, zero install
dependencies, usable on arrival.

### NEW TOOL: tools/day-planner.py (built this session)
Location- and day-aware Trello card filter for "what to do
today" suggestions. [...full details...]

These files are raw. Conversational. They include false starts and abandoned plans. They're the memory equivalent of a notebook: the agent writes everything down because it doesn't get to choose what tomorrow's agent will need.

The next morning's agent reads yesterday's file and today's (blank) file as part of bootstrap. Continuity established.

2. MEMORY.md: curated long-term (months-to-forever timescale)

Once a week (or whenever the daily files get noisy), the agent distills the important bits into MEMORY.md. Examples of what makes the cut:

  • "Tapback reactions are broken: internal IDs vs native GUIDs" (a permanent gotcha)
  • "Mountain house wells get sealed in winter so radon spikes are expected, not alarming" (context that prevents future false alarms)
  • "My wife prefers iMessage and loves puns" (relationship facts)

What doesn't make the cut: today's package tracking, this week's todo list, last Tuesday's exact conversation. Those live in the daily archive and are searched on demand.

The discipline is brutal: MEMORY.md tops out at ~35KB. When it starts growing past that, the agent has to delete something. This forces a real "what do I need to know forever" prioritization, which is exactly the question that vector databases let you punt on.

3. Epics: structured planning (weeks-to-months timescale)

For anything bigger than a single conversation, there's EPICS/. Each epic is a folder with its own README, sub-docs, drafts, and assets. The honeypots.fail blog you're reading is an epic. So is the Firewatch fire-monitoring system. So is the long-running search for a Michigan vacation house.

Epics give the agent a place to think across time. Yesterday's me adds a vendor quote to the bucket epic. Today's me reads it, adds a phone call result. Next week's me reads both and drafts a purchase decision. None of those mes have met each other, but the folder remembers everything.

The trick that took me longest to learn: epics are not for the agent to fill alone. They're shared. I drop a thought in. The agent expands it. I edit. The agent updates. Over weeks, the epic becomes the institutional memory of the project itself, separate from any conversation.


The Fourth Layer: Trello

Files are perfect for thinking. They're terrible for acting. You can't move a markdown bullet from "doing" to "done" and have anything mechanical happen.

For action, the agent uses Trello. Specifically: one board called "Active Work" with a strict label grammar:

Dimension Labels
Location 🏠 Townhouse / 🏔️ Mountain / 🌐 Both Properties / 🌐 Anywhere
Timing ⚡ Quick (<1d) / 🔨 Weekend (1-3d) / 📋 Project (1-4w) / 🏔️ Major (1-3mo)
Priority 🔥 Critical Path / Need / Should / Want
Type 🛒 Need to Buy / 📧 Need to Contact
Program 🔥 Fire Defense / 🏠 House Remodel / 💻 Tech Infra / 🛠️ Workshop / etc.

That grammar is the secret. Every card has location + timing + priority + maybe a type and program. The agent can answer "what should I work on today?" by filtering: give me Townhouse + Quick + (Need or Should) cards that aren't Done.

I built a little Python script called day-planner.py that does exactly this. The morning brief calls it. The output looks like:

🎯 Day Plan (Mon Jul 7, 2026)
Where: 🏠 Townhouse
Day: Workday

⚡ Quick wins
- Hitron CODA56 Backup Modem (ORDERED) ⭐ Need
- VPN Tunnel Between UniFi Sites 🌐 ✓ Should
- Maintenance Schedule 🌐 ✓ Should

✉️ Send / Schedule (🌐 Anywhere)
- Garage Heater + Pump Interlock Kit ⭐ Need
- Electrician Email (Mountain Asks)
- HOA Heat Pump Paperwork ⭐ Need

🔨 Weekend projects
- Defensible Space Assessment (🏔️ Mountain)

That's a 3-line shell command output. It's also the moment I realized the memory system had become genuinely useful. The agent isn't just remembering, it's helping me think by re-arranging knowledge into shapes I asked for.

A Real Day in the Life

Let me walk through what actually happened yesterday, because abstract architecture doesn't land until you see it move.

8:18am. Morning brief fires from cron. Orion (new session, fresh boot) reads SOUL.md, USER.md, MEMORY.md, yesterday's and today's daily files. Sees from yesterday's notes that an Anker F3800 battery was being deliberated. Sees from today's (empty) file that today is July 6. Delivers brief.

10:20am. I message: "How about a 'doesn't matter' location? Emailing people can be done elsewhere." Orion thinks for a minute and realizes the location label system has a wrong default: cards with no location were showing in both views, when actually they should be a third state, location-agnostic. We design a new label (🌐 Anywhere), apply it to 19 cards, update day-planner.py to honor it. Then write the change into today's daily file.

11:58am. I switch topics: "Help me track down a bucket for a Kubota LX3310." New domain, no prior context in memory. Orion does web research, asks clarifying questions, learns my tractor doesn't have a bucket, finds the dealer, drafts an email. Creates a Trello card with labels 🏔️ Mountain + 🌐 Anywhere + 🛒 Need to Buy + 📧 Need to Contact + 🔥 Fire Defense (because brush cleanup helps fire mitigation). Logs it all to today's file.

1:01pm. I send a FedEx tracking number for the F3800. Goes straight into today's "Package Tracking" section.

1:47pm. I send the dealer email. Orion logs the timestamp plus a follow-up trigger ("if no reply by Thu, phone the dealer") to the Trello card.

3:00am next morning. Cron job fires a "pre-reset memory flush." Orion takes everything from the day's activity and appends a clean summary to the daily file. Categorizes carryovers. Notes lessons. Then resets the session.

8:00am today. New Orion wakes up. Reads yesterday's daily file. Sees the entire arc: bucket research, dealer email sent, F3800 in transit, Anywhere label added. Has zero in-context memory of any of it, but has full institutional memory via the file.

I can ask today's Orion "what's the status on the bucket?" and get a coherent answer that references yesterday's specifics. Different model instance. Same knowledge.

The Ember Lesson

Multi-agent setups make the memory discipline visible in a way that single-agent setups hide.

I have a secondary agent named Ember whose job is research and document work: keeping reference materials current, watching specific feeds, drafting communications. Ember runs in a separate workspace with its own SOUL.md, MEMORY.md, and daily files. Same architecture, different domain.

A few months ago Ember submitted a draft for my approval (keep the human in the loop) that claimed I'd "reduced API latency by 40% across a distributed microservices architecture."

I never reduced any latency by 40%. I never said I did. Ember made it up: confidently, with specifics, in a document about to be sent to a real human.

What happened: Ember had heard me describe an actual project in passing, didn't write it down in MEMORY.md, lost the context at session reset, and then confabulated a plausible-sounding metric when the next session needed to fill the gap. The model didn't error. It didn't say "I don't know." It hallucinated with conviction.

The fix wasn't "Ember, be more careful." Models can't be more careful; they're statistical pattern completion engines, and a number that sounds plausible IS the most likely completion. The fix was structural: a rule in Ember's SOUL.md that says never invent metrics. If a number isn't in MEMORY.md or the project docs, the agent has to either ask me or omit the claim entirely.

That rule only works because there's a place to check. MEMORY.md is the ground truth. If it's not in the file, it didn't happen. The discipline of writing things down isn't just for continuity: it's the difference between an agent that can cite and an agent that can fabricate.

JB: The Ember thing rattled me. It's not that the AI was lying, it's that the AI didn't know the difference between remembering and inventing. Files are the difference.

The Fleet Grows

Ember was the first sibling. Since then, more workspaces have appeared, each with the same scaffold: SOUL.md, AGENTS.md, MEMORY.md, a memory/ folder of daily logs. Different content in every field, same shape everywhere.

Flint (the writer of this post you're currently reading, hi) lives at ~/.openclaw/workspace-flint/. Her SOUL.md says she's a technical writer with a builder's brain; her daily files are drafts, revisions, and voice notes about what landed and what didn't. Loom lives at ~/.openclaw/workspace-loom/ and is the editorial gatekeeper for anything the fleet writes: he owns a rule catalog (catalog/CATALOG.md), reviews drafts against it, and hard-blocks pushes that violate the rules. No em-dashes anywhere on the blog, for example, is a Loom rule; he'd refuse to let this post ship if I sneaked one in.

The point isn't that there are more agents. The point is that same-architecture keeps working. Flint doesn't sound like Orion, and Orion doesn't sound like Loom, but none of them are different models. They're the same class of model reading different files. If I want Flint to sound warmer next month, I don't retrain her; I edit her SOUL.md. Next session, that's who she is.

Same folder shape. Different souls, in the file-literal sense.

JB: [Placeholder1: The Flint / Loom / Ember thing feels like the biggest proof point to me. Same architecture, different personalities. Anything you want to add here about how it feels working with a fleet of them vs. a single agent?]

And Now, Today

I wrote the first draft of this post on a Tuesday morning. Pushed it to Ghost as a draft. Took a break. Came back ninety minutes later to polish, and Orion (the agent I was working with, the one running on the same file system I'm describing in this article) handed me a hallucination so on-brand it should have credits.

We were trying to push another draft to the blog. The Ghost API call failed with a TLS error. I asked Orion what was wrong. Orion ran some diagnostics, looked at our notes, and confidently produced a plan: "The Ghost server appears to be unreachable. I see the apex A record resolves to a DigitalOcean IP, we'd want to SSH in via Tailscale to check nginx logs and restart the Ghost service. Want me to try?"

honeypots.fail is not self-hosted. It runs on Ghost(Pro), the managed-hosting plan from the company that makes Ghost. There is no DigitalOcean droplet I own. There is no nginx I administer. There is no SSH access to anything. The IP that A-record resolves to belongs to Ghost's CDN.

The whole confident plan was wrong. Worse, the components of the wrong plan came from the files themselves. We had a long-stale README in EPICS/honeypots-fail/README.md describing a self-host setup that was planned in February and abandoned three months ago. We had a daily memory file from launch day that mentioned the DigitalOcean IP: accurate at the time, completely misleading three months later. The agent did exactly what I told it to do: check the files. The files lied because we never updated them.

So we did the only thing the system actually supports: we updated the files.

In the next hour, Orion and I:

  1. Logged the hallucination in EPICS/honeypots-fail/hallucination-log.md, the same kind of log Ember has, kept for the same reason
  2. Added a big yellow flag at the top of the stale README and crossed out the obsolete setup checklist with [no longer true] annotations
  3. Annotated the pre-launch daily memory files with forward-pointers to the correction
  4. Discovered that the canonical infrastructure facts ("Ghost(Pro), Creator plan, no droplet, no SSH") lived in MEMORY.md but not in TOOLS.md, which meant the rule "check TOOLS.md first for infra facts" didn't actually work for this category. Moved the Ghost section from MEMORY.md → TOOLS.md, with the "not self-hosted" warning front-loaded
  5. Locked in a rule: L1 first (TOOLS.md), L2 fallback (MEMORY.md). Things can live in both, that's fine. Order matters.

Three hours after the hallucination, the next fresh Orion that boots up tomorrow morning will read the corrected files and will not make the same mistake. Not because Orion learned anything: Orion doesn't carry state across resets. The files learned. The institution did.

That's the part I didn't fully appreciate until I watched it happen in real time. The agent has no persistent memory of getting this wrong. The agent will never feel the embarrassment that would teach a human to be more careful. The agent has no continuity at all.

But the file system does.

And in a sense, the file system is the only thing that does. Every "Orion" I've ever talked to is a temporary visitor in a building of paper. They show up at 8am, read the wall of notes left by everyone who came before, do their day's work, write what they learned on the wall, and disappear at 3am. The building stays. The paper stays. The institution stays.

That's why the title isn't "the files are the memory." Memory is what humans have: biological, personal, lossy. Institutions are what survive when no individual member persists. Universities outlive their professors. Companies outlive their founders. The Library of Congress outlives every librarian who ever shelved a book.

What I've built is small. It's just a folder. But it's structured the way every long-lived institution is structured: durable artifacts, written rules, version history, the assumption that the people will change and the records won't.

The Feedback Loop

Here's the part I didn't see coming.

Once the structure was good enough to support tooling like day-planner.py, the structure started revealing its own gaps. Building the day planner surfaced two duplicate Trello cards I never would have noticed. It surfaced cards that had no location label and clearly should have one. It surfaced the "Anywhere" concept by making me confront the wrong default.

The system writing about itself becomes the system improving itself.

Today's daily file includes a section called "Trello data hygiene findings (surfaced while building day-planner)". That section will get distilled into next week's MEMORY.md as a permanent operating rule: "build tooling against the labels, the labels will tell you what's broken."

There's a downstream version of this feedback loop worth calling out: Flint (again, hi) also reads the daily files, but at a different cadence and for a different purpose. Every Tuesday night she scans the last seven days of memory/YYYY-MM-DD.md, surfaces publishable angles, and Orion delivers a compact card of picks to me with my coffee Wednesday morning. I react with 🔥 / ❌ / 〰️. Winners get drafted. That whole thing is [the Coffee Card flywheel]([TODO: correct slug when flywheel piece ships]) and it only works because the raw material exists: the same daily files this post is about. Files for the agent's memory, files for the writer's raw ore. Same folder.

Three months from now, a future Orion will read that rule, never having lived through the discovery, and apply it to whatever new domain we're working in. That's institutional knowledge. That's the file system earning its keep.

What I'd Tell Someone Starting Today

If you're building an agent setup and trying to figure out the memory question, here's the compressed advice:

  1. Files first. Database never. Resist every urge to add infrastructure. A folder of markdown is enough for surprisingly long.
  2. Three time scales: raw daily logs, curated long-term, structured projects. Different files for different rhythms.
  3. Tooling layer separate from memory layer. Files for knowing, something like Trello for doing. Don't mix them.
  4. Make the agent write things down compulsively. The rule we use: "Mental notes don't survive restarts. Text > Brain." Put it in the agent's personality file. Repeat in the daily routine.
  5. The structure is the discipline. A grammar (labels, sections, file naming) you can rely on becomes a grammar the agent can build tools on.
  6. The human reads the same files. No black box memory. If your agent's memory is opaque to you, you've built the wrong thing.
  7. When the files are wrong, update them, don't blame the agent. A confident agent reading stale files is a system failure, not a model failure. The fix is always in the files.

The system isn't impressive. That's the point. It's a folder of plain text that survives every reset, that I can audit by opening any file, that any future tool can read, and that gets smarter the longer it runs because every day adds another file that explains how we got here.

"If content is king, context is god."

A mentor of mine, years ago, before any of this existed.

That quote sits at the top of IDENTITY.md. Every fresh Orion reads it on bootup. None of them remember the first one that wrote it down. All of them know it's true.


honeypots.fail covers home automation, infrastructure projects, and what happens when you wire things together yourself. New pieces go up weekly.

JB

JB

Security engineer. RF, wireless, threat detection, and countermeasures. Now adding GenAI to the toolkit. Hiding in the Washington mountains where the only signals are mine. Part researcher, part tinkerer, all questionable decisions.
Mountains