Close Menu
  • AI
  • Content Creation
  • Tech
  • Robotics
AI-trends.todayAI-trends.today
  • AI
  • Content Creation
  • Tech
  • Robotics
Trending
  • NVIDIA AI Releases DeltaNet-2 Gated: A Linear attention layer that decouples the Erase and Write of Delta Rule.
  • This Robot is Making Meals in San Francisco’s Tenderloin for a Nonprofit
  • Microsoft Research Releases Webwright – A Terminal Native Web Agent Framework that Scores 60.1% On Odysseys – Up From Base GPT 5.4’s 35%
  • Create a SuperClaude Framework with Modes, Commands and Session memory
  • TencentDB Agent Memory by Tencent: A Four-Tier Pipeline of Local Memory for AI Agents
  • The Bumblebee Open Source Supply Chain Scanner is a read-only tool for developer endpoints.
  • Contrastive Neuron attribution (CNA), Sparse MLP circuit steering without SAE training or weight modification, is released by Nous Research
  • A Step-by-Step Coding Tutorial to Implement GBrain: The Self-Wiring Reminiscence Layer Constructed by Y Combinator’s Garry Tan for AI Brokers
AI-trends.todayAI-trends.today
Home»Tech»TencentDB Agent Memory by Tencent: A Four-Tier Pipeline of Local Memory for AI Agents

TencentDB Agent Memory by Tencent: A Four-Tier Pipeline of Local Memory for AI Agents

Tech By Gavin Wallace23/05/20269 Mins Read
Facebook Twitter LinkedIn Email
NVIDIA AI Introduces AceReason-Nemotron for Advancing Math and Code Reasoning
NVIDIA AI Introduces AceReason-Nemotron for Advancing Math and Code Reasoning
Share
Facebook Twitter LinkedIn Email

Tencent releases new release TencentDB Agent MemoryOpen-source AI memory system. It is distributed under MIT’s license. The project targets two problems that are familiar to those who ship long-horizon agents, context bloats and failures in recall.

The short-term symbol memory is combined with the long-term layered memory. This plugin integrates OpenClaw and the Hermes Agent using a Gateway Adapter. It uses local SQLite and the sqlite-vec extensions as its default backend, which means that no API external is needed.

What makes agent memory difficult?

The majority of current memory stacks shred the data and store it in a vector flat. In this case, recall becomes a similarity-based search on disconnected fragments with no macro level guidance. This architecture is built on two main pillars, memory layering (or symbolic memory) and memory layering.

Four-tier semantic pyramid

TencentDB Agent Memory creates a four level pyramid for personalization over time instead of using a log. Layers are: L0 conversation, L1 atom, L2 scenario, and L3 personality. The layers correspond to raw dialog, atomic fact blocks, scene block, and an user profile.

Personas represent the daily preferences of users and are queried as a first step. Only when more detail is required, the system will drill down into Atoms or raw conversations. Lower layers preserve evidence; upper layers preserve structure.

Storage can be heterogeneous. For full-text retrieval, facts, logs, and trace are stored in databases. The files are human-readable and contain personas, canvases, and scenes. Memory artifacts are stored in layers. ~/.openclaw/memory-tdai/.

Mermaid as a symbol of short-term memory

Tokens are consumed by long-running tasks through tool logs that include code and errors, as well as search results. TencentDB Agent memory addresses this by context offloading in combination with symbolic memories.

