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

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

我为 AI 智能体构建了记忆,然后我意识到:我才是那只果蝇。

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?

我手头的项目太多了。这可不是那种“生产力大师”式的——那种人弄了三个 Notion 看板就自称连续创业者。我是指,我会花三天时间钻进某个荒谬的技术死胡同,被正常的日常生活拉走,四天后再回来,盯着终端界面心想:我到底在搞什么鬼?

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.

不仅仅是“我刚才要运行什么命令”,而是:我为什么要选这个架构?我已经测试过什么了?哪个想法起初看起来不错,结果却是一堆垃圾?我在凌晨 2:17 发现的那个奇怪的边界情况是什么,以至于彻底改变了项目的方向?这些东西消失得很快。AI 智能体也有完全相同的问题,甚至更严重。

So I built Mycelium. 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.

所以我构建了 Mycelium。最初的想法很简单:为智能体提供持久的关联记忆,这样项目就不会在每次上下文窗口滚动、模型更换或新会话开始时就“死亡”。我希望智能体回到项目中时,不会表现得像刚被扔进陌生人的代码库,还贴着一张写着“祝你好运”的便签。

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.

然而随着时间推移,奇怪的事情发生了。我开始意识到,Mycelium 不仅仅是在引导智能体,它也在引导我。我可以暂时离开一个项目,去照顾孩子、处理网站工作、修理家里的东西、钻进另一个完全不同的死胡同、睡觉、忘掉大脑中一半的内容。然后当我回来时,系统会开始调出那些重要的东西。

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.

通常,中断是有代价的。工作越深入,代价就越大。如果你在写 CSS,也许回来五分钟就能搞定。但如果你正深入到某种架构的第六层,涉及记忆图谱、神经模拟、行为实验、智能体状态、溯源,以及一堆只有在之前二十个决策的基础上才有意义的决定时,“接着干”根本是不可能的。

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.

这存在一个“重构成本”。有时这个重构成本高到让你直接放弃。我认为这就是许多奇怪的个人项目夭折的原因。不是因为想法不好,也不是因为失去了兴趣,而是维持项目所需的心理状态“过期”了。Mycelium 悄悄改变了这一点。它让深度工作变得可中断,而不会让工作成果变得可抛弃。

And I did not really understand how important that was until I started working on a completely different experiment involving a fucking fly. The 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 f*ck 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.

一天晚上,我坐在那儿思考时,大脑中突然将两件并列存在了数周的事情联系了起来。Mycelium 并没有替我思考。它给了我足够多围绕我之前思考的状态,让我能够重新成为那个正在思考该问题的人。它不执行下一步,它提醒我为什么会有下一步。它不包含项目本身,它改变的是我回到项目时所处的状态。

And apparently the only reasonable response my brain could produce to this realization was: I AM THE F*CKING FLY. 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.

显然,我的大脑对这一发现唯一合理的反应就是:我就是那只该死的果蝇。在深夜某个愚蠢的时间点,这让我感到非常兴奋。需要说明的是,我并不是真的声称我的 Postgres 驱动的记忆系统和生物神经系统是同一回事。我没有上传意识,没有把灵魂存储在图数据库里。据我所知,我也不是一只果蝇。

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.

有趣的是这种结构上的“押韵”。我花了这么多时间把外部记忆视为 AI 智能体的基础设施,又花了这么多时间在神经实验中思考外部化记忆。不知何故,我竟然没注意到自己早已生活在这一理念的粗糙版本中。我的活跃状态会消失,该状态的一些后果在外部存活下来,随后被重新植入,接着活跃系统在之前状态的影响下再次运行。

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. I thought I was solving an AI problem. 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…

在果蝇实验中,我试图让这个想法变得可测量且受到严格限制。而在我自己的生活中,它是混乱的、主观的、高带宽的、充满语言的,并且完全被一个事实所困扰:我依然是那个回到键盘前的笨蛋。所以,“我就是那只果蝇”并不是一个科学结论,而是一个顿悟时刻。但它改变了我对自己所构建之物的看法。我原以为我在解决一个 AI 问题。持久化智能体记忆背后的假设通常是:智能体有问题——模型会遗忘,上下文窗口会结束,会话会被替换,下一个智能体不知道上一个发现了什么。所以我们外部化了状态。这没错。但人类也有类似的问题。我们的上下文窗口只是……