📖 The AI Tool Bible

TencentDB Agent Memory

Local long-term memory for AI agents using layered storage and Mermaid-based symbolic compression.

Free· MIT-licensed, self-hostedAgentsMulti-model
Visit website →
Best for

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 if

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.

Editor's take

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

agent-memorylong-contextpersona-modelingtool-log-compressionlong-horizon-agents

Explore related

Compare with similar tools

All in Agents