TencentDB Agent Memory (GitHub Repo)
TencentDB Agent Memory converts chat history, documents, and codebases into reusable assets to prevent AI agents from redundant learning.
Deep dive
- Implements four memory layers (L0-L3) ranging from raw chat history to refined personas and skills.
- Uses BM25 and vector retrieval combined with RRF for nuanced context recovery.
- Supports asynchronous ingestion for Wiki and CodeGraph generation to reduce real-time latency.
- Decouples memory from specific frameworks, making assets portable.
- Includes a management panel for manual review of extracted agent skills.
Decoder
- ACL (Access Control List): A table or set of rules that defines which users or agents have access to specific data or services.
- BM25: A keyword-based retrieval algorithm used to estimate the relevance of documents to a given search query.
- RRF (Reciprocal Rank Fusion): A method for combining the results of multiple different ranking systems into a single, more accurate list.
Original article
Agents remember. Humans innovate.
Latest: Team Memory Beta is evolving quickly — install it and start exploring in minutes.
Installation
Start all three services in one go (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 # 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).
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.
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.
- 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.
- 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.
- 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.
- Each Agent automatically gets its own memory when created — no need to re-introduce yourself next time.
- L0 Conversation → L1 Atom → L2 Scenario → L3 Persona — raw conversations are distilled layer by layer.
"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.
- 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; after review, they can be shared with the team and assigned to other Agents.
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. (Inspired by Karpathy's LLM knowledge base.)
- CodeGraph indexes code symbols, files, call relationships, and impact paths.
- 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.
privatebelongs strictly to the Owner;teamis visible to all team members;restrictedgrants 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.
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:
- Codebases: Import existing repositories — CodeGraph automatically indexes symbols, files, call relationships, and impact paths.
- Documents & files: Import relevant docs and files — Wiki automatically generates structured pages with a link graph.
- Conversation sessions: Import past Agent conversation sessions — Skills and Chat Memory are automatically extracted as reusable assets.
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
Recruit first, then equip
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."
Memory Hub Is Not a Display Board — It's a Control Panel
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
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.
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.
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.
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.
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 first discover capabilities via /v3/tools/list, then use /v3/tools/call to read relevant pages, source code, or impact paths.
Benchmark
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
readystatus. - CodeGraph currently prioritizes public HTTPS repositories; support for private repositories and SSH credentials is still being refined.
- The Hub supports manual asset binding; fully automated memory routing is still being iterated.
- TencentDB Agent Memory currently supports OpenClaw, Hermes, Claude Code, CodeBuddy, and SDK integration; broader cross-framework migration is on the roadmap.
Acknowledgements
TencentDB Agent Memory stands on the shoulders of the open-source community:
- CodeGraph — our CodeGraph asset module uses code from this project.
- Hermes Agent (Nous Research) — our Skill asset management uses part of the Skill-related code from Hermes Agent and builds further optimizations based 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.
Community & Contributing
- 🐞 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.
Let the path the team has walked become the next Agent's starting line.
Fresh dev news, AI-digested daily. Never miss a trend at devoured.fyi