Tencent Open-Sources TencentDB Agent Memory: A 4-Tier Local Memory Pipeline for AI Agents

Disclosure: Some links in this article are affiliate links. AI Maestro may earn a commission if you make a purchase, at no…

By AI Maestro May 23, 2026 3 min read
Tencent Open-Sources TencentDB Agent Memory: A 4-Tier Local Memory Pipeline for AI Agents

“`html




Tencent Open-Sources TencentDB Agent Memory: A 4-Tier Local Memory Pipeline for AI Agents

Marktechpost’s Visual Explainer

What is TencentDB Agent Memory?

Tencent has released TencentDB Agent Memory, an open-source memory system for AI agents. The project ships under the MIT license and targets a problem familiar to anyone working with long-horizon agents: context bloat and recall failure.

The system combines symbolic short-term memory with a 4-tier long-term memory pipeline, running fully locally without requiring any external APIs.

The 4-Tier Semantic Pyramid

For long-term personalization, TencentDB Agent Memory builds a four-level pyramid instead of a flat log. The layers are L0 Conversation, L1 Atom, L2 Scenario, and L3 Persona.

  • L3 (Persona) carries user preferences and is queried first.
  • Lower layers preserve evidence; upper layers preserve structure.

The system stores facts, logs, and traces in databases for full-text retrieval, while personas, scenes, and canvases are stored as human-readable Markdown files. Layered memory artifacts live under ~/.openclaw/memory-tdai/.

Symbolic Short-Term Memory via Mermaid

Long-running agent tasks consume tokens through verbose tool logs, search results, code, and error traces. TencentDB Agent Memory addresses this through context offloading combined with symbolic memory.

  • Full tool logs are offloaded to external files under refs/*.md.
  • State transitions are encoded in Mermaid syntax inside a lightweight task canvas.
  • The agent reasons over the symbol graph, then retrieves raw text using node_id.

Installation and Developer Surface

The OpenClaw integration ships as a single npm package: @tencentdb-agent-memory/memory-tencentdb. The project requires Node.js 22.16 or higher.

  • To enable it, add the following to ~/.openclaw/openclaw.json:
  • {
      "memory-tencentdb": {
        "enabled": true
      }
    }
  • The plugin handles conversation capture, memory extraction, scene aggregation, persona generation, and recall.

For Hermes, a Docker image bundles the agent, the plugin, and the TDAI Memory Gateway. The default model is Tencent Cloud’s DeepSeek-V3.2. Any OpenAI-compatible endpoint works through the MODEL_PROVIDER=custom flag.

  • To expose tools during a session:
  • openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
    openclaw gateway restart
    
    # Enable via OpenClaw plugin config and runtime patch.

Benchmark Numbers

  • SWE-bench success climbs from 58.4% to 64.2% while token usage falls from 3474.1M to 2375.4M, a 33.09% reduction.
  • On SWE-bench, PersonaMem accuracy rises from 48% to 76%. These numbers come from Tencent’s own evaluations.

Recall and Retrieval

  • The system combines BM25 keyword search with vector embeddings, fused using Reciprocal Rank Fusion (RRF).
  • Default settings trigger an L1 memory extraction every five turns. A user persona is generated every 50 new memories.
  • Recall returns five items by default with a 5-second timeout. On timeout, the system skips injection rather than blocking the conversation.

Installation and Developer Surface

  • The OpenClaw integration ships as a single npm package: @tencentdb-agent-memory/memory-tencentdb.
  • To enable it, add the following to ~/.openclaw/openclaw.json:
  • {
      "memory-tencentdb": {
        "enabled": true
      }
    }
  • The plugin then handles conversation capture, memory extraction, scene aggregation, persona generation, and recall.

For Hermes, a Docker image bundles the agent, the plugin, and the TDAI Memory Gateway. The default model is Tencent Cloud’s DeepSeek-V3.2. Any OpenAI-compatible endpoint works through the MODEL_PROVIDER=custom flag.

  • To expose tools during a session:
  • openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
    openclaw gateway restart
    
    # Enable via OpenClaw plugin config and runtime patch.

Two tools are exposed to agents during a session: tdai_memory_search and tdai_conversation_search. Both return references with node_id and result_ref fields for traceback. A Tencent Cloud Vector Database (TCVDB) backend is also available as an alternative to local SQLite.

Marktechpost’s Visual Explainer

Preview — this is how the embed will look inside your WordPress post.

© 2026 Marktechpost. All rights reserved.




“`

Note: The `