TencentDB Agent Memory

出自jwjp-Just Wiki Join Portal
於 2026年8月27日 (四) 19:23 由 Admin對話 | 貢獻 所作的修訂 (创建页面,内容为“== TencentDB Agent Memory Core Specification & Architecture Framework == TencentDB Agent Memory is a hierarchical long-term memory engine open-sourced by the Tencent Cloud Database Team. It is explicitly architected for AI Agents handling long-running sessions, multi-turn tool calling, and cross-session knowledge persistence. Under standard benchmarks, it reduces token usage by over 50% compared to brute-force vector memory retrieval. === 1. The 4-Tier Memory…”)
(差異) ←上個修訂 | 最新修訂 (差異) | 下個修訂→ (差異)
跳至導覽 跳至搜尋

TencentDB Agent Memory Core Specification & Architecture Framework

TencentDB Agent Memory is a hierarchical long-term memory engine open-sourced by the Tencent Cloud Database Team. It is explicitly architected for AI Agents handling long-running sessions, multi-turn tool calling, and cross-session knowledge persistence. Under standard benchmarks, it reduces token usage by over 50% compared to brute-force vector memory retrieval.

1. The 4-Tier Memory Architecture

The engine structures context into a rigorous four-layer data hierarchy to guarantee structured, predictable retrieval without context window flooding.

  • L0: Conversation Tier (Dynamic Memory): Captures raw, unfiltered conversation turns in real-time. It provides lossless token tracking within the active window and isolates state variables for rapid state updates.
  • L1: Atom Tier (Structured Memory): Automatically distills loose dialogue turns into independent atomic facts, key value entities, promises, and relational statements via background extraction pipelines.
  • L2: Scenario Tier (Contextual Memory): Groups atomic facts into dynamic execution topologies based on specific tasks or user flows. Scenarios are serialized into version-controlled markdown artifacts for easy state persistence.
  • L3: Persona Tier (Global Profile): Synthesizes a persistent profile of the user across hundreds of independent historical sessions. It automatically updates long-term behavioural preferences and cross-project knowledge assets.

2. Core Gatekeeping Mechanics

To prevent agents from polluting the persistent data layer with hallucinations or out-of-date runtime execution variables, the system executes three critical operational boundaries.

  • Context Offloading Engine: Monitors the current token density of the live context window. When the window nears 80% saturation, it automatically summarizes active histories, offloads historical segments to L1/L2 tiers, and references them via explicit memory pointers.
  • Hook Gating & Command Whitelisting: Operates at the runtime interface to block unauthorized write commands to the root database schema. Agents can read globally shared profiles but cannot write back to system files or alter shared memories without manual Multi-Factor Authentication.
  • Mermaid Canvas Execution Tracer: Automatically logs tool invocation paths and error stack parameters into standard Mermaid dependency trees. This converts complex execution graphs into human-readable visual layouts for rapid debugging and security reviews.

3. Installation, Deployment & Gateway Orchestration

3.1 OpenClaw Integration via Plugin

To enable memory services within your OpenClaw or OpenClaw-based deployment workflows, install the official provider extension:

openclaw plugins install @tencentdb-agent-memory/memory-tencentdb

Update your core configuration file located at ~/.openclaw/openclaw.json. Append the provider metadata directly inside the plugins block and switch the active state property to true:

"memory-tencentdb": {
    "enabled": true,
    "storage": "sqlite-vec"
}

By default, the engine utilizes embedded SQLite with native vector extensions for localized caching. For distributed or collaborative environments, explicit slot properties must be configured.

3.2 Hermes Gateway Deployment

For independent, production-grade enterprise access, deploy the standalone gateway image via Docker to isolate network calls from the main core:

docker run -d --name hermes-gateway -p 8420:8420 tencentcloud/hermes-gateway:latest

The Hermes Gateway exposes localized API routing endpoints on port 8420. Ensure your enterprise firewall configurations whitelist traffic to this port for authorized internal services. Boardline