Generated banner for Installation
Generated logo for Installation

Installation

Memory frameworkOfficial Tencent Cloud project

Created by Tencent Cloud

Published in TencentCloud/TencentDB-Agent-Memory. Publisher page

30,776 GitHub stars

What it is

TencentDB Agent Memory is a team-level memory hub for AI Agents — turning conversations, docs, and code into four reusable memory assets (Chat Memory, Skill, LLM-Wiki, Code-Graph) that are governed, shared, and equipped across agents and frameworks.
— the description by Tencent Cloud

AutoGineer overview, from the brain’s own files

TencentDB Agent Memory is a memory framework designed to eliminate repetitive work by enabling AI agents to inherit project context and expertise. It functions as a central hub that extracts and manages four types of memory assets: Chat Memory, Skills, Wiki, and CodeGraph. By decoupling memory from specific agent frameworks, it allows teams to build, share, and equip agents with persistent, versioned knowledge. The system includes a control panel for human oversight, enabling precise access control, asset management, and team-based collaboration, ensuring that experience gained in one session can be leveraged across the entire agent team.

How it works

Memory model: LLM wiki

AutoGineer overview, from the brain’s own files

The system operates through a central Memory Hub that processes information into four distinct asset types. Chat Memory stores interaction history and preferences. Skills are extracted from tasks and conversations to provide reusable, versioned workflows. The Wiki component structures documentation into a link graph, while CodeGraph indexes codebases to map symbols, relationships, and impact paths. These assets are managed via a web-based panel where users can define team structures, assign assets to specific agents, and set access permissions. A proxy layer allows various agent frameworks to connect to this memory server without requiring custom plugins.

Folders
FolderRoleFiles
.githubagent-config6
agentsagent-instructions22
assetsattachments34
MemoryCorefolder420
MemoryKnowledgefolder121
MemoryPanelfolder309
MemoryProxyfolder304
adaptersfolder5
deployfolder18
sdkfolder45

Requirements

Databases: MongoDB

Set it up

  1. Not scanned by AutoGineerThe author’s README also describes installing it from a clone of its repository. Read its install section: AutoGineer did not scan that path. https://github.com/TencentCloud/TencentDB-Agent-Memory/blob/42d4cde50c5a83182fced8c584f9ddb32a620615/README.md#installation
  2. Created by Tencent Cloud. Published in TencentCloud/TencentDB-Agent-Memory. Licence: MIT License.

Usage

AutoGineer overview, from the brain’s own files

  • Centralizing team knowledge for multiple AI agents.
  • Automating the extraction of reusable skills from agent conversations.
  • Providing agents with deep codebase understanding via CodeGraph.
  • Managing access control for sensitive project documentation and memory.
  • Enabling cold-start capabilities by importing existing project history and docs.
  • Monitoring and analyzing how memory assets are utilized by the agent team.
“Extract a new skill from our recent debugging session and assign it to the Builder agent.”
The system processes the conversation, creates a versioned Skill asset, and updates the Builder agent's loadout to include this new capability.
“What are the potential impacts of modifying the authentication module?”
The agent queries the CodeGraph to identify callers, callees, and dependencies, providing an impact analysis before the user proceeds with code changes.

Documentation by Tencent Cloud

<div align="center">

<img src="./assets/images/logo.png" alt="TencentDB Agent Memory" width="880" />

Agents remember. Humans innovate.

<a href="https://trendshift.io/repositories/29310?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-29310" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/29310" alt="TencentCloud%2FTencentDB-Agent-Memory | Trendshift" width="250" height="55"/></a>

Image: npm Image: GitHub Release Image: License: MIT Image: Node Image: OpenClaw Image: Hermes Image: Discord

Installation · Supported Agents · Best Practices · What is it? · Team Play · Technical Implementation · Benchmark · Roadmap

English · 简体中文

</div>


<td> <video src="https://github.com/user-attachments/assets/efb1a808-1f86-4cfe-802c-f7453f7ca938" width="100%" controls autoplay loop muted playsinline></video> </td>

Installation

Start all three services in one go (memory-core + memory-hub + proxy):

git clone https://github.com/TencentCloud/TencentDB-Agent-Memory.git
cd TencentDB-Agent-Memory/deploy/global-images
cp .env.example .env
$EDITOR .env       # Fill in two sets of LLM parameters (memory group + proxy group)
./start-all.sh     # Launch everything with one command; when finished, it prints a one-liner you can paste directly into Claude

Open the panel: http://localhost:8125.

Complete installation documentation (standalone Memory Hub deployment, Proxy + Claude Code / CodeBuddy usage, stop and cleanup, port reference, etc.) is available in INSTALL.md (中文: INSTALL_CN.md). The MongoDB storage backend is experimental (off by default); see INSTALL.md · MongoDB storage backend.

Migrating data from an older version

If you're already on an older release (v1.x / v0.x) and want to bring your existing data over to v2.0.0+, we provide a migration tool:

See Data Migration Tool (v2 → v3) for full usage and flags. New installations can skip this.

All Agents Share the Same Memory Server

One Proxy, unchanged protocol, zero-code integration — point the Agent's base URL to the Proxy and configure its User Key. Most clients don't require a plugin, hook, or MCP server.

