

TencentDB Agent Memory
Local long-term memory for AI agents using layered storage and Mermaid-based symbolic compression.
In short
TencentDB Agent Memory is a free, self-hosted memory layer for AI agents. It uses layered storage and Mermaid compression to manage long-horizon context locally.
Pick TencentDB Agent Memory if you are building long-horizon agents and need a self-hosted memory layer that compresses tool logs and persists user personas without third-party APIs.
Skip it if you want a managed memory-as-a-service or a drop-in SDK for a single chatbot with short sessions.
TencentDB Agent Memory is an open-source memory layer for AI agents that rejects flat vector dumps in favor of a four-tier progressive pipeline (L0 Conversation, L1 Atom, L2 Scenario, L3 Persona). Short-term tool logs are offloaded to external files and condensed into a lightweight Mermaid canvas the agent can reason over, while long-term knowledge is distilled into structured personas and scenes with drill-down paths back to raw evidence. Hybrid retrieval combines BM25 and vector search over a local SQLite backend with zero external API dependencies.
It is aimed at developers building long-horizon autonomous agents where context bloat and irreversible summarization are real problems. Tencent publishes benchmark numbers on WideSearch, SWE-bench, AA-LCR, and PersonaMem showing token reductions in the 30-60% range and substantial accuracy gains when paired with the OpenClaw agent framework. The project is MIT-licensed, written primarily in TypeScript (Node 22+), and ships as an npm package with HTTP endpoints for capture, search, and recall.
Integrations include a first-party OpenClaw plugin and a Hermes Gateway adapter. Because everything runs locally, it is suitable for teams that cannot send agent traces to managed memory services, though it is not a hosted product and requires engineering effort to wire into an existing agent stack.
One of the more architecturally serious open-source memory projects we've seen, with concrete benchmarks instead of vibes. The Mermaid-canvas offloading trick is genuinely clever, and the L0-L3 pyramid is a saner mental model than flat vector dumps. Expect real integration work, especially outside the OpenClaw ecosystem.
— The AI Tool Bible editorial team
Pros
- ✅ Fully local with no external API dependencies
- ✅ Layered L0-L3 pyramid keeps both evidence and structure traceable
- ✅ Mermaid-based symbolic memory measurably cuts token usage
- ✅ MIT-licensed and benchmarked against SWE-bench and PersonaMem
- ✅ First-party OpenClaw and Hermes integrations
Cons
- ⚠️ Self-host only; no managed service
- ⚠️ Tightest integration is with Tencent's OpenClaw framework
- ⚠️ Requires Node 22+ and engineering work to retrofit into existing agents
Use cases
Frequently asked
- How much does TencentDB Agent Memory cost?
- It is free and MIT-licensed. You must self-host it, so there are no subscription fees, but you need to manage the infrastructure yourself.
- What programming languages and environments does it support?
- It is written primarily in TypeScript and requires Node 22+. It ships as an npm package with HTTP endpoints for capture, search, and recall.
- Does it require external API dependencies?
- No. It runs locally with zero external API dependencies. It uses a local SQLite backend for hybrid retrieval combining BM25 and vector search.
- What integrations are available for this tool?
- It includes a first-party OpenClaw plugin and a Hermes Gateway adapter. It is designed to integrate into existing agent stacks, though it requires engineering effort.
- Is it suitable for short-session chatbots?
- No. It is best for long-horizon agents. Skip it if you want a managed memory-as-a-service or a drop-in SDK for a single chatbot with short sessions.
Explore related
Compare with similar tools
All in Agents →LangGraph
FeaturedStateful, graph-based agent orchestration from LangChain.
CrewAI
FeaturedPython framework for multi-agent orchestration.
Ernie Bot
Baidu's Mandarin-first ChatGPT rival, powered by the ERNIE model family
Moveworks
The enterprise AI assistant that searches, answers, and takes action across your business systems
AWS Bedrock
Build and scale generative AI applications with foundation models
Claude Agent SDK
Anthropic's official SDK for building autonomous Claude agents.