# I Built Memory for AI Agents. Then I Realized I Am the Fly.

> Source: <https://dev.to/constant_itis/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly-50g8>
> Published: 2026-09-16 23:26:14+00:00

I have too many projects.

Not in the cute productivity-guru way where somebody has three Notion boards and calls themselves a serial entrepreneur.

I mean I will spend three days buried in some absurd technical rabbit hole, get pulled away by normal human life, come back four days later, stare at the terminal, and think:

**What the f*ck was I doing?**

Not just *what command was I about to run.*

Why did I choose this architecture?

What did I already test?

Which idea looked good at first and turned out to be bullshit?

What weird edge case did I discover at 2:17 in the morning that completely changed the direction of the project?

That stuff disappears fast.

And AI agents have the exact same problem, except worse.

So I built [Mycelium](https://github.com/constant-itis/mycelium-memory).

The original idea was pretty straightforward: give agents persistent associative memory so a project doesn't effectively die every time the context window rolls over, the model changes, or a new session starts.

I wanted an agent to be able to come back into a project and not act like it had just been dropped into a stranger's codebase with a sticky note that says:

good luck

Over time, though, something weird happened.

I started realizing Mycelium wasn't just keeping the agents oriented.

It was keeping **me** oriented.

I could disappear from a project.

Deal with my kid. Work on a website. Fix something in the house. Go down an entirely different rabbit hole. Sleep. Forget half of what had been occupying my brain.

Then come back.

The system would start pulling up the important stuff.

Not just a transcript.

The decisions.

The dead ends.

The weird connections.

The reasons behind things.

The thing we deliberately didn't build.

The experiment that was supposed to happen next.

And after a little while, I would feel myself sort of... snap back into the project.

That is difficult to explain until you experience it.

Normally, interruption has a cost.

The deeper the work is, the worse the cost gets.

If you're writing CSS, maybe you come back and figure it out in five minutes.

If you're six layers deep in some architecture involving memory graphs, neural simulation, behavioral experiments, agent state, provenance, and a bunch of decisions that only made sense because of the twenty decisions before them, "just pick it back up" is not really a thing.

There is a reconstruction cost.

Sometimes that reconstruction cost is high enough that you just don't go back.

I think that is why a lot of strange personal projects die.

Not because they were bad ideas.

Not because people lost interest.

The mental state required to continue them expired.

Mycelium quietly changed that for me.

It made deep work **interruptible without making it disposable**.

And I did not really understand how important that was until I started working on a completely different experiment involving a fucking fly.

I am currently messing with this research project that, stated very loosely, asks a weird question:

Can something useful about a learned state exist outside the neural substrate that originally learned it, and later be pushed back into another compatible system in a way that changes behavior?

That sentence makes it sound much more respectable than the actual experience of working on it.

The actual experience is mostly me staring at fruit-fly neural circuitry and saying things like:

**what the fuck**

for several hours.

The project is intentionally trying to be strict about the distinction between memory and action.

The external memory is not supposed to say:

do this

It is supposed to reintroduce some learned bias or disposition into the system, and then the neural system itself has to resolve what happens next.

The memory influences the state.

The substrate still does the work.

That distinction matters.

And one night I was sitting there thinking about it when something in my brain connected two things that had been sitting next to each other for weeks.

Mycelium does not actually do my thinking for me.

It gives me back enough of the state surrounding my previous thinking that **I can become the thing that was thinking about the problem again.**

It doesn't execute the next step.

It reminds me why the next step exists.

It doesn't contain the project.

It changes the state I am in when I return to the project.

And apparently the only reasonable response my brain could produce to this realization was:

This was very exciting at approximately whatever stupid hour of the night this happened.

To be clear, I am not literally claiming that my Postgres-backed memory system and a biological nervous system are the same thing.

I have not uploaded my consciousness.

I am not storing my soul in a graph database.

I am also, as far as I can tell, not a fruit fly.

The interesting part was the structural rhyme.

I had spent all this time thinking about external memory as infrastructure for AI agents.

Then I spent all this time thinking about externalized memory in a neural experiment.

And somehow I had failed to notice that I was already living inside a crude version of the same idea.

My active state disappears.

Some consequences of that state survive externally.

Later, they get reinstated.

Then the active system starts running again under the influence of what came before.

In the fly experiment, I am trying to make that idea measurable and brutally constrained.

In my own life, it is messy, subjective, high-bandwidth, full of language, and completely confounded by the fact that I am still the same idiot returning to the keyboard.

So no, **I am the fly** is not a scientific result.

It was an a-ha moment.

But it changed the way I think about the thing I built.

The assumption behind persistent agent memory is usually that the agent has a problem.

The model forgets.

The context window ends.

The session gets replaced.

The next agent doesn't know what the previous one discovered.

So we externalize state.

That is true.

But humans have a version of this problem too.

Our context windows are just made out of exhaustion, work, kids, stress, sleep, errands, distractions, and the fact that brains are apparently expected to remember why a design decision made perfect sense eleven days ago.

I used to think one of my weaknesses was that I would get extremely deep into something and then lose the thread when life interrupted it.

Now I am starting to wonder whether that is the wrong model.

Maybe the problem is expecting a biological working-memory system to provide durable continuity across every domain of your life in the first place.

We already externalize memory constantly.

Notes.

Calendars.

Bookmarks.

Source control.

Documentation.

Photos.

Journals.

The difference, for me, is that an associative memory system can start preserving **relationships between the fragments**.

Not just:

here is something you wrote.

But:

this mattered because of that.

this decision killed that branch.

this idea is related to this other project you haven't touched in three months.

you already learned this lesson once.

That last one is particularly useful.

Apparently I enjoy learning the same painful lesson multiple times unless a database physically intervenes.

The strangest consequence is that I have started thinking less in terms of an AI assistant.

The useful system is closer to:

**me + agents + persistent memory + project history**

as one long-running process.

Different models can come and go.

Sessions can die.

I can get distracted.

I can stop thinking about something entirely.

The continuity doesn't have to live inside any one participant.

That feels important.

Not because it means I built a second brain.

I didn't.

But I may have accidentally built infrastructure that allows my first brain to stop pretending it has to hold everything at once.

And that changes the kinds of things I am willing to work on.

Some of my projects are stupidly ambitious for one person.

I know that.

Without persistent state, I probably would have abandoned half of them.

Not because I decided they were bad.

Because I would eventually lose enough context that re-entering the problem became more painful than chasing the next idea.

Now I can park something.

Actually park it.

Not "save three tabs and pray."

I can leave enough structure behind that future-me has a fighting chance.

That is much closer to what Mycelium has become for me than "AI memory."

It is **continuity infrastructure**.

I built it because the machines kept forgetting what we were doing.

Then one night, while trying to figure out whether a learned effect could survive outside the thing that learned it, I finally noticed the obvious:

So do I.

**I am the fucking fly.**

*Mycelium is open source. Clone it, break it, tell me where it falls over:*

**Persistent memory for LLM CLIs that behaves like a brain instead of a database.**

Things you reference stay strong. Things you ignore fade. Similar ideas link themselves through use. The shape of your knowledge emerges from how you actually work. You don't curate folders or maintain an index.

Single-process MCP server, SQLite + FTS5, zero external services. Works with Claude Code, Claude Desktop, Codex CLI, or any MCP-speaking client. They can all share the same memory store.
