TencentDB Agent Memory: Give Your AI Agents Shared, Persistent Memory Across Sessions (2026 Guide)
TencentDB Agent Memory is a free, open source team-level memory hub for AI agents. Turns conversations, docs, and code into 4 reusable memory assets. Chat Memory, Skills, Wiki, CodeGraph. 18K+ stars.
AI agents have an amnesia problem. Every new session starts from scratch. You re-explain your project, re-introduce your preferences, re-share your codebase context. If you switch from Claude Code to Cursor, or from one agent to another, all accumulated experience is lost. For teams running multiple agents on the same project, this means every agent independently re-learns the same context, wasting tokens and producing inconsistent results.
TencentDB Agent Memory, developed by Tencent Cloud, is a free, open source team-level memory hub for AI agents. It turns conversations, documents, and code into four reusable memory assets (Chat Memory, Skills, Wiki, and CodeGraph) that are governed, shared, and equipped across agents and frameworks. New agents load the team's accumulated experience on day one instead of learning from scratch. 18,700+ stars on GitHub.
In this guide, you'll learn what TencentDB Agent Memory is, how it works, and how to deploy it for your agent team.
What is TencentDB Agent Memory?
TencentDB Agent Memory is a team-level memory hub for AI agents. It solves a practical question: how do you reduce repetitive work when using agents? If project context has already been explained, it should not need to be repeated in a new session. If documents have already been read, every agent should not have to start again from page one. A workflow that already works should not have to be rediscovered next time.
The system turns existing information into four types of reusable memory assets:
-
Chat Memory: Retains preferences, facts, decisions, and interaction history. Each agent automatically gets its own memory when created. Conversations are distilled layer by layer: L0 (raw conversation) to L1 (atoms: facts and events) to L2 (scenarios: project context blocks) to L3 (persona: long-term profiles).
-
Skills: After completing complex work, agents can extract and manage reusable skills from conversations and tool calls. A skill is not 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.
-
Wiki: Turns product docs, design specs, and ops runbooks into structured pages with a link graph. Inspired by Andrej Karpathy's LLM knowledge base concept. Agents can search, read, and drill down through linked pages instead of reading every file before getting to work.
-
CodeGraph: Indexes code symbols, files, call relationships, and impact paths. Agents can search, read, inspect callers and callees, and perform impact analysis before modifying code. CodeGraph does not just tell agents "the code is here." It tells them "changing this might affect those."
Who is it for?
- Teams running multiple AI agents: If you have a Scout agent doing research, a Builder agent writing code, and a Reviewer agent testing, TencentDB Agent Memory lets them share accumulated experience without re-learning everything independently.
- Developers tired of re-explaining context: If you find yourself re-introducing your project to a new agent session every morning, Agent Memory stores your preferences, decisions, and project context so the next session starts with full context.
- AI agent framework builders: The memory assets are decoupled from agent frameworks. They can move across frameworks and be shared by multiple agents. If you build agent infrastructure, this is a memory layer you can plug into.
- One-person companies using agent teams: The README explicitly describes a "one-person company" play style where you assemble a squad of agents (Scout, Builder, Reviewer) that inherit the team's accumulated experience.
What makes TencentDB Agent Memory different from RAG or chat history?
- Four asset types, not just retrieval: RAG answers "what can be found?" Agent Memory also answers "who can use it, which version is valid, and which agent should receive it." It is not a chat log warehouse. It is a governed, versioned, access-controlled asset library.
- Layered memory (L0 to L3): Conversations are first saved as L0 (raw), then refined by an async pipeline into L1 (atoms), L2 (scenarios), and L3 (persona). Retrieval uses BM25 + vector search + reciprocal rank fusion, capped by item count, character budget, and timeout limits to prevent memory from overwhelming the context window.
- Cold-start friendly: Import existing codebases, documents, and past conversation sessions. CodeGraph automatically indexes symbols and call relationships. Wiki automatically generates structured pages. Skills and Chat Memory are automatically extracted. New agent teams start from existing experience instead of learning from scratch.
- Privacy by default: New Chat Memory and Skills are private by default. Sharing is an explicit action, not a default leak. Three visibility levels: private (only owner), team (all team members), restricted (precise ACL via User/Role/Agent).
- Agent loadout system: Bind different memory assets to different agents. The Scout agent gets user interview Chat Memory and market research Wiki. The Builder agent gets the project CodeGraph and feature delivery Skill. Less noise, each agent gets the memory it actually needs.
- Framework compatible: Currently supports OpenClaw, Hermes, Claude Code, CodeBuddy, and SDK integration. Broader cross-framework migration is on the roadmap.
- Free and open source: MIT license. 18,700+ stars. Self-host with Docker.
What you need before you start
- Docker and Docker Compose: For one-click deployment of all three services (Memory Core, Memory Hub, and Proxy).
- LLM API keys: Two sets of LLM parameters (one for the memory group that extracts and processes assets, one for the proxy group that handles agent requests).
- Node.js: Required for the Memory Hub panel and SDK.
- An MCP-compatible agent: Claude Code, CodeBuddy, Hermes, or OpenClaw for direct integration. Or use the SDK for custom integrations.
Step-by-step installation
Step 1: Clone and configure
git clone https://github.com/Tencent/TencentDB-Agent-Memory.git
cd TencentDB-Agent-Memory/deploy/global-images
cp .env.example .env
Edit the .env file and fill in two sets of LLM parameters (memory group + proxy group).
Step 2: Launch all services
./start-all.sh
This launches Memory Core (the extraction and storage engine), Memory Hub (the web panel), and Proxy (the agent-facing API) with one command. When finished, it prints a one-liner you can paste directly into Claude Code.
Step 3: Open the Memory Hub panel
Open your browser to http://localhost:8125. From here you can:
- Create teams and add agents
- Import codebases (CodeGraph auto-indexes symbols and call relationships)
- Import documents (Wiki auto-generates structured pages)
- Import past conversation sessions (Skills and Chat Memory are auto-extracted)
- Review, share, and equip memory assets to specific agents
Step 4: Connect your agent
Paste the one-liner from Step 2 into your agent (Claude Code, CodeBuddy, or Hermes). Your agent now has access to the team's shared memory. It can search Wiki pages, query CodeGraph for impact analysis, load relevant Skills, and recall Chat Memory from past sessions.
Common errors and how to fix them
| Error | What it means | How to fix it |
|---|---|---|
| Wiki or CodeGraph stuck in "processing" | Wiki and CodeGraph are built asynchronously. Large codebases or document sets take time to index. | Wait for processing to complete. Check the Memory Hub panel for status updates. CodeGraph currently prioritizes public HTTPS repositories. |
| Agent cannot connect to Proxy | The Proxy service is not running or the agent configuration is wrong. | Verify all three services are running with docker-compose ps. Check that the agent's MCP config points to the correct Proxy URL and port. |
| LLM API errors during extraction | The memory group LLM (used for extracting assets from conversations and documents) has invalid or exhausted API keys. | Verify the memory group LLM parameters in your .env file. This is a separate key from the proxy group. |
| Port 8125 already in use | Another service is occupying the Memory Hub port. | Change the port mapping in your docker-compose.yml file. |
TencentDB Agent Memory vs standard RAG vs chat history
| Feature | TencentDB Agent Memory | Standard RAG | Chat history |
|---|---|---|---|
| Cross-session user understanding | Yes (Chat Memory L0-L3) | Partial | Yes |
| Distilled executable experience | Yes (Skills with versions and validation) | No | No |
| Document structure and relationships | Yes (Wiki with link graph) | Partial (chunk retrieval) | No |
| Code call graphs and impact scope | Yes (CodeGraph) | Partial (text match) | No |
| Ownership, version, status tracking | Yes | No | No |
| Team sharing and agent loadout | Yes | No | No |
| Privacy levels (private/team/ACL) | Yes | Partial | No |
| Best for | Teams running multiple agents that need shared, persistent, governed memory | Single-agent Q&A over documents | Recalling past conversations in a single session |
Bottom line: TencentDB Agent Memory solves the fundamental amnesia problem of AI agents. Instead of every agent session starting from scratch, agents load the team's accumulated experience (preferences, skills, document knowledge, code understanding) on day one. The four-asset system (Chat Memory, Skills, Wiki, CodeGraph) is more sophisticated than simple RAG or chat history because it governs who can use what, tracks versions, and lets you equip different agents with different memory loadouts. If you are running a team of AI agents and tired of re-explaining your project every morning, this is the best free open source memory hub available.
3 alternatives worth checking out
- Mem0 (github.com/mem0ai/mem0): A popular open source memory layer for AI agents. Mem0 focuses on personal memory (remembering user preferences and facts across sessions) but lacks the team-level asset governance, CodeGraph, and Wiki features of TencentDB Agent Memory. Good for single-agent memory, less suited for multi-agent teams.
- Letta (formerly MemGPT) (github.com/letta-ai/letta): An open source framework for building agents with long-term memory. Letta uses a memory hierarchy inspired by operating systems (main context, external context, recall storage). It is more of an agent framework than a standalone memory hub, so it is better if you want to build agents from scratch with memory built in.
- Cognee (github.com/topoteretes/cognee): An open source memory engine that turns unstructured data into knowledge graphs for AI agents. Cognee is strong on the document-to-graph pipeline (similar to TencentDB's Wiki) but does not have the Chat Memory, Skills, or team governance features.
Found this guide useful? Check out more AI tools and open source projects on Sudo Scout.
Related posts
Prime Agent: The Self-Improving AI Coding Agent With Persistent IPython and Built-In Subagents (2026 Guide)
Prime Agent is a free, open source self-improving RLM agent for coding and long-running autonomous tasks. Persistent IPython, built-in subagents, continual harness refinement, daemon-backed sessions. 15.8K stars.
NVIDIA Switchyard: Route LLM Traffic Across Models and Providers Without Changing Your API (2026 Guide)
NVIDIA Switchyard is a free, open source Rust proxy that routes LLM requests across providers. Translates between OpenAI and Anthropic APIs, supports Claude Code and Codex, A/B benchmarking, cost optimization. Apache 2.0.
Needle 2: The 14MB AI Model That Runs on Phones, Wearables, and Smart Home Devices (2026 Guide)
Needle 2 is a free, open source 45M-parameter foundation model for tool calling on tiny devices. 14MB binary, 28MB RAM, runs fully offline. LoRA fine-tuning, confidence gating, structured extraction. 5.4K stars.