TencentDB Agent Memory:腾讯云开源的团队级 Agent 记忆系统

TencentDB Agent Memory: Tencent Cloud's Open-Source Team-Level Agent Memory System

Tech-News #Agent记忆#腾讯云#符号记忆#长期记忆#AgentMemory#LLM优化#Mycelium
更新于
🇨🇳 中文

by Mycelium Protocol


AI Agent 记忆系统的主流做法是把所有历史塞进向量库,检索时做相似度搜索。这个方案的问题是:检索是无方向的碎片堆砌,没有宏观结构,越用越慢,越用越贵。

TencentDB Agent Memory 的团队选择了两个不同的方向:符号化短期记忆分层长期记忆

GitHub: https://github.com/TencentCloud/TencentDB-Agent-Memory | ⭐ 17,960 | TypeScript


核心指标

集成 OpenClaw 后,在连续长会话测试中的结果(非孤立对话轮次):

能力基准接入前接入后提升
短期记忆 - WideSearch 成功率-33%50%+51.52%
短期记忆 - WideSearch token-221.31M85.64M−61.38%
短期记忆 - SWE-bench 成功率50 连续任务/session58.4%64.2%+9.93%
长期记忆 - PersonaMem 准确率-48%76%+59%

符号短期记忆:用 Mermaid 图替代 verbose 日志

长任务中 token 消耗最大的来源是中间过程的冗长日志(搜索结果、代码、错误堆栈)。传统方案要么堆满 context,要么做不可逆的截断摘要。

TencentDB Agent Memory 的做法:

