“`html
Marktechpost’s Visual Explainer
Architecture |
Symbolic Short-Term Memory |
Installation and Developer Surface
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
}
}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
}
}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.




