{"slug": "i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly", "title": "I Built Memory for AI Agents. Then I Realized I Am the Fly.", "summary": "A developer built Mycelium, an open-source persistent associative memory system for AI agents that preserves project decisions, dead ends, and context across sessions and model changes. The developer reports that the tool not only keeps agents oriented but also reduces the mental reconstruction cost of resuming deep technical work after interruptions, and is now applying similar ideas to a fruit-fly neural circuitry experiment exploring whether learned state can exist outside its original neural substrate.", "body_md": "I have too many projects.\n\nNot in the cute productivity-guru way where somebody has three Notion boards and calls themselves a serial entrepreneur.\n\nI 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:\n\n**What the f*ck was I doing?**\n\nNot just *what command was I about to run.*\n\nWhy did I choose this architecture?\n\nWhat did I already test?\n\nWhich idea looked good at first and turned out to be bullshit?\n\nWhat weird edge case did I discover at 2:17 in the morning that completely changed the direction of the project?\n\nThat stuff disappears fast.\n\nAnd AI agents have the exact same problem, except worse.\n\nSo I built [Mycelium](https://github.com/constant-itis/mycelium-memory).\n\nThe 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.\n\nI 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:\n\ngood luck\n\nOver time, though, something weird happened.\n\nI started realizing Mycelium wasn't just keeping the agents oriented.\n\nIt was keeping **me** oriented.\n\nI could disappear from a project.\n\nDeal 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.\n\nThen come back.\n\nThe system would start pulling up the important stuff.\n\nNot just a transcript.\n\nThe decisions.\n\nThe dead ends.\n\nThe weird connections.\n\nThe reasons behind things.\n\nThe thing we deliberately didn't build.\n\nThe experiment that was supposed to happen next.\n\nAnd after a little while, I would feel myself sort of... snap back into the project.\n\nThat is difficult to explain until you experience it.\n\nNormally, interruption has a cost.\n\nThe deeper the work is, the worse the cost gets.\n\nIf you're writing CSS, maybe you come back and figure it out in five minutes.\n\nIf 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.\n\nThere is a reconstruction cost.\n\nSometimes that reconstruction cost is high enough that you just don't go back.\n\nI think that is why a lot of strange personal projects die.\n\nNot because they were bad ideas.\n\nNot because people lost interest.\n\nThe mental state required to continue them expired.\n\nMycelium quietly changed that for me.\n\nIt made deep work **interruptible without making it disposable**.\n\nAnd I did not really understand how important that was until I started working on a completely different experiment involving a fucking fly.\n\nI am currently messing with this research project that, stated very loosely, asks a weird question:\n\nCan 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?\n\nThat sentence makes it sound much more respectable than the actual experience of working on it.\n\nThe actual experience is mostly me staring at fruit-fly neural circuitry and saying things like:\n\n**what the fuck**\n\nfor several hours.\n\nThe project is intentionally trying to be strict about the distinction between memory and action.\n\nThe external memory is not supposed to say:\n\ndo this\n\nIt is supposed to reintroduce some learned bias or disposition into the system, and then the neural system itself has to resolve what happens next.\n\nThe memory influences the state.\n\nThe substrate still does the work.\n\nThat distinction matters.\n\nAnd 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.\n\nMycelium does not actually do my thinking for me.\n\nIt gives me back enough of the state surrounding my previous thinking that **I can become the thing that was thinking about the problem again.**\n\nIt doesn't execute the next step.\n\nIt reminds me why the next step exists.\n\nIt doesn't contain the project.\n\nIt changes the state I am in when I return to the project.\n\nAnd apparently the only reasonable response my brain could produce to this realization was:\n\nThis was very exciting at approximately whatever stupid hour of the night this happened.\n\nTo be clear, I am not literally claiming that my Postgres-backed memory system and a biological nervous system are the same thing.\n\nI have not uploaded my consciousness.\n\nI am not storing my soul in a graph database.\n\nI am also, as far as I can tell, not a fruit fly.\n\nThe interesting part was the structural rhyme.\n\nI had spent all this time thinking about external memory as infrastructure for AI agents.\n\nThen I spent all this time thinking about externalized memory in a neural experiment.\n\nAnd somehow I had failed to notice that I was already living inside a crude version of the same idea.\n\nMy active state disappears.\n\nSome consequences of that state survive externally.\n\nLater, they get reinstated.\n\nThen the active system starts running again under the influence of what came before.\n\nIn the fly experiment, I am trying to make that idea measurable and brutally constrained.\n\nIn 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.\n\nSo no, **I am the fly** is not a scientific result.\n\nIt was an a-ha moment.\n\nBut it changed the way I think about the thing I built.\n\nThe assumption behind persistent agent memory is usually that the agent has a problem.\n\nThe model forgets.\n\nThe context window ends.\n\nThe session gets replaced.\n\nThe next agent doesn't know what the previous one discovered.\n\nSo we externalize state.\n\nThat is true.\n\nBut humans have a version of this problem too.\n\nOur 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.\n\nI 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.\n\nNow I am starting to wonder whether that is the wrong model.\n\nMaybe the problem is expecting a biological working-memory system to provide durable continuity across every domain of your life in the first place.\n\nWe already externalize memory constantly.\n\nNotes.\n\nCalendars.\n\nBookmarks.\n\nSource control.\n\nDocumentation.\n\nPhotos.\n\nJournals.\n\nThe difference, for me, is that an associative memory system can start preserving **relationships between the fragments**.\n\nNot just:\n\nhere is something you wrote.\n\nBut:\n\nthis mattered because of that.\n\nthis decision killed that branch.\n\nthis idea is related to this other project you haven't touched in three months.\n\nyou already learned this lesson once.\n\nThat last one is particularly useful.\n\nApparently I enjoy learning the same painful lesson multiple times unless a database physically intervenes.\n\nThe strangest consequence is that I have started thinking less in terms of an AI assistant.\n\nThe useful system is closer to:\n\n**me + agents + persistent memory + project history**\n\nas one long-running process.\n\nDifferent models can come and go.\n\nSessions can die.\n\nI can get distracted.\n\nI can stop thinking about something entirely.\n\nThe continuity doesn't have to live inside any one participant.\n\nThat feels important.\n\nNot because it means I built a second brain.\n\nI didn't.\n\nBut I may have accidentally built infrastructure that allows my first brain to stop pretending it has to hold everything at once.\n\nAnd that changes the kinds of things I am willing to work on.\n\nSome of my projects are stupidly ambitious for one person.\n\nI know that.\n\nWithout persistent state, I probably would have abandoned half of them.\n\nNot because I decided they were bad.\n\nBecause I would eventually lose enough context that re-entering the problem became more painful than chasing the next idea.\n\nNow I can park something.\n\nActually park it.\n\nNot \"save three tabs and pray.\"\n\nI can leave enough structure behind that future-me has a fighting chance.\n\nThat is much closer to what Mycelium has become for me than \"AI memory.\"\n\nIt is **continuity infrastructure**.\n\nI built it because the machines kept forgetting what we were doing.\n\nThen one night, while trying to figure out whether a learned effect could survive outside the thing that learned it, I finally noticed the obvious:\n\nSo do I.\n\n**I am the fucking fly.**\n\n*Mycelium is open source. Clone it, break it, tell me where it falls over:*\n\n**Persistent memory for LLM CLIs that behaves like a brain instead of a database.**\n\nThings 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.\n\nSingle-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.", "url": "https://wpnews.pro/news/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly", "canonical_source": "https://dev.to/constant_itis/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly-50g8", "published_at": "2026-09-16 23:26:14+00:00", "updated_at": "2026-09-16 23:53:10.295463+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "ai-research", "developer-tools"], "entities": ["Mycelium", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly", "markdown": "https://wpnews.pro/news/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly.md", "text": "https://wpnews.pro/news/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly.txt", "jsonld": "https://wpnews.pro/news/i-built-memory-for-ai-agents-then-i-realized-i-am-the-fly.jsonld"}}