Under the Full Tool Logs are exported as external files refs/*.md. Mermaid syntactic is used in the lightweight task canvas to encode transitions between states. In its context window, the agent determines what to do with the symbol graph.

It greps the text when it is in need of raw data. node_id The corresponding file is then retrieved. Tencent’s dev team calls this a “deterministic” drill-down, from the top-layer symbol down to the mid-layer index and then to raw text at bottom.

Benchmark numbers

The results are not measured on isolated sessions but over continuous sessions with a long-horizon. The SWE Bench, for instance, simulates context accumulation pressure by running 50 consecutive tasks during a single session.

Integration of OpenClaw with WideSearch improves the pass rate on WideSearch from 33% up to 50%. This is an improvement relative of 51,522%. Token use drops from 221.31M tokens to 85.64M tokens, which is a 61.38% decrease.

SWE Bench: Success increases from 58.4% up to 64.2%, while tokens drop from 34741.1M down to 23755.4M. This is a reduction of 33.09%. On AA – LCR, success rates increase from 44.0% t 47.5%. Tokens fall from 112.0M – 77.3M. That’s a 30.98% reduction.

PersonaMem’s accuracy increases from 48 to 76% for long-term memories. Tencent provided the numbers.

Recall and retrieval

The retrieval strategy defaults to hybrid. Reciprocal Rank Fussion (RRF), combined with BM25 Keyword Search, is the system’s default retrieval strategy. Some developers can use pure Also, The following are some examples of how to use Embedding The mode can be set in a configuration box. The BM25 tokenizer is compatible with both Chinese (jieba), and English.

The default setting triggers an L1 extraction after every 5 turns. Every 50 memories, a user persona will be generated. Recall automatically returns 5 items, with a default timeout of five seconds. Timeouts skip injection instead of blocking the conversation.

Installation and developer surface

OpenClaw is shipped as a single package in npm: @tencentdb-agent-memory/memory-tencentdb. Node.js 22.16.0 or later is needed for this project. It is enabled by a single config flag. It then takes care of conversation recording, memory extraction and scene aggregation.

A Docker image for Hermes bundles together the agent, plugin and TDAI Memory Gateway. Tencent Cloud DeepSeek V3.2 as the default is used. OpenAI endpoints compatible with OpenAI can work through the MODEL_PROVIDER=custom flag.

Agents are introduced to two tools during the session. tdai_memory_search You can also find out more about the following: tdai_conversation_search. The return reference is the same for both. node_id You can also find out more about the following: result_ref Fields for traceback Tencent Cloud Vector Database is an alternative backend to SQLite.

Marktechpost’s Visual Explainer



TencentDB Agent Memory — Preview

01  /  OVERVIEW

TencentDB Agent Memory: What does it do?

A memory system licensed by MIT for AI agents, which combines a symbolic short-term with a four-tier pipeline of long-term memories. It runs locally with no external API dependency.

Memory for short-term events

The tool logs are sent to files, and the compact Mermaid canvas is kept in context.

Memory for the long-term

Distills conversations into a 4-tier semantic pyramid: L0 → L1 → L2 → L3.

Backend local

By default, SQLite+sqlite-vec is used. Tencent Cloud Vector Database is an optional feature.

Integrations

It is shipped as an OpenClaw Plugin and Hermes Agent Docker images.

02  /  ARCHITECTURE

The Semantic Pyramid: Four Levels

The long-term memory has layers, and is not flat. Upper layers carry structure; lower layers preserve evidence.

L3 · PersonaProfile of the user (persona.md).

L2 · ScenarioScene blocks (Markdown)

L1 · AtomAtomic facts in JSONL

L0 · ConversationRaw dialogue

Drill-down path: Persona → Scenario → Atom → Conversation. References use node_id You can also find out more about the following: result_ref for deterministic traceback.

03  /  SYMBOLIC SHORT-TERM

Mermaid task canvases + context offloading

The most token-intensive tasks are those with long intermediate logs. The plugin keeps the context of a high density symbol graph and offloads these logs onto disk.

What it does

  • The full tool logs will be sent to refs/*.md You can find the directory of data files in your computer’s file system.
  • Mermaid Syntax is used to encode state transitions within a lightweight canvas.
  • The agent examines the symbol chart, then performs greps. node_id Text in raw form can be extracted.

Storage path on disk: ~/.openclaw/memory-tdai/. The artifacts for the white box debugging are all human readable.

04  /  INSTALL

OpenClaw plugin installation

OpenClaw is required.


openclaw plugins install @tencentdb-agent-memory/memory-tencentdb
Openclaw Gateway Start

Zero-config enable

You can add the following: ~/.openclaw/openclaw.json To turn on default SQLite plus sqlite-vec.

{
  "memory-tencentdb": {
    "enabled"True
  }
}

05  /  CONFIGURATION

Daily-tuning parameters

There is a default value for every field. Here are some of the most popular knobs.

Field The default setting is Default Description
storeBackend If you want to know more about sqlite, please click here. Storage backend
recall.strategy Hybrid Keyword / embedding (RRF),
recall.maxResults 5 Products returned as per recall
recall.timeoutMs 5000 Timeout for skipping injection
pipeline.everyNConversations 5 Every N turns, L1 is extracted
persona.triggerEveryN 50 Generate persona every N memories
offload.enabled The same applies to the use of false Short-term compression toggle

06  /  SHORT-TERM COMPRESSION

Mermaid can now be used to offload data (v0.3.4+).

Turn on context offload by following these three steps.

Step 1 · Enable offload in plugin config

{
  "memory-tencentdb": {
    "config": {
      "offload": { "enabled": true }
    }
  }
}

Step 2 · Register the slot so OpenClaw routes offload requests

{
  "plugins": {
    "slots": {
      "contextEngine": "openclaw-context-offload"
    }
  }
}

Step 3 · Apply the runtime patch (once per OpenClaw install)

bash scripts/openclaw-after-tool-call-messages.patch.sh

07  /  HERMES DOCKER

Hermes Memory-Enabled can run on one container

One Docker image includes Hermes Agent and the Memory Gateway, as well as the Memory_TencentDB plugin.


Docker build./ Dockerfile.hermes --t memory-only


Docker Run -d 
  --name hermes-memory 
  --restart unless-stopped 
  -p 8420:8420 
  -e MODEL_API_KEY="your-api-key" 
  -e MODEL_BASE_URL="https://api.lkeap.cloud.tencent.com/v1" 
  -e MODEL_NAME="deepseek-v3.2" 
  -e MODEL_PROVIDER="custom" 
  -v hermes_data:/opt/data 
  hermes-memory


curl http://localhost:8420/health

OpenAI endpoints are compatible with any OpenAI device. MODEL_PROVIDER=custom. Memory data is stored in the hermes_data volume.

08  /  AGENT TOOLS & RECALL

Agents’ view

The agent is exposed to two tools during the session. Recall defaults to BM25+ vector + RRF fusion.

tdai_memory_search

Find L1 Atoms and L2 Scenarios.

tdai_conversation_search

Find raw conversations in L0.

Retrieval defaults

  • Hybrid approach: BM25 keywords + vector embedding fused by Reciprocal Rank Fusion.
  • The BM25 tokenizer can be used in both English (jieba), as well as Chinese.
  • It returns 5 items for each recall.
  • Refer to the following: node_id You can also find out more about the following: result_ref Traceback is a good way to find out.

09  /  BENCHMARKS

OpenClaw: Gains reported

Measurable over continuous sessions with horizons long, and not just isolated turns. The SWE-bench performs 50 tasks in a single session.

Benchmark Baseline Plugin Δ Pass Δ Tokens
WideSearch 33% 50% +51.52% −61.38%
SWE-bench 58.4% 64.2% +9.93% −33.09%
AA-LCR 44.0% 47.5% +7.95% −30.98%
PersonaMem 48% 76% +59% —

Tencent’s evaluations of the OpenClaw integration are reflected in these numbers.

10  /  RESOURCES

What to do next?

Documentation and source code.

Source code

github.com/Tencent/TencentDB-Agent-Memory

The npm package

@tencentdb-agent-memory/memory-tencentdb

Road Map

Visual debugging dashboard, portable memory, automatic skill generation and Skill creation.

Curated By MARKTECHPOST  ·  AI Research, Engineered for Builders

What you need to know

  • TencentDB Agent Memory, Tencent’s (MIT-certified) open-source AI memory system is built using a layered pipeline of long-term and symbolic memory. There are no API dependencies.
  • Long-term memory is structured as a 4-tier semantic pyramid (L0 Conversation → L1 Atom → L2 Scenario → L3 Persona), with drill-down via node_id You can also find out more about the following: result_ref Instead of flat vector, recall.
  • The short-term memory is able to handle verbose logs of tool usage. refs/*.md It only keeps a Mermaid compact task canvas as context.
  • Reported gains when integrated with OpenClaw: WideSearch pass rate 33% → 50% with a 61.38% token reduction, SWE-bench 58.4% → 64.2%, AA-LCR 44.0% → 47.5%, and PersonaMem accuracy 48% → 76%.
  • This plugin ships as a single OpenClaw npm and Docker image, with local SQLite+sqlite-vec, hybrid BM25+RRF retrieval (by default), and an optional Tencent Cloud Vector Database backend.

Check out the Repo. Also, feel free to follow us on Twitter Join our Facebook group! 150k+ ML SubReddit Subscribe Now our Newsletter. Wait! Are you using Telegram? now you can join us on telegram as well.

You can partner with us to promote your GitHub Repository OR Hugging Page OR New Product Launch OR Webinar, etc.? Connect with us


Michal Sutter, a data scientist with a master’s degree in Data Science at the University of Padova. Michal is a data scientist with a background in machine learning, statistical analysis and data engineering.

AI tencent
Share. Facebook Twitter LinkedIn Email
Avatar
Gavin Wallace

Related Posts

NVIDIA AI Releases DeltaNet-2 Gated: A Linear attention layer that decouples the Erase and Write of Delta Rule.

24/05/2026

Microsoft Research Releases Webwright – A Terminal Native Web Agent Framework that Scores 60.1% On Odysseys – Up From Base GPT 5.4’s 35%

24/05/2026

Create a SuperClaude Framework with Modes, Commands and Session memory

24/05/2026

The Bumblebee Open Source Supply Chain Scanner is a read-only tool for developer endpoints.

23/05/2026
Top News

A detection tool claims that the Pope’s warnings about AI were AI-generated.

Power Play: The Great Big Power Play

Elon Musk Reveals Grok 4, Amid Controversy over Chatbot Antisemitic Comments

AI’s Hacking Skills Are Approaching an ‘Inflection Point’

Walmart and OpenAI are reshaping their agentic shopping deal

Load More
AI-Trends.Today

Your daily source of AI news and trends. Stay up to date with everything AI and automation!

X (Twitter) Instagram
Top Insights

Data Engineers: Best Practices and Pros & Cons of Mastering Vibe Coding

19/08/2025

AI Models for War – What they Look Like

05/03/2026
Latest News

NVIDIA AI Releases DeltaNet-2 Gated: A Linear attention layer that decouples the Erase and Write of Delta Rule.

24/05/2026

This Robot is Making Meals in San Francisco’s Tenderloin for a Nonprofit

24/05/2026
X (Twitter) Instagram
  • Privacy Policy
  • Contact Us
  • Terms and Conditions
© 2026 AI-Trends.Today

Type above and press Enter to search. Press Esc to cancel.