Tencent Released a Local Memory System for AI Agents TencentDB

Tencent released the open-source TencentDB Agent Memory — a memory system for AI agents. A 4-level architecture (conversation → atom → scenario → persona) combined with hybrid search reduces tokens by 61% and increases accuracy from 48% to 76%.

AI-processed from MarkTechPost; edited by Hamidun News
Tencent Released a Local Memory System for AI Agents TencentDB
Source: MarkTechPost. Collage: Hamidun News.
Listen to article
Article Fact Sheet & Key Figures
ParameterDetails
Primary sourceMarkTechPost ↗
Editor-in-Chief
Key metric #1L0 — Conversation — history of all messages between user and agent
Key metric #2L1 — Atom — individual facts and events extracted from the conversation via NLP
Key metric #3L2 — Scenario — groups of related atoms, recurring patterns and contexts

Tencent open-sourced TencentDB Agent Memory — a local memory system for AI agents that runs entirely on the user's machine without cloud dependency. The project was released under the MIT license and is ready for integration into OpenClaw and other frameworks.

Two-Level Memory Architecture

The system is divided into two parts. Short-term memory solves the noise problem: when an agent works with a browser or databases, tools generate thousands of lines of logs. Instead of packing all this into the context, TencentDB compresses logs into a compact Mermaid canvas — a visual graph of completed tasks that takes 10-50 times fewer tokens.

Long-term memory is organized as a four-level pyramid of abstractions that reflects how human memory works:

  • L0 — Conversation — history of all messages between user and agent
  • L1 — Atom — individual facts and events extracted from the conversation via NLP
  • L2 — Scenario — groups of related atoms, recurring patterns and contexts
  • L3 — Persona — long-term personality profile of the agent and user, persistent traits

This multi-level approach allows the agent to forget minor details while remembering what matters. This saves tokens when retrieving context and speeds up the search for relevant information.

Hybrid Search and Local Storage

To retrieve needed information from the multi-level pyramid, the system uses dual-channel search: classic BM25 (full-text keyword search) and vector search (semantic, based on embeddings). The results of both searches are combined via RRF (Reciprocal Rank Fusion) — an algorithm that equalizes the contribution of both methods and returns the most relevant records at the top.

By default, everything is stored in a local SQLite database with the sqlite-vec extension for vectors. No cloud — agent data and code remain on the user's machine. The project is delivered as a plugin for OpenClaw (Tencent's framework) and as a ready-to-use Hermes Docker image.

Benchmarks: 61% Fewer Tokens

In tests with WideSearch (a set of complex search tasks), TencentDB showed impressive results:

  • 61% reduction in token consumption compared to baseline
  • 51% improvement in pass-rate (percentage of successfully solved tasks)
  • Improvement in accuracy on PersonaMem (personality modeling) from 48% to 76%

These numbers show that proper memory architecture helps the agent not only save on API calls but also make more informed decisions because it has access to relevant information from the past.

What This Means

Local memory for AI agents is transitioning from a research project to a practical tool. For developers, this opens several doors: you can create long-term agents that learn from previous interactions while saving on cloud API costs; store confidential data locally without sending it to the cloud; deploy AI agents on your own infrastructure. The MIT license means freedom to use in commercial projects.

Story

Key Questions Answered

What are the key details on Two-Level Memory Architecture?

The system is divided into two parts. Short-term memory solves the noise problem: when an agent works with a browser or databases, tools generate thousands of lines of logs. Instead of packing all this into the context, TencentDB compresses logs into a compact Mermaid canvas — a visual graph of completed tasks that takes 10-50 times fewer tokens. Long-term memory is organized as a four-level pyramid of abstractions that reflects how human memory works: L0 — Conversation — history of all messages between user and agent L1 — Atom — individual facts and events extracted from t

What are the key details on Hybrid Search and Local Storage?

To retrieve needed information from the multi-level pyramid, the system uses dual-channel search: classic BM25 (full-text keyword search) and vector search (semantic, based on embeddings). The results of both searches are combined via RRF (Reciprocal Rank Fusion) — an algorithm that equalizes the contribution of both methods and returns the most relevant records at the top. By default, everything is stored in a local SQLite database with the sqlite-vec extension for vectors. No cloud — agent data and code remain on the user's machine. The project is delivered as a plugin fo

What are the key details on Benchmarks: 61% Fewer Tokens?

In tests with WideSearch (a set of complex search tasks), TencentDB showed impressive results: 61% reduction in token consumption compared to baseline 51% improvement in pass-rate (percentage of successfully solved tasks) Improvement in accuracy on PersonaMem (personality modeling) from 48% to 76% These numbers show that proper memory architecture helps the agent not only save on API calls but also make more informed decisions because it has access to relevant information from the past.

ZK
Zhemal Khamidun — CPO at Alpina Digital, product manager of AlpinaGPT. Building AI products since 2019. Hamidun News is a pet project that grew into a production aggregator with 6,000+ readers.
✦ Autonomous AI Execution · Nomad Agent

Delegate Deep Research, Coding & Multi-Step Workflows to Nomad Agent

Deploy autonomous task execution with Nomad Agent (agent.nomadnet.ai) — automated web research, data synthesis, code generation, and MCP tool orchestration.

Launch Nomad Agent →Nomad AI Workspace
What do you think?
Loading comments…