我逆向工程了三个最大的代理记忆工具。
2 分•作者: pauliusztin•3 个月前
我花了数周时间研究 Cognee、Graphiti 和 Neo4j 的 `agent-memory` 如何构建它们的代理记忆架构。它们都采用了相同的重型知识图谱设计:本体、LLM 提取管道、去重等。
我非常想将它们用于个人用途,但这看起来是一个非常笨重的设置,会增加很多阻碍和孤岛。而且,感觉我的数据被困在他们的服务中,价值却不高。
这就是为什么我的“长期记忆”仍然存在于 Obsidian、Readwise 和 Google Drive 中,而代理的记忆则是每个项目的 LLM Wiki。没有基础设施。我对此很满意。
它们将记忆作为产品提供,在我看来,在个人或小型规模上,这是过度设计了。你可以通过 LLM Wiki 记忆中的普通 `.md` 文件来构建相同的“知识图谱”体验。
但即便如此,图谱仍然很强大,所以我将 Cognee、Graphiti 和 Neo4j `agent-memory` 堆栈的相同架构应用于构建一个数据挖掘工具,只使用了 MongoDB、VoyageAI 和 Gemini Flash。但我将其范围限定在一个非常具体的问题和本体领域,以避免知识图谱的噪音。
另一方面,如果你想在中大型规模上发布产品,那么开始使用 Neo4j、Zep 或 HydraDB 这样的庞然大物是有意义的。
但我很好奇:你的长期记忆设置是什么?Obsidian + LLM Wiki 还是 Cognee/Graphiti/Zep?你实际上使用 Cognee 或 Zep 这样的工具吗?
如果你好奇 Cognee、Graphiti 和 Neo4j 的 `agent-memory` 在底层是如何工作的,我在这里写了一个完整的分解:https://www.decodingai.com/p/unified-memory-from-scratch-knowledge-graphs
查看原文
I spent weeks reading about how Cognee, Graphiti, and Neo4j's `agent-memory` build their agent memory architectures. They converged on the same heavy knowledge-graph design: an ontology, LLM extraction pipelines, deduplication, the works.<p>I really wanted to use them for my personal use case, but that looks like such a heavy setup that adds a lot of friction and silos. Plus, it feels like I just get my data trapped in their service, for not a ton of value.<p>That's why my "long-term memory" still lives in Obsidian, Readwise, and Google Drive, with per-project LLM wikis as the agent's memory. No infrastructure. And I'm fine with it.<p>They ship memory as a product, which, in my opinion, at a personal or small scale, is overkill. You can build the same "knowledge graph" experience via plain old `.md` files within an LLM wiki memory.<p>But still, graphs are strong, so I adapted the same architecture from the Cognee, Graphiti, and Neo4j `agent-memory` stacks to build a data-mining tool with just MongoDB, VoyageAI, and Gemini Flash. But I scoped it to a very particular problem and ontology domain to avoid the KG noise.<p>On the other end of the spectrum, if you want to ship a product at medium-to-large scale, it makes sense to start using monsters such as Neo4j, Zep, or HydraDB.<p>But I am curious: what is your long-term memory setup? Obsidian + LLM wikis vs. Cognee/Graphiti/Zep? Do you actually use tools such as Cognee or Zep?<p>In case you are curious about how Cognee, Graphiti, and Neo4j's `agent-memory` work under the hood, I wrote a full breakdown here: https://www.decodingai.com/p/unified-memory-from-scratch-knowledge-graphs