AB
AiBoss
project

TencentDB Agent Memory - Tencent's open-source intelligent agent memory management tool

TencentDB Agent Memory is an open-source AI agent hierarchical memory management tool developed by the Tencent Cloud database team, licensed under the MIT license. The tool utilizes a unique L0-L3 four-layer progressive memory architecture combined with context offloading and Mermaid tasks...

What is TencentDB Agent Memory?

TencentDB Agent Memory is an open-source AI Agent hierarchical memory management tool developed by the Tencent Cloud Database team, licensed under the MIT license. Through its unique L0-L3 four-layer progressive memory architecture and context offloading + Mermaid task canvas technology, the tool provides agents with short-term memory compression and long-term personalized memory capabilities, reducing token consumption by up to 61.38% and increasing task success rate by 51.52%. It is already compatible with mainstream frameworks such as OpenClaw and Hermes.

Main functions of TencentDB Agent Memory

  • Short-term memory compressionThe original tool results are moved to external storage via context unloading, and the structured task graph is preserved using the Mermaid task canvas, so that the context only retains the summary and index.
  • Long-term personalized memoryThe architecture consists of four progressive layers: L0 original dialogue → L1 atomic memory → L2 scene segmentation → L3 user profile, enabling cross-session user preference accumulation.
  • White box traceabilityAll memory layers are stored in human-readable files such as Markdown, JSONL, and Mermaid, supporting tracing back from high-level abstractions to the underlying original evidence.
  • Heterogeneous storage backend: The default is to deploy locally with SQLite + sqlite-vec with zero dependencies. Advanced support is available to connect to Tencent Cloud Vector Database TCVDB to achieve BM25 + Vector hybrid retrieval.
  • Multi-frame adaptationIt is compatible with mainstream agent frameworks such as OpenClaw and Hermes, and supports one-click plugin installation and integration.

How to use TencentDB Agent Memory

  • Install plugins: Execute in the OpenClaw terminal openclaw plugins install @tencentdb-agent-memory/memory-tencentdb The command installs the memory plugin.
  • Restart service: Execute after installation openclaw gateway restart Restart the gateway for the plugin to take effect.
  • Configuration storageThe default setting uses a local SQLite + sqlite-vec backend with no additional configuration required; for advanced use, the Tencent Cloud Vector Database (TCVDB) can be configured to achieve hybrid retrieval.
  • Verification effectAfter restarting, observe the decrease in token consumption and the maintenance of task state in the Agent long task session, and trace the memory layer content through local readable files.

The core advantages of TencentDB Agent Memory

  • Significantly reduce costs and increase efficiencyIn the multi-task continuous session experiment, token consumption was reduced by up to 61.38%, while the task success rate was increased by 51.52%, achieving optimization of both cost and experience.
  • White box is debuggableAll intermediate memory products are human-readable files, supporting 100% step-by-step retrieval and avoiding information loss caused by black-box compression.
  • Zero dependencies, ready to use out of the box: Default local SQLite storage, no external API or cloud service required, installation and deployment can be completed with a single command.
  • Production-level verificationIt has been validated in a real production environment for four types of long-chain tasks: programming, research, document analysis, and workflow orchestration, and has achieved stable convergence.
  • Progressive abstractionThe unique four-layer memory architecture improved user profile accuracy from 48% to 76% in PersonaMem benchmarks, an improvement of nearly 59% over the native OpenClaw.

TencentDB Agent Memory project address

  • GitHub repository: https://github.com/Tencent/TencentDB-Agent-Memory

Comparison of TencentDB Agent Memory with similar competing products

Comparison Dimensions TencentDB Agent Memory Mem0 Letta
Product Positioning Hierarchical memory engine (short-term compression + long-term memory) Lightweight memory layer (personalized fact storage) Full Agent runtime (self-editing memory block)
Memory architecture L0-L3 four-layer progressive architecture Vector storage + LLM fact extraction Three layers of memory (core/recall/archival)
Short-term compression Contextual Unloading + Mermaid Canvas No dedicated short-term compression mechanism Agent autonomous context management
White box traceability Fully human-readable files Black box system management Black Box Agent (self-edited)
Deployment dependencies Local SQLite with zero dependencies Additional vector database backend required Recommended GPU support
Integration method OpenClaw/Hermes One-Click Plugin Extensive SDK Integration Migration to Letta runtime is required.
Open source license MIT Apache 2.0 Apache 2.0
Applicable Scenarios Long-task context compression and cross-session memory Large-scale user personalized memory Long-term autonomous operation of Agent

Application scenarios of TencentDB Agent Memory

  • Programming Development Assistant: Continuously memorize coding standards, constraints, and progress milestones in code projects that span multiple days to avoid repeated confirmations.
  • In-depth research and analysisMaintain task status in long-chain tasks such as web search and research analysis to prevent the loss of intermediate results from causing inference to break down.
  • Workflow orchestrationRecord execution paths and key states in multi-step automated workflows, and support breakpoint resumption and state recovery for complex tasks.
  • Personalized customer serviceIt accumulates user preferences, historical requests, and profile information across conversations to provide a consistently personalized service experience.
  • Document Analysis and ProcessingIn the process of analyzing long documents segment by segment, compress the historical context to maintain the coherence and accuracy of the analytical logic.