<table> <tr> <td align="center" width="140"><a href="./agents/dsh/"><img src="./assets/images/agents/dsh.png" width="48" height="48" /><br /><sub><b>DeepSeek Harness</b></sub></a></td> <td align="center" width="140"><a href="./agents/claude-code/"><img src="./assets/images/agents/claude-code.png" width="48" height="48" /><br /><sub><b>Claude Code</b></sub></a></td> <td align="center" width="140"><a href="./agents/codex/"><img src="./assets/images/agents/codex.png" width="48" height="48" /><br /><sub><b>Codex</b></sub></a></td> <td align="center" width="140"><a href="./agents/codebuddy/"><img src="./assets/images/agents/codebuddy.png" width="48" height="48" /><br /><sub><b>CodeBuddy</b></sub></a></td> </tr> <tr> <td align="center" width="140"><a href="./agents/workbuddy/"><img src="./assets/images/agents/workbuddy.png" width="48" height="48" /><br /><sub><b>WorkBuddy</b></sub></a></td> <td align="center" width="140"><a href="./agents/hermes/"><img src="./assets/images/agents/hermes.png" width="48" height="48" /><br /><sub><b>Hermes</b></sub></a></td> <td align="center" width="140"><a href="./agents/openclaw/"><img src="./assets/images/agents/openclaw.png" width="48" height="48" /><br /><sub><b>OpenClaw</b></sub></a></td> <td align="center" width="140"><a href="./agents/adapter-agent-development.md"><sub><b>More frameworks coming soon...</b></sub></a></td> </tr> <tr> <td align="center" width="140" colspan="2"><a href="./agents/opencode/"><picture><source media="(prefers-color-scheme: dark)" srcset="https://opencode.ai/brand/files/opencode-logo-dark-square.png" /><img src="https://opencode.ai/brand/files/opencode-logo-light-square.png" width="48" height="48" alt="" /></picture><br /><sub><b>OpenCode</b></sub></a></td> <td align="center" width="140" colspan="2"><a href="./MemoryCore/pi-plugin/README.md"><img src="https://pi.dev/favicon.svg" width="48" height="48" alt="" /><br /><sub><b>Pi</b></sub></a></td> </tr> </table>

See INSTALL.md for links to the exact configuration steps of each client.

OpenCode has a ready-to-use adapter configuration, and Pi uses the pi-plugin extension to connect through OpenAI Chat Completions. After binding a session, you can save a Team, Agent, and Task combination as the default for new sessions.

Don't see your favorite Agent? You can try adapting it yourself with the Generic integration guide — and we'd love a PR adding native support for it. See CONTRIBUTING.md to get started.

Best Practices

Once you've deployed the stack and connected your Agents, use the guide to set up a team, import and assign memory assets, and see how well they work on a real task.

See the Best Practices guide.

What is TencentDB Agent Memory?

We started from a practical question: How do you reduce repetitive work when using Agents?

If project context has already been explained, it shouldn't need to be repeated in a new session. If documents have already been read, every Agent shouldn't have to start again from page one. A workflow that already works shouldn't have to be rediscovered next time.

Memory here means more than just "remembering conversations." Any information that helps the next Agent avoid reinventing the wheel should be saved, organized, and reused.

Existing information → Reusable memory assets → Fewer turns → Less rework → More stable results and higher efficiency
Let experience accumulate, flow, and pass on to the next Agent

Memory Hub for Agent teams closes the loop across the entire experience lifecycle: work produces assets, assets circulate through the team, and new members can load the team's save file on day one.

  1. Automatic asset extraction: Extract Chat Memory and Skills from conversations and tasks; convert documents and code into Wiki and CodeGraph; then manage, review, and route them consistently.

  2. Portable & multi-Agent compatible: Memory assets are decoupled from Agent frameworks — they can move across frameworks and be shared and maintained by multiple Agents and team members.

  3. Cold-start friendly: Import existing documents, codebases, and Agent conversation sessions. New Agent teams can start from existing experience instead of learning from scratch.

🧠 A brain that remembers people and context
  • Chat Memory retains preferences, facts, decisions, and interaction history.

  • Session bindings and permissions determine which memories an Agent can access. When an Agent returns to the same work, it can reuse the context.

  • L0 Conversation → L1 Atom → L2 Scenario → L3 Persona — raw conversations are distilled layer by layer.

<img width="" src="assets/images/chat_memory.png" alt="image.png" />

"Don't refactor the old auth module — mobile is still using it." — Context this costly shouldn't depend on humans repeating it every time.

⚡ A Skill library that accumulates expertise
  • After completing complex work, Agents can extract and manage reusable Skills from conversations and tool calls, and import them into the context of a designated Agent when needed. Skills can be edited and exported from the panel.

  • A Skill isn't just a prompt snippet; it has versions, resource files, trigger boundaries, execution steps, and validation rules.

  • Personal Skills are private by default; they can be shared with the team and assigned to other Agents.

<img width="" src="assets/images/skill.png" alt="image.png" />

Troubleshooting, code review, release checklists — learn it once, and the whole team can use it.

