Tencent's agent memory: fewer tokens, less repetition
A local-first memory plugin that compresses agent context into Mermaid diagrams and layered personas instead of bloating the prompt.

What it does TencentDB Agent Memory is an OpenClaw/Hermes plugin that gives AI agents long-term memory without calling external APIs. It runs entirely local—SQLite + sqlite-vec by default—and automatically captures conversations, extracts atomic facts, aggregates scenes, and builds user personas that persist across sessions.
The interesting bit
The project rejects the usual “dump everything into a vector store” approach. Instead it uses a 4-tier semantic pyramid (raw chat → atoms → scenarios → persona) and offloads verbose tool logs into Mermaid symbol graphs. The agent keeps a lightweight canvas in context; if it needs details, it drills down via node_id. Think of it as progressive JPEG compression, but for agent memory—structure at the top, evidence at the bottom.
Key highlights
- Benchmarked on continuous long-horizon sessions (50-task SWE-bench runs, not single turns)
- Claims up to 61.38% token reduction and 51.52% relative pass-rate improvement on WideSearch when paired with OpenClaw
- PersonaMem accuracy reportedly jumps from 48% to 76% with the plugin enabled
- Heterogeneous storage: databases for raw retrieval, Markdown files for human-readable top-layer structures
- Full drill-down traceability from persona/scene symbols back to original conversation logs
- Also ships as a Dockerized Hermes gateway with a one-launch setup
Caveats
- The impressive headline benchmarks come from OpenClaw integration; standalone behavior is less documented
- Short-term compression requires a runtime patch to OpenClaw and manual slot registration
- Hermes path defaults to Tencent Cloud’s DeepSeek-V3.2 endpoint; using another model means configuring four env vars yourself
Verdict Worth a look if you’re running OpenClaw or Hermes agents and watching your context window balloon. Skip it if you’re not already in those ecosystems—the memory architecture is elegant but the plugin is tightly coupled to its host frameworks.