TencentDB-Agent-Memory  by Tencent

AI agent memory system with layered, symbolic, and local capabilities

Created 1 month ago
3,845 stars

Top 12.5% on SourcePulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

TencentDB Agent Memory provides a fully local, zero-dependency solution for AI agent long-term memory. It addresses the challenge of agents repeatedly requiring context by implementing a layered, symbolic memory system. This system is designed for developers and researchers building sophisticated AI agents, offering significant benefits in reduced token consumption, improved task success rates, and enhanced agent reasoning capabilities.

How It Works

The core innovation lies in its "memory layering" and "symbolic memory" architecture. Memory is structured hierarchically, distinguishing between short-term context (raw logs, summaries, Mermaid canvases) and long-term personalization (conversations, atoms, scenarios, personas). This layered approach utilizes heterogeneous storage, with databases for raw data and human-readable Markdown/Mermaid for higher-level abstractions. Symbolic memory encodes task state transitions into dense Mermaid syntax, offloading verbose logs to external files. Agents interact with a lightweight Mermaid canvas, retrieving detailed information via node_id only when necessary, thereby minimizing token usage and preserving full traceability.

Quick Start & Requirements

  • OpenClaw Integration: Install via openclaw plugins install @tencentdb-agent-memory/memory-tencentdb and restart the gateway. Requires Node.js >= 22.16 and OpenClaw >= 2026.3.13. Optional short-term compression requires applying a patch script.
  • Hermes (Docker): Launch with docker run ... hermes-memory. Requires Docker and LLM API credentials.
  • Demos: Available for OpenClaw × Agent Memory and Hermes × Agent Memory.

Highlighted Details

  • Performance Gains: Achieves up to 61.38% token reduction and 51.52% improvement in pass rates when integrated with OpenClaw. PersonaMem accuracy is boosted from 48% to 76%.
  • Layered Architecture: Implements progressive disclosure across short-term context, long-term personalization, and skill generation layers.
  • White-Box Debuggability: Offers a traceable path from high-level abstractions (Persona, Scenario) down to ground-truth evidence (Conversation, raw logs) via node_id and result_ref, facilitating easier debugging.
  • Production-Ready: Features include an OpenClaw plugin, Hermes Gateway adapter, local SQLite backend, and hybrid retrieval (BM25 + vector + RRF).

Maintenance & Community

Contributions are welcomed through GitHub Issues, Discussions, and Pull Requests. The project maintains an active Discord community for direct interaction with developers. Key roadmap items include portable memory, automatic skill generation, and a visual debugging dashboard.

Licensing & Compatibility

The project is released under the MIT license, permitting commercial use and integration into closed-source applications.

Limitations & Caveats

Several advanced features, such as portable memory, automatic skill generation, and a visual debugging dashboard, are listed as future roadmap items, indicating they are not yet implemented. The Hermes Docker setup requires specific LLM API key and endpoint configurations. Optimal short-term compression with OpenClaw necessitates applying a runtime patch.

Health Check
Last Commit

2 days ago

Responsiveness

Inactive

Pull Requests (30d)
26
Issues (30d)
44
Star History
3,865 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.