graph LR
    Log["冗长日志 (数十万 token)"] -->|"1. 外卸全文"| FS[("外部文件 refs/*.md")]
    Log -->|"2. 提取关系"| MMD["Mermaid 状态画布 (含 node_id)"]
    
    MMD -->|"3. 轻注入"| Agent(("Agent Context (几百 token)"))
    Agent -. "4. 按 node_id 召回" .-> FS
  • 上下文外卸:完整工具日志存到外部文件 refs/*.md
  • Mermaid 状态图:任务状态用高密度 Mermaid 语法编码,LLM 能解析,人也能读
  • node_id 溯源:Agent 在符号图上推理,需要细节时用 node_id 直接拉取原始文本
  • 无损可回溯:压缩不是丢弃,每一层都保留完整的下钻路径

分层长期记忆:L0 → L3 语义金字塔

传统平铺向量库在语义金字塔的问题:碎片没有方向,每次检索都是全局盲搜。

TencentDB Agent Memory 的四层结构:

层级名称内容存储形式
L0Conversation原始对话记录数据库(全文检索)
L1Atom原子事实提取数据库(精确检索)
L2Scenario场景块(工作流 SOP)数据库 + Markdown
L3Persona用户画像和偏好Markdown(高密度)

日常对话只读取 L3 Persona(几百 token),需要细节时逐层向下钻取,完全不必要的信息不进 context。技能生成同样走这条路:从 L0 执行轨迹 → 提炼 L2 通用解法模式 → 生成 L3 可复用技能或 SOP。


快速接入

OpenClaw:

openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
openclaw gateway restart

升级:

openclaw plugins update @tencentdb-agent-memory/memory-tencentdb

Hermes Gateway:参考仓库文档中的 Hermes 集成说明,同样是插件式接入。

接入后零配置启用,系统自动开始积累记忆;可以在 ~/.tencentdb-agent-memory/ 查看和管理记忆文件。


设计理念

Memory is not about hoarding everything in the AI — it is about sparing humans from having to repeat themselves.

现实中,我们一遍遍向 Agent 重新解释同样的 SOP、项目背景、工具惯例和输出格式。TencentDB Agent Memory 的目标是让 Agent 学会工作流,保留任务上下文,复用历史经验——既不强行堆满 context,也不做不可逆的有损压缩。


Mycelium Protocol — 追踪 AI 系统的底层演化


关于 Mycelium

菌丝协议。持续追踪 AI 工具、系统和实验的内容节点。


🇬🇧 English

TencentDB Agent Memory: TencentCloud’s Team-Level Agent Memory System

by Mycelium Protocol


The mainstream approach to AI agent memory is to push all history into a vector store and run similarity search at retrieval time. The problem: retrieval is a directionless fragment pile — no macro structure, getting slower and more expensive with use.

TencentDB Agent Memory’s team chose two different directions: symbolic short-term memory and layered long-term memory.

GitHub: https://github.com/TencentCloud/TencentDB-Agent-Memory | ⭐ 17,960 | TypeScript


Core Metrics

Results measured over continuous long-horizon sessions (not isolated turns) after OpenClaw integration:

CapabilityBeforeAfterΔ
WideSearch task success rate33%50%+51.52%
WideSearch token usage221.31M85.64M−61.38%
SWE-bench success (50 tasks/session)58.4%64.2%+9.93%
PersonaMem accuracy48%76%+59%

Symbolic Short-Term Memory: Mermaid Canvas over Verbose Logs

The largest token consumer in long tasks is verbose intermediate logs (search results, code, error traces). Traditional approaches either overflow context or make irreversible lossy summaries.

TencentDB Agent Memory’s approach:

  1. History offloading: full tool logs written to external files (refs/*.md)
  2. Mermaid state canvas: task state encoded in compact Mermaid syntax — LLM-parseable and human-readable
  3. node_id tracing: agent reasons over the symbol graph; to verify a detail, greps for the node_id and retrieves the full raw text
  4. Lossless recoverability: compression is not deletion — every layer preserves a complete drill-down path

Layered Long-Term Memory: L0–L3 Semantic Pyramid

LayerNameContentStorage
L0ConversationRaw dialogueDatabase (full-text search)
L1AtomAtomic factsDatabase (exact search)
L2ScenarioScene blocks / SOPsDatabase + Markdown
L3PersonaUser profile and preferencesMarkdown (high density)

Normal conversations only read L3 Persona (hundreds of tokens); details are retrieved by drilling down layer by layer. Only necessary information enters context. Skill generation follows the same path: L0 execution traces → L2 common solution patterns → L3 reusable skills or SOPs.


Quick Start

OpenClaw:

openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
openclaw gateway restart

Hermes Gateway: See the Hermes integration docs in the repository — same plugin-based approach.

Zero-config after install — the system starts accumulating memory automatically.


Design Philosophy

Memory is not about hoarding everything in the AI — it is about sparing humans from having to repeat themselves.

In practice, we constantly re-explain the same SOPs, project background, tool conventions, and output formats to agents. TencentDB Agent Memory’s goal is to let agents learn workflows, retain task context, and reuse past experience — without brute-force context stuffing or irreversible lossy compression.


Mycelium Protocol — tracking the deep evolution of AI systems

© 2026 Mycelium Protocol. All rights reserved.

💬 评论与讨论

使用 GitHub 账号登录后发表评论

关于本站 · 免责声明

🍄 Mushroom Research Blog 是非营利、免费公开的个人科技观察博客与公众号 XStack18,不接受商业合作、不代表任何企业或机构立场,也不谋求商业利益。我们以个人视角客观中立地记录和分析 AI、Web3 等领域的最新模型发布与技术动态——不止转述新闻标题或二手信息,而是给出有独立思考的深入分析,希望帮更多人获得有价值的一手科技认知。

⚠️ 文中介绍的开源代码与模型,仅供学习交流与技术借鉴。它们大多仍处于早期阶段,有待进一步研究和验证,请勿直接用于工作或生产环境;如需采用,请先自行充分测试,并核实其许可证与安全性。
Open-source code and models featured here are shared for learning and reference only. Most are early-stage and still need further study and verification — please don't use them directly in your work or in production. Test them thoroughly and check their licenses and security first.

  1. 本站文章均为作者基于公开信息的个人研究与观点整理,不代表文中提及的任何公司、产品、模型的官方立场,未与其构成商业关联或合作关系。
  2. 科技行业信息更新极快,我们尽力保证内容准确、及时,但不对完整性、实时性做绝对保证,具体请以相关企业/项目官方公告为准。
  3. 文中引用的第三方商标、产品名称、图片、数据等版权归原权利人所有,我们会尽量注明来源;如你认为存在版权疑问或侵权,请通过下方邮箱联系我们,收到通知后会尽快核实处理(更正、加注来源或删除)。
  4. 文章内容仅为技术科普与个人观点,不构成投资、法律或其他专业建议,据此进行任何决策的后果需自行判断和承担。

📮 侵权 / 勘误 / 合作咨询:[email protected]