📖 A knowledge map that reads both docs and code
  • Wiki turns product docs, design specs, and ops runbooks into structured pages with a link graph. It supports Markdown, plain text, HTML, Word, Excel, PowerPoint, and PDF. (Inspired by Karpathy's LLM knowledge base.)

<img src="./assets/images/wiki.png" alt="image.png" />

  • CodeGraph indexes code symbols, files, call relationships, and impact paths.

    <img width="" src="assets/images/codegraph.png" alt="image.png" />

  • Agents can search, read, inspect callers/callees, and perform impact analysis before modifying code.

Wiki keeps Agents from reading every file list before getting to work. CodeGraph doesn't just tell them "the code is here" — it tells them "changing this might affect those."

🛡️ A team memory panel controlled by humans
  • Create teams and Agents in Memory Hub; review, share, and equip memory assets.

  • Manage ownership, versions, status, visibility, usage counts, and Agent bindings in one place.

  • private belongs strictly to the Owner; team is visible to all team members; restricted grants precise access via User / Role / Agent ACLs.

  • Two role layers: global System Admin manages users and teams (creating teams, adding members) and can also use Wiki, CodeGraph, Skill, and other asset management features; Team-level roles include Admin (team manager) and Member (regular member), responsible for asset collaboration and access control within a team. Asset ownership is tracked via Owner — the Owner automatically has management permissions for their assets.

<img width="" src="assets/images/asset.png" alt="image.png" />

Cold Start: Load the Save File, Then Get to Work

Most Agents' first task is re-learning your project. TencentDB Agent Memory turns the learning cost you've already paid into a save file:

<img alt="Cold Start: import codebase, docs, and history into Memory Hub" src="assets/images/flowchart3.png" />

Admins can configure a default Agent template for the team so new members can pick up the team's way of working.

Specifically, you can import codebases and documents in the panel and use the client import script for past conversation sessions:

  • Codebases: Import public repositories or private repositories with configured credentials — CodeGraph automatically indexes symbols, files, call relationships, and impact paths.

  • Documents & files: Import relevant docs and files, including from configured external sources — Wiki automatically generates structured pages with a link graph.

  • Conversation sessions: Use the local asset import script to import past sessions from supported clients. By default, the script triggers both Skill and Chat Memory extraction; you can also choose to trigger just one.

Stop retraining every Agent. Give it the save file.

One Play Style: Build a Growing Agent Team for a One-Person Company

Open Memory Hub and create a team:

Tiny but Serious Inc.
├── 👤 You · Set goals / Make decisions
├── 🔭 Scout · Research / Find opportunities
├── 🛠 Builder · Write code / Build products
├── 🧪 Reviewer · Test / Find issues
└── 🧠 Agent Memory · Preserve the team's experience

You're not opening four disconnected chat windows — you're assembling a squad with different roles that can inherit the team's accumulated experience.

Recruit first, then equip
🔭 Scout
   ├── User interview Chat Memory
   ├── Market research Wiki
   └── Competitive analysis Skill

🛠 Builder
   ├── Product Wiki
   ├── Project CodeGraph
   └── Feature Delivery Skill

🧪 Reviewer
   ├── Historical incident Chat Memory
   ├── Project CodeGraph
   └── Release Checklist Skill

Different roles, different loadouts. Less noise — give each Agent the memory assets it actually needs to get work done.

The company can be tiny. Experience can compound forever.

Memory Assets, Not a Chat Log Warehouse

RAG answers "what can be found?" Team Memory also answers "who can use it, which version is valid, and which Agent should receive it."

Chat HistoryStandard RAGTencentDB Agent Memory
Cross-session user understanding△△✅ Chat Memory
Distilled executable experience——✅ Skill
Document structure & relationships—△ Chunk retrieval✅ Wiki + Link Graph
Code call graphs & impact scope—△ Text match✅ CodeGraph
Ownership / Version / Status——✅
Team sharing & Agent loadout——✅
Private / Team / ACL—△✅

Memory Hub Is Not a Display Board — It's a Control Panel

Play StyleWhat you do in the Hub
Team UpCreate teams, add people and Agents, define sharing boundaries
Asset LibraryBrowse, search, review, and manage Chat Memory, Skills, Wiki, and CodeGraph
Agent LoadoutBind different memory assets to different Agents; adjust priority and usage mode; configure the team's default Agent template
Knowledge WorkshopBuild Wiki and CodeGraph; monitor processing status and asset metadata
Access ControlSwitch between private, team, and ACL-based access; revoke sharing when needed
Asset Usage AnalyticsEnable optional analytics to see how often memory, skill, and knowledge tools are called

When you open an asset, what matters is not just "what it says," but also "where it came from, which version it is, who it's assigned to, and whether it's been used recently."

Every Loop Gains Experience

<img alt="Every Loop Gains Experience: continuous accumulation, making every use smarter" src="assets/images/flowchart4.png" />

Memory doesn't run the Agent loop; it ensures the next iteration inherits the previous one's results: valuable interactions stay in Chat Memory, proven workflows are distilled into Skills, and document/code changes are updated through Wiki ingest and CodeGraph sync.

Without Memory, loops may just repeat faster. With inherited memory, each iteration has the chance to be better than the last.

One Agent Team: Shared Experience, Not Shared Privacy

New Chat Memory and Skills are private by default. Sharing is an explicit action, not a default leak.

VisibilitySemantics
privateOnly the Owner can read — not even team admins
teamTeam members can read; the Owner / Admin can manage
restrictedPrecise access via User / Role / Agent ACL
agentFor targeted equipping of Agents within the same team

You can assign the "Release Skill" to the Release Agent, the "Architecture Wiki" to all development Agents, and CodeGraph to Coder and Reviewer.

Technical Implementation

TencentDB Agent Memory doesn't aim to "store everything." It solves three problems: what's worth keeping, who can use it, and how to retrieve less while retrieving the right things next time.

<img alt="Technical overview: layering (L0–L3), Memory Assets, Memory Hub, identity-based assembly for Agents" src="assets/images/flowchart5.png" />

1. Memory isn't flat records — it grows in layers

Conversations are first saved as L0, then refined by an async pipeline into multiple levels of granularity:

LayerWhat it storesPrimary use
L0 ConversationRaw conversations with full contextVerify exact wording, timestamps, and sources
L1 AtomFacts, preferences, constraints, and events extracted from conversationsPrecise recall of actionable information
L2 ScenarioKnowledge blocks organized around projects or scenariosQuickly restore a working context
L3 Core / PersonaLong-term profiles, stable patterns, and high-level cognitionLet Agents rapidly enter a user's and team's context

Both generation and retrieval are layered: normally, L2/L3 provide a quick context bootstrap; when specific facts are needed, BM25 + vector retrieval + RRF fall back to L1/L0. Results are further capped by item count, character budget, and timeout limits to prevent memory from overwhelming the context window.

2. Memory isn't a global prompt — it's the Agent's loadout

Chat Memory, Skills, Wiki, and CodeGraph are all registered uniformly as Memory Assets. Memory Hub uses Fixed Binding + ACL to determine which assets a given Agent can use: first narrow the permission scope by Team, User, Agent, and visibility, then retrieve based on the current query.

This lets teams share experience without exposing all their private information; switching Agents or frameworks only requires re-equipping, not retraining.

3. Knowledge isn't injected wholesale — it's called on demand

Documents are organized into searchable Wiki pages that support link-graph drill-down; codebases are indexed into CodeGraph assets containing files, symbols, and call relationships. Agents call authorized knowledge tools on demand to read relevant pages, source code, or impact paths. The Knowledge service exposes /v3/tools/list and /v3/tools/call for integrations.

This makes documents and code part of memory as well — but they remain available tools that only enter context when truly needed.

Benchmark

BenchmarkWithout TencentDB Agent MemoryWith it enabledRelative improvement
PersonaMem48%76%+59%

PersonaMem tests whether an Agent can correctly understand and apply user information after extended interactions.

Notes

  • Wiki and CodeGraph are built asynchronously; allow some processing time before they reach ready status.

  • CodeGraph supports public HTTPS repositories and private repositories with configured credentials. To clone a private repository over SSH, get the public key from the panel and grant it access on your code hosting platform.

  • The Hub supports manual asset binding. On-demand Skill selection in the Proxy is off by default. Once you enable it and configure a selection strategy, the Proxy can select up to one relevant Skill to load per turn.

Agent Memory doesn't have a settled standard yet. Bug reports, documentation, benchmarks, new framework adapters, and more creative Memory Hub use cases are all welcome.


Roadmap

v2.0.3 adds default session bindings and support for rich document formats in Wiki. See GitHub Releases for the latest stable release and CHANGELOG.md for the release history.

👉 See earlier plans in ROADMAP.md (中文: ROADMAP_CN.md).


Acknowledgements

TencentDB Agent Memory stands on the shoulders of the open-source community:

  • CodeGraph — our CodeGraph asset module uses code from this project. Its design of a pre-indexed code graph is the foundation of our implementation.

  • Hermes Agent (Nous Research) — our Skill asset management uses part of the Skill-related code from Hermes Agent and builds further optimizations base on it.

  • "LLM Wiki" by Andrej Karpathy — the idea of treating documentation as an LLM-maintained, incrementally growing knowledge artifact directly informed how our Wiki layer is built and kept up to date.

We are grateful to the authors and contributors of these projects.


Community & Contributing

We welcome contributions of all kinds — bug reports, feature suggestions, documentation fixes, benchmark reproductions, ecosystem integrations, or pull requests. Agent memory is far from settled, and we hope to build it together with the community.

  • 🐞 Found a bug or have a question? Open an issue in GitHub Issues — we respond within 24 hours.

  • 💡 Have an idea to share? Start a thread in GitHub Discussions.

  • 🛠️ Want to contribute code? Please read CONTRIBUTING.md first.

  • 💬 Want to chat with us? Join our Discord community and talk to the core developers directly.

  • ☁️ Try the hosted version: Tencent Cloud Agent Memory is now available.

  • 💬 Want to join the community? Scan the QR code to join the Agent Memory WeChat group and talk directly with the early developers.

<p align="center"><img src="https://github.com/user-attachments/assets/41ed193d-e70e-484e-8627-0e363a4b1eb0" width="200" alt="Agent Memory WeChat community QR code" /></p>


<p align="center"> Let the path the team has walked become the next Agent's starting line. </p>


✨ Contributors

💡 Thanks to the following contributors building with us — you make TencentDB Agent Memory better.

<div align="center"> <a href="https://github.com/TencentCloud/TencentDB-Agent-Memory/graphs/contributors"> <img src="https://contrib.rocks/image?repo=TencentCloud/TencentDB-Agent-Memory&columns=12&anon=1" /> </a>

<br /><br /> <a href="https://github.com/TencentCloud/TencentDB-Agent-Memory/issues"> <img src="https://img.shields.io/badge/Contributions_Welcome-006eff?style=for-the-badge&logo=github&logoColor=white" alt="Contributions Welcome" /> </a>

</div>

<table width="100%"> <tr> <td width="68%"> <b>If TencentDB Agent Memory has been helpful to you, please consider starring the project.</b><br /> If you have any suggestions, feel free to open an issue for discussion. </td> <td width="32%" align="right"> <img src="./assets/images/star-helper.png" alt="Star TencentDB Agent Memory" width="260" /> </td> </tr> </table>


Star History

<p align="center"> <a href="https://star-history.dera.page/#TencentCloud/TencentDB-Agent-Memory&Date"> <img src="https://star-history.dera.page/svg?repos=TencentCloud/TencentDB-Agent-Memory&type=Date" alt="Star History Chart" width="600" /> </a> </p>


MIT © TencentDB Agent Memory Team

README_CN.md

<div align="center">

<img src="./assets/images/logo.png" alt="TencentDB Agent Memory" width="880" />

让 Agent 沉淀经验,让人专注创造。

<a href="https://trendshift.io/repositories/29310?utm_source=repository-badge&amp;utm_medium=badge&amp;utm_campaign=badge-repository-29310" target="_blank" rel="noopener noreferrer"><img src="https://trendshift.io/api/badge/repositories/29310" alt="TencentCloud%2FTencentDB-Agent-Memory | Trendshift" width="250" height="55"/></a>

Image: npm Image: GitHub Release Image: License: MIT Image: Node Image: OpenClaw Image: Hermes Image: Discord

安装 · 支持的 Agent · 最佳实践 · 项目简介 · 团队玩法 · 技术实现 · Benchmark · Roadmap

English · 简体中文

</div>


<td> <video src="https://github.com/user-attachments/assets/c671134a-0051-42bf-8d1f-d96c37656e63" width="100%" controls autoplay loop muted playsinline></video> </td>

安装

一次拉起完整三件套(memory-core + memory-hub + proxy):

git clone https://github.com/Tencent/TencentDB-Agent-Memory.git
cd TencentDB-Agent-Memory/deploy/global-images
cp .env.example .env
$EDITOR .env       # 填入两组 LLM 参数(memory 组 + proxy 组)
./start-all.sh     # 一键起;结束会打印 claude 可直接复制的一行命令

打开 Panel:http://localhost:8125。

完整安装文档(Memory Hub 单独部署 / Proxy + Claude Code / CodeBuddy 用法 / 停止清理 / 端口 说明等)见 INSTALL_CN.md(English: INSTALL.md)。 MongoDB 存储后端为试验特性(默认关闭),见 INSTALL_CN.md · MongoDB 存储后端。

从旧版本迁移数据

如果你已经在用旧版(v1.x / v0.x),希望把存量数据迁到 v2.0.0+,我们提供了一个数据迁移工具: 用法和参数详见 数据迁移工具(v2 → v3)。全新安装可跳过。

所有 Agent 共享同一个 Memory Server

在客户端按接入指南配置 Proxy 地址和 User Key,即可使用同一套团队记忆服务。常见客户端通过原有模型协议接入,无需另装插件、Hook 或 MCP Server。

<table> <tr> <td align="center" width="140"><a href="./agents/dsh/"><img src="./assets/images/agents/dsh.png" width="48" height="48" /><br /><sub><b>DeepSeek Harness</b></sub></a></td> <td align="center" width="140"><a href="./agents/claude-code/"><img src="./assets/images/agents/claude-code.png" width="48" height="48" /><br /><sub><b>Claude Code</b></sub></a></td> <td align="center" width="140"><a href="./agents/codex/"><img src="./assets/images/agents/codex.png" width="48" height="48" /><br /><sub><b>Codex</b></sub></a></td> <td align="center" width="140"><a href="./agents/codebuddy/"><img src="./assets/images/agents/codebuddy.png" width="48" height="48" /><br /><sub><b>CodeBuddy</b></sub></a></td> </tr> <tr> <td align="center" width="140"><a href="./agents/workbuddy/"><img src="./assets/images/agents/workbuddy.png" width="48" height="48" /><br /><sub><b>WorkBuddy</b></sub></a></td> <td align="center" width="140"><a href="./agents/hermes/"><img src="./assets/images/agents/hermes.png" width="48" height="48" /><br /><sub><b>Hermes</b></sub></a></td> <td align="center" width="140"><a href="./agents/openclaw/"><img src="./assets/images/agents/openclaw.png" width="48" height="48" /><br /><sub><b>OpenClaw</b></sub></a></td> <td align="center" width="140"><a href="./agents/adapter-agent-development.md"><sub><b>更多框架适配中...</b></sub></a></td> </tr> <tr> <td align="center" width="140" colspan="2"><a href="./agents/opencode/"><picture><source media="(prefers-color-scheme: dark)" srcset="https://opencode.ai/brand/files/opencode-logo-dark-square.png" /><img src="https://opencode.ai/brand/files/opencode-logo-light-square.png" width="48" height="48" alt="" /></picture><br /><sub><b>OpenCode</b></sub></a></td> <td align="center" width="140" colspan="2"><a href="./MemoryCore/pi-plugin/README.md"><img src="https://pi.dev/favicon.svg" width="48" height="48" alt="" /><br /><sub><b>Pi</b></sub></a></td> </tr> </table>

各客户端具体配置步骤见上表或接入总览。

OpenCode 提供现成的适配配置,Pi 需加载 pi-plugin 扩展,通过 OpenAI Chat Completions 协议接入。完成会话绑定后,可以保存常用的 Team、Agent 和 Task 组合,供新会话直接使用。

没看到你常用的 Agent?新客户端适配指南 可以试试自己动手适配——也欢迎直接提 PR 为它加上原生支持,参见 CONTRIBUTING_CN.md。

最佳实践

部署并接入 Agent 后,可以按指南初始化团队、导入和分配记忆资产,再用实际任务验证效果。

最佳实践请看:https://tencentcloud.github.io/TencentDB-Agent-Memory/best-practices

TencentDB Agent Memory 是什么?

我们从一个很实际的问题出发:怎样减少使用 Agent 时的重复工作?

项目背景讲过了,不该换个 Session 再讲。文档读过了,不该每个 Agent 从第一页重读。一套做法已经跑通,不该下次再摸索一遍。

所以这里的 Memory 不只是“记住对话”。凡是能让下一个 Agent 少走弯路的信息,都应该被保存、组织并复用。

已有信息 → 可复用记忆资产 → 更少 Turns → 更少返工 → 更稳定的结果和更高的效率
让经验沉淀、流动,然后被下一位 Agent 直接继承

面向 Agent 团队的 Memory Hub,让经验完成一个完整循环:工作中产生资产,资产在团队中流动,新成员进来直接读档。

  1. 自动沉淀资产:从对话和任务中生成 Chat Memory 与 Skill,把文档和代码变成 Wiki 与 CodeGraph,再统一管理、审核和路由。

  2. 可迁移、兼容多Agent:记忆资产与 Agent 框架解耦,可以跨框架迁移,也可以由 Team 内的多个 Agent、多个成员共享和维护。

  3. 冷启动友好:导入已有文档、代码库和 Agent 对话 Session,新 Agent Team 从现有经验开始工作,不必先从头学习一遍。

🧠 一个能记住人和事的大脑
  • Chat Memory 保留偏好、事实、决策和交互历史。

  • 对话记忆按会话绑定和权限隔离;续接同一工作场景时,Agent 可以复用已有背景。

  • L0 Conversation → L1 Atom → L2 Scenario → L3 Persona,从原始对话逐层沉淀。

<img width="" src="assets/images/chat_memory.cn.png" alt="image.png" />

“别重构旧鉴权模块,移动端还在用。”——这种代价很高的上下文,不应该靠人每次提醒。

⚡ 一个会积累经验的 Skill 库
  • Agent 做完复杂工作后,可以从对话和工具调用中提炼和管理可复用 Skill。并在需要时导入到指定Agent的上下文。 Skill 支持在面板中编辑和导出。

  • Skill 不只是一段 Prompt:它有版本、资源文件、触发边界、执行步骤和验证规则。

  • 个人 Skill 默认私有;可分享给团队,再配装给其他 Agent。

<img width="" src="assets/images/skill.cn.png" alt="image.png" />

排障、Review、上线检查——练会一次,全队可用。

📖 一张同时看懂文档和代码的知识地图
  • Wiki 把产品文档、设计方案和运维手册生成结构化页面与链接图谱,支持导入 Markdown、文本、HTML,以及 Word、Excel、PowerPoint 和 PDF。

<img src="./assets/images/wiki.cn.png" alt="image.png" />

  • CodeGraph 索引代码符号、文件、调用关系和影响路径。

<img width="" src="assets/images/codegraph.cn.png" alt="image.png" />

  • Agent 可以搜索、阅读、查 callers / callees,也可以在改代码前先做 impact analysis。

Wiki 不让 Agent 先读完所有文件目录再开工。CodeGraph 不只告诉它“代码在这”,还告诉它“改了可能影响哪”。

🛡️ 一个由人掌握的团队记忆面板
  • 在 Memory Hub 里创建 Team 和 Agent,审核、分享并配装记忆资产。

  • 统一管理 Owner、版本、状态、可见性、使用次数与 Agent 绑定。

  • private 严格属于 Owner;team 面向全队;restricted 通过 User / Role / Agent ACL 精确授权。

  • 角色分两层:全局 System Admin 管理用户与团队(建团队、录入成员),也可使用 Wiki、CodeGraph、Skill 等资产管理功能;Team 内角色 分为 Admin(团队管理员)和 Member(普通成员),负责团队内的资产协作与权限控制。资产归属通过 Owner 标记,Owner 自动获得对应资产的管理权限。

    <img width="" src="assets/images/asset.cn.png" alt="image.png" />

冷启动:先读档,再开工

多数 Agent 的第一件工作,是重新学习你的项目,TencentDB Agent Memory 把你已经付过的学习成本变成存档:

<img alt="企业微信截图_17844464494523" src="assets/images/flowchart3.cn.png" />

管理员可以配置团队默认 Agent 模板,让新成员沿用团队的工作方式。

具体来说,可以在面板中导入代码库和文档,也可以通过客户端导入脚本导入历史会话:

  • 代码库:导入公开仓库或已配置凭据的私有仓库,CodeGraph 自动索引符号、文件、调用关系与影响路径。

  • 文档与文件:导入相关文档和文件(也可从已配置的外部来源导入),Wiki 自动生成结构化页面与链接图谱。

  • 对话 Session:通过本地资产导入脚本导入受支持客户端的历史会话,默认触发 Skill 和 Chat Memory 提取,也可以只触发其中一种。

不再重新训练每一个 Agent。给它读档。

一种玩法:给一个人的公司组一支会成长的 Agent 队伍

打开 Memory Hub,建一个 Team:

Tiny but Serious Inc.
├── 👤 You · 定目标 / 做判断
├── 🔭 Scout · 查资料 / 找机会
├── 🛠 Builder · 写代码 / 做产品
├── 🧪 Reviewer · 测试 / 挑毛病
└── 🧠 Agent Memory · 让经验留在队伍里

你不是在开四个彼此失联的聊天窗口,而是在组一支角色不同、能够继承团队经验的 Agent 小队。

先招人,然后配装备
🔭 Scout
   ├── 用户访谈 Chat Memory
   ├── 市场研究 Wiki
   └── 竞品分析 Skill

🛠 Builder
   ├── 产品 Wiki
   ├── 项目 CodeGraph
   └── Feature Delivery Skill

🧪 Reviewer
   ├── 历史事故 Chat Memory
   ├── 项目 CodeGraph
   └── Release Checklist Skill

不同角色,不同 Loadout。少给噪音,多给它完成工作真正需要的记忆。

公司可以很小,经验可以一直复利。

记忆资产,不是聊天记录仓库

RAG 解决“能查到什么”。Team Memory 还要解决“谁可以用、哪个版本有效、应该给哪个 Agent”。

聊天历史普通 RAGTencentDB Agent Memory
跨会话理解用户△△✅ Chat Memory
沉淀可执行经验——✅ Skill
文档结构与关系—△ 切片检索✅ Wiki + Link Graph
代码调用与影响范围—△ 文本命中✅ CodeGraph
Owner / 版本 / 状态——✅
团队分享与 Agent 配装——✅
私有 / 团队 / ACL—△✅

Memory Hub 不是展板,是操作台

玩法在 Hub 里做什么
组队建立 Team,加入人和 Agent,确定共享边界
资产背包打开、搜索、审核和管理 Chat Memory、Skill、Wiki 与 CodeGraph
Agent Loadout给不同 Agent 绑定不同记忆,调整优先级与使用方式,并可配置团队默认模板
Knowledge 工坊构建 Wiki 和 CodeGraph,查看处理状态和资产信息
权限控制在私有、团队与 ACL 授权之间切换,必要时收回共享
资产使用分析启用可选的数据分析后,查看记忆、技能和知识工具的调用情况

点开一条资产,关心的不只是“它写了什么”,还有“它从哪来、是哪个版本、分给了谁、最近是否被使用”。

给每次 Loop 加一条经验值

<img alt="企业微信截图_17844463916919" src="assets/images/flowchart4.cn.png" />

这里的 Memory 不负责替 Agent 跑 Loop,它负责让下一轮继承上一轮的成果:有价值的交互留在 Chat Memory,跑通的做法可以提炼为 Skill,文档和代码变化则通过 Wiki ingest 与 CodeGraph sync 更新。

没有 Memory,Loop 可能只是更快地重复。能继承记忆,每一轮才有机会比上一轮更好。

一支 Agent 团队,共享经验,不共享隐私

新 Chat Memory 和 Skill 默认私有。分享是一个明确动作,不是默认泄漏。

可见性语义
private只有 Owner 可读,团队管理员也不例外
team团队成员可读,Owner / Admin 负责管理
restricted通过 User / Role / Agent ACL 精确授权
agent用于同团队 Agent 的定向装配

你可以把“发布 Skill”给 Release Agent,把“架构 Wiki”给所有开发 Agent,把 CodeGraph 给 Coder 和 Reviewer。

技术实现

TencentDB Agent Memory 不追求“存下所有东西”,而是解决三个问题:什么值得留下、谁可以使用、下一次怎样少拿但拿对。

<img alt="技术实现总览:沉淀(L0–L3)、记忆资产、Memory Hub、按身份装配到 Agent" src="assets/images/flowchart5.cn.png" />

1. 记忆不是平铺记录,而是逐层生长

对话首先作为 L0 保存,再由异步 Pipeline 提炼为不同粒度的记忆:

层级保存什么主要用途
L0 Conversation原始对话与完整上下文核对原话、时间和来源
L1 Atom从对话提取的事实、偏好、约束与事件精确召回可执行信息
L2 Scenario围绕项目或场景组织的知识块快速恢复一个工作场景
L3 Core / Persona长期画像、稳定模式与高层认知让 Agent 迅速进入用户和团队语境

生成和召回都分层:平时用 L2 / L3 快速进入语境,需要具体事实时通过 BM25、向量检索与 RRF 回到 L1 / L0。结果还会经过条数、字符预算和超时限制,避免记忆反过来占满上下文。

2. 记忆不是全局 Prompt,而是 Agent 的 Loadout

Chat Memory、Skill、Wiki 和 CodeGraph 都被统一登记为 Memory Asset。Memory Hub 通过 Fixed Binding + ACL 决定某个 Agent 能带走哪些资产:先按 Team、User、Agent 和可见性缩小权限范围,再按当前问题召回。

因此团队可以共享经验,却不必共享全部隐私;换 Agent 或换框架,也只需重新装配,不必重新训练。

3. 知识不整库注入,而是按需调用

文档被整理为可搜索、可沿链接下钻的 Wiki;代码库被索引为包含文件、符号和调用关系的 CodeGraph。Agent 先通过 /v3/tools/list 发现能力,再用 /v3/tools/call 读取相关页面、源码或影响路径。

这让文档和代码也成为记忆,但它们平时只是可用的工具,只有真正需要时才进入上下文。

Benchmark

Benchmark无 TencentDB Agent Memory启用后相对提升
PersonaMem48%76%+59%

PersonaMem 检验Agent 能否在长期交互后正确理解和运用用户信息。

注意事项

  • Wiki 和 CodeGraph 异步构建,需要等待一定时间处理才能 ready。

  • CodeGraph 支持公开 HTTPS 仓库和已配置凭据的私有仓库。使用 SSH 拉取私有仓库时,先在面板获取公钥,并在代码托管平台配置访问权限。

  • Memory Hub 支持手动装配资产。Proxy 的 Skill 按需选择功能默认关闭;启用并配置好策略后,Proxy 每轮最多选择一个相关 Skill 加载。

相关文档


Roadmap

v2.0.3 新增会话默认绑定和 Wiki 富文档支持。最新稳定版见 GitHub Releases,历史变更见 CHANGELOG.md。

早期规划见 ROADMAP_CN.md(English: ROADMAP.md)。


致谢

TencentDB Agent Memory 的设计站在开源社区的肩膀上:

  • CodeGraph:我们的 CodeGraph 资产模块复用了该项目的代码。其"预索引的代码图谱"的设计,是我们该模块实现的基础。

  • Hermes Agent(Nous Research):我们的 Skill 资产管理复用了 Hermes Agent 中部分 Skill 相关代码,并在此基础上做了进一步优化。

  • Andrej Karpathy 的 "LLM Wiki":将文档视为由 LLM 增量维护、可持续复利的知识产物的思路,直接影响了我们 Wiki 层的构建与维护方式。

在此向以上项目的作者与贡献者致以谢意。


社区与贡献

我们欢迎一切形式的贡献——Bug 反馈、功能建议、文档勘误、Benchmark 复现、生态集成,或者一个 Pull Request 都可以。Agent 记忆这件事远未有定论,希望和大家一起把它做出来。

  • 🐞 发现 Bug 或有疑问? 欢迎到 GitHub Issues 提交,我们会在 24 小时内响应。

  • 💡 有想法想交流? 欢迎在 GitHub Discussions 发起讨论。

  • 🛠️ 想贡献代码? 请先阅读 贡献指南。

  • ☁️ 云上托管版已正式上线,诚邀体验:腾讯云 Agent 记忆服务。

  • 💬 想加入交流群? 扫码加入 Agent Memory 微信社群,与早期开发者直接对话。

<p align="center"><img src="https://github.com/user-attachments/assets/41ed193d-e70e-484e-8627-0e363a4b1eb0" width="200" alt="Agent Memory 微信社群二维码" /></p>


<p align="center"> 让团队走过的路,成为下一个 Agent 的起点. </p>


✨ 贡献者

💡 感谢以下Contributors与我们一起共建,是你们让 TencentDB Agent Memory 变得更完善

<div align="center"> <a href="https://github.com/TencentCloud/TencentDB-Agent-Memory/graphs/contributors"> <img src="https://contrib.rocks/image?repo=TencentCloud/TencentDB-Agent-Memory&columns=12&anon=1" /> </a>

<br /><br /> <a href="https://github.com/TencentCloud/TencentDB-Agent-Memory/issues"> <img src="https://img.shields.io/badge/欢迎贡献-006eff?style=for-the-badge&logo=github&logoColor=white" alt="欢迎贡献" /> </a>

</div>

<table width="100%"> <tr> <td width="68%"> <b>如果 TencentDB Agent Memory 对你有所帮助,欢迎为项目点亮 ⭐ 支持。</b><br /> 如果有任何建议,欢迎提出issue讨论。 </td> <td width="32%" align="right"> <img src="./assets/images/star-helper.png" alt="Star TencentDB Agent Memory" width="260" /> </td> </tr> </table>


Star 趋势

<p align="center"> <a href="https://star-history.dera.page/#TencentCloud/TencentDB-Agent-Memory&Date"> <img src="https://star-history.dera.page/svg?repos=TencentCloud/TencentDB-Agent-Memory&type=Date" alt="Star History Chart" width="600" /> </a> </p>


MIT © TencentDB Agent Memory Team

512 files · 503 not served here

Advantages

  • Decouples memory assets from specific agent frameworks, allowing portability across different tools. evidence: README.md
  • Provides structured, versioned, and governed memory assets rather than just raw chat logs. evidence: README.md
  • Enables precise access control through private, team, and restricted visibility settings. evidence: README.md

Limitations

  • The MongoDB storage backend is currently experimental and disabled by default. evidence: README.md
  • Requires manual setup and configuration of LLM parameters for the memory group and proxy group. evidence: README.md

Security

Risk level: Medium risk

This brain runs

Agent instructions that run or fetch something (12)

  • MemoryCore/SKILL.md: node -v
  • MemoryCore/SKILL.md: openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
  • agents/skills/setup-proxy/SKILL.md: curl -s -w "\n%{http_code}" -X POST "${PROXY_HOST}/claude-code/${INSTANCE_ID}/v1/messages" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -w "\n%{http_code}" -X POST "${PROXY_HOST}/${AGENT}/${INSTANCE_ID}/v1/chat/completions" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -w "\n%{http_code}" -X POST "${PROXY_HOST}/dsh/${INSTANCE_ID}/chat/completions" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -w "\n%{http_code}" -X POST "${PROXY_HOST}/codex/${INSTANCE_ID}/v1/responses" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -w "\n%{http_code}" -X POST "${PROXY_HOST}/workbuddy/${INSTANCE_ID}/v1/chat/completions" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -X POST "${PANEL_URL}/api/v1/meta/auth/verify" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -X POST "${PANEL_URL}/api/v1/meta/team/list" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -X POST "${PANEL_URL}/api/v1/meta/agent/list" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: curl -s -X POST "${PANEL_URL}/api/v1/meta/task/list" \ · uses the network
  • agents/skills/setup-proxy/SKILL.md: bash agents/skills/setup-proxy/setup-proxy.sh --non-interactive \
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:94)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:100)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:106)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:112)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:118)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:140)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:147)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:155)
  • Medium risk: runs-instruction-instruction-network (agents/skills/setup-proxy/SKILL.md:163)
  • Low risk: scripts-present (agents/asset-import.ts)
  • Low risk: scripts-present (agents/setup-proxy.sh)
  • Low risk: scripts-present (agents/skills/setup-proxy/setup-proxy.sh)

Attribution and licence

Created by
Tencent Cloud
Publisher
Tencent Cloud (Official Tencent Cloud project)
Source
TencentCloud/TencentDB-Agent-Memory · commit 42d4cde
Licence
MIT License (files served here)
  • ATTRIBUTION.md (written by AutoGineer)
Synced

AutoGineer is not affiliated with or endorsed by Tencent Cloud.

Install from source

503 of its files are not served here, so there is no ZIP. TencentCloud/TencentDB-Agent-Memory at 42d4cde