TencentDB Agent Memory: The Open-Source Team Memory Hub With 10,000+ GitHub Stars That Makes AI Agents Remember Everything
TencentDB Agent Memory is an open-source team memory hub that gives AI agents persistent, shared memory across sessions. Learn how it converts conversations, documents, and code into reusable assets with 59% better personalization.
Why AI Agents Need Persistent Memory
Every time you start a new conversation with an AI agent, it forgets everything. Your project context, coding preferences, architectural decisions, debugging solutions—all gone. You repeat yourself, the agent relearns from scratch, and productivity suffers.
This isn't just annoying—it's expensive. Teams using multiple AI agents across different projects face a constant cycle of re-explanation. Agent A learns your testing patterns. Agent B has no idea. When Agent A starts a new session next week, it's back to square one.
What if agents could remember, share, and build on each other's knowledge?
That's exactly what TencentDB Agent Memory solves. With over 10,000 GitHub stars and 968 forks, this open-source project is becoming the standard for team-level agent memory management.
What is TencentDB Agent Memory?
TencentDB Agent Memory is a memory hub that sits between your AI agents and their interactions. Instead of each agent having isolated, ephemeral conversations, the system captures valuable information and converts it into four structured memory asset types:
- Chat Memory — User preferences, decisions, facts, and interaction history
- Skill — Reusable workflows extracted from successful agent tasks
- LLM-Wiki — Structured documentation with link graphs (inspired by Andrej Karpathy's LLM knowledge base concept)
- Code-Graph — Indexed code symbols, call relationships, and impact analysis
These assets are version-controlled, access-managed, and can be shared across agents and team members. Think of it as a "save file" for your AI agent team.
The Four-Layer Memory Architecture
Not all memories are equal. Some need instant recall; others provide background context. TencentDB Agent Memory uses a four-layer system:
| Layer | What It Stores | Use Case |
|---|---|---|
| L0 Conversation | Raw conversations with full context | Verify exact wording, timestamps, sources |
| L1 Atom | Facts, preferences, constraints, events | Precise recall of actionable information |
| L2 Scenario | Knowledge organized by project/scenario | Quickly restore working context |
| L3 Core/Persona | Long-term profiles, stable patterns | Rapid context bootstrapping |
The system automatically distills raw conversations (L0) into atomic facts (L1), then organizes them into scenarios (L2) and long-term personas (L3). Retrieval is equally layered: L2/L3 provide quick context, while BM25 + vector search + RRF fall back to L1/L0 when specific facts are needed.
How It Works in Practice
Let's say you're building a SaaS product with a team of AI agents:
- Scout Agent — Researches market opportunities
- Builder Agent — Writes code and implements features
- Reviewer Agent — Tests code and finds issues
Without TencentDB Agent Memory:
Each agent starts fresh every session. Scout discovers a competitor feature on Monday. Tuesday, Builder has no idea about it. Wednesday, Reviewer tests something that conflicts with Scout's findings. Everyone's working in silos.
With TencentDB Agent Memory:
Scout's competitive analysis becomes a Wiki asset. Builder's feature implementation creates a Code-Graph asset and a Skill for "integrating payment webhooks." Reviewer's testing patterns become a reusable Skill. All agents can access relevant assets based on their role and permissions.
Here's a real conversation that demonstrates the system:
// Day 1: Builder Agent implements authentication
User: "Implement JWT auth for the API"
Builder: [Creates auth module, learns your team uses refresh tokens, 15-min expiry]
// Day 15: New session, different agent
User: "Add rate limiting to protected endpoints"
Reviewer: [Automatically loads auth context from memory]
Reviewer: "I see you're using JWT with 15-min expiry and refresh tokens.
I'll ensure rate limiting respects token refresh cycles."
The Reviewer agent didn't need re-explanation. It inherited the context from memory assets.
Access Control and Privacy
Not all memories should be shared. TencentDB Agent Memory provides granular access control:
- Private — Only the owner can read (not even team admins)
- Team — All team members can read
- Restricted — Precise access via User/Role/Agent ACLs
- Agent — Targeted equipping of specific agents
You can assign the "Release Checklist Skill" only to the Release Agent, while making the "Architecture Wiki" available to all development agents. Private memories stay private unless explicitly shared.
Real-World Example: Onboarding a New Developer
Imagine a new developer joins your team. Normally, they'd spend weeks learning:
- Project architecture and conventions
- Why certain decisions were made
- Common debugging patterns
- Which modules are fragile vs. stable
With TencentDB Agent Memory, their AI coding assistant loads the team's accumulated knowledge on day one:
# New dev's AI assistant automatically loads:
- Code-Graph: 2,847 symbols, 156 files, call relationships indexed
- Wiki: 47 structured pages covering architecture, APIs, deployment
- Chat Memory: 312 decisions, preferences, and historical context
- Skills: 18 reusable workflows (debugging, code review, deployment)
When they ask, "Why does the auth module use this pattern?" the agent can reference the exact conversation from six months ago where the team decided on that approach, including the constraints and trade-offs discussed.
The learning curve flattens from weeks to days.
Key Benefits
- 59% improvement in personalization — PersonaMem benchmark increased from 48% to 76% with memory enabled
- Cold-start friendly — Import existing codebases, documents, and conversation sessions; new teams start with inherited experience
- Framework-agnostic — Memory assets work across OpenClaw, Hermes, and other agent frameworks
- Version-controlled — Track changes, roll back, and maintain asset history
- Team collaboration — Share knowledge without exposing private information
- Automatic extraction — Skills and memories are extracted from conversations without manual curation
- Impact analysis — Code-Graph shows what changing one function might affect
Getting Started
Installation takes minutes. Clone the repo, configure your LLM parameters, and launch:
git clone https://github.com/TencentCloud/TencentDB-Agent-Memory.git
cd TencentDB-Agent-Memory/deploy/global-images
cp .env.example .env
# Edit .env with your LLM API keys
./start-all.sh
The Memory Hub panel opens at http://localhost:8125. From there, create a team, add agents, and start importing your existing knowledge assets.
For developers using Claude Code or other AI coding tools, the system includes a proxy that integrates directly with your existing workflow.
How It Compares to Standard RAG
Retrieval-Augmented Generation (RAG) answers "what can be found?" TencentDB Agent Memory also answers "who can use it, which version is valid, and which agent should receive it."
| Capability | Chat History | Standard RAG | TencentDB Agent Memory |
|---|---|---|---|
| Cross-session 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 | — | — | ✅ |
Standard RAG treats all retrieved content equally. TencentDB Agent Memory understands that a "Release Checklist Skill" should go to the Release Agent, not the Research Agent.
Frequently Asked Questions
1. Does TencentDB Agent Memory work with my existing AI agent framework?
Yes. The system currently supports OpenClaw, Hermes, and SDK integration. Memory assets are framework-agnostic, so you can share them across different agent implementations. The team is working on broader cross-framework migration tools.
2. How does the system decide what to remember?
TencentDB Agent Memory uses an async pipeline to process conversations and extract valuable information. It identifies facts, preferences, decisions, successful workflows, and technical patterns. You can also manually curate and review memories through the Memory Hub panel before sharing them with the team.
3. Can I import my existing documentation and code?
Absolutely. The system supports importing codebases (for Code-Graph indexing), documents and files (for Wiki generation), and past agent conversation sessions (for Chat Memory and Skill extraction). This makes it cold-start friendly—new teams can begin with inherited knowledge instead of starting from scratch.
4. Is my private information safe?
Yes. Memories are private by default. Sharing is an explicit action, not a default behavior. The system provides four visibility levels (private, team, restricted, agent) with granular ACLs. You control exactly who and what can access each memory asset.
5. What's the performance overhead?
Memory retrieval uses layered search (L2/L3 for quick context, L1/L0 for specific facts) with BM25 + vector search + RRF. Results are capped by item count, character budget, and timeout limits to prevent memory from overwhelming the context window. In benchmarks, the system improved agent performance without significant latency penalties.
6. How do I migrate from an older version?
If you're on v1.x or v0.x, TencentDB Agent Memory provides a migration tool to bring your existing data to v2.0.0+. The tool handles schema changes and data transformation automatically. New installations can skip this step.
7. Can I use this for personal projects, or is it only for teams?
Both. You can use it as a personal memory system for your own AI agents, or scale it up for team collaboration. The access control system works equally well for solo developers and multi-agent teams.
8. What happens if I switch AI models (e.g., from GPT-4 to Claude)?
Memory assets are decoupled from specific models. You can switch underlying LLMs without losing your accumulated knowledge. The system stores structured information, not model-specific embeddings, making it portable across different AI providers.