TencentDB Agent Memory

Adds layered long-term and symbolic short-term memory to AI agents to reduce token usage and improve task success.

Adds layered long-term and symbolic short-term memory to AI agents to reduce token usage and improve task success.

The gist

TencentDB Agent Memory is an open-source memory system for AI agents, developed by Tencent. It addresses agents forgetting context in long-running tasks by providing a layered memory architecture. This system helps agents learn workflows, retain task context, and reuse past experience without simply accumulating a massive history or using lossy summarization. It structures memory to improve reasoning and reduce human repetition.

What it does

  • Condenses verbose tool logs into compact Mermaid symbol graphs to manage short-term memory.
  • Distills conversations into a layered semantic pyramid of facts, scenes, and personas for long-term memory.
  • Integrates with agent frameworks like OpenClaw and Hermes as a plugin or adapter.
  • Provides full traceability from high-level abstractions back to raw logs for debugging.
  • Uses a local SQLite backend with hybrid retrieval for out-of-the-box functionality.
  • Generates human-readable memory artifacts (Markdown, Mermaid) for white-box inspection.

How it works

TencentDB Agent Memory operates as a plugin for agent frameworks or a self-hosted Docker container. It automatically captures agent conversations and tool outputs, processing them into a layered structure. For short-term tasks, it creates symbolic Mermaid graphs; for long-term memory, it builds a semantic pyramid. It runs with a local SQLite backend by default and is configured via JSON files. The project is open-source under the MIT license.

Best for

This tool is ideal for developers building long-horizon AI agents who require a persistent, auditable memory system to improve performance and reduce context window costs across extended sessions.

Watch out for

This is a library for developers, not a standalone application. Full functionality requires integration with a supported agent framework like OpenClaw or Hermes, and may involve applying patches to the host framework.