TencentCloud/TencentDB-Agent-Memory
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.
TencentDB Agent Memory
What it is – An open‑source “memory hub” that lets large‑language‑model (LLM) agents store, organise and re‑use the knowledge they generate during a workflow. It turns raw chat logs, extracted skills, documentation and code‑bases into structured assets (Chat Memory, Skills, Wiki, CodeGraph) that can be shared across many agents and teams.
Core idea
When you work with an LLM‑powered agent, the conversation, the code it writes, and the docs it reads are usually discarded after the session ends. TencentDB Agent Memory captures that experience, distils it into reusable pieces, and makes those pieces available to future agents so they don’t have to “reinvent the wheel”.
Main components
| Component | What it stores | How it is used |
|---|---|---|
| Memory Core | Raw conversations (L0) → extracted facts (L1) → scenario blocks (L2) → long‑term persona (L3) | Retrieval is layered: quick L2/L3 context first, fall‑back to L1/L0 with BM25 + vector search when needed. |
| Memory Hub (Panel) | Central UI for teams: create teams, users, agents; browse assets; set ACLs; bind assets to agents. | Human‑in‑the‑loop control – decide what is private, team‑wide, or restricted. |
| Proxy | Thin HTTP gateway that presents a uniform API to any LLM‑agent framework (Claude Code, DeepSeek Harness, CodeBuddy, OpenClaw, etc.). | Agents only need to point their base URL to the proxy; no SDK changes required. |
| Wiki | Structured pages generated from product docs, design specs, runbooks; linked together as a graph. | Agents can call /v3/tools/list → /v3/tools/call to read a page or follow links. |
| CodeGraph | Index of symbols, files, call relationships, impact paths for a code repository. | Enables impact analysis and precise code‑search before a modification. |
| Skill library | Versioned, validated “experience blocks” (e.g., release checklist, troubleshooting flow) extracted from past runs. | Agents can load a Skill into their context on demand. |
How you get it running
- Clone the repo and run the provided
start-all.shscript indeploy/global-images. The script launches three Docker containers: memory‑core, memory‑hub, and proxy. - Fill in the
.envfile with two sets of LLM credentials (one for the memory‑group and one for the proxy‑group). - After the containers start, open
http://localhost:8125– the Memory Hub UI where you create teams, import assets, and bind them to agents. - Point any supported agent framework to the proxy URL (the README lists ready‑made adapters for Claude Code, DeepSeek Harness, Codex, CodeBuddy, WorkBuddy, Hermes, OpenClaw, etc.). No code changes are required beyond the base URL.
The storage backend is PostgreSQL by default; an experimental MongoDB backend can be enabled via the install guide.
Typical workflow (cold‑start to production)
- Import existing knowledge – upload a code repository, docs, or past conversation logs. The hub automatically builds a CodeGraph and Wiki, and extracts Chat Memory / Skills.
- Create a team – add human users and virtual agents (Scout, Builder, Reviewer, …). Assign each agent the assets it needs (e.g., Builder gets the product Wiki and CodeGraph; Scout gets market‑research Wiki).
- Run a task – an agent calls the proxy, which pulls the appropriate assets on‑demand, performs its work, and writes back new assets (new Skills, updated Wiki, etc.).
- Iterate – subsequent agents start with the enriched memory, requiring fewer prompts and fewer LLM calls.
Benefits shown in the repo’s benchmark
| Metric | Without memory | With memory | Improvement |
|---|---|---|---|
| PersonaMem (ability to retain user info across long interactions) | 48 % | 76 % | +59 % |
The test demonstrates that agents equipped with the hub retain user preferences and facts far better than a naïve chat‑only approach.
Who might use this?
- Solo developers building AI‑augmented tools who want their LLM assistants to remember past decisions.
- Start‑ups that run multiple specialized agents (research, coding, QA) and need a shared knowledge base without re‑training models.
- Enterprises that want fine‑grained access control (private / team / ACL) over what each agent can see.
- Researchers exploring retrieval‑augmented generation (RAG) pipelines that combine conversation memory with code and doc indexing.
Roadmap (as of the README)
- v2.0.1 – zero‑config cold start, faster Wiki generation, custom prompts per user/team, Skill export, Codex “IDE Plan” mode support.
- Ongoing work on fully automated memory routing, private‑repo CodeGraph indexing, and richer ACL models.
Community & contribution
- Open‑source under the MIT license.
- Issues are responded to within 24 h; discussions and PRs are encouraged.
- The project re‑uses code from the open‑source CodeGraph, Hermes Agent, and Karpathy’s “LLM Wiki” concepts, and credits those upstream projects.
TL;DR – TencentDB Agent Memory is a self‑hosted platform that gives LLM agents a persistent, searchable, and permission‑aware “brain”. By converting chats, docs, and code into layered assets, it lets teams of agents work faster, with fewer repeated prompts, and with better continuity across sessions.
Related
- Project
- Project
- Project
- Project
- Project