Tencent 🔥: They open-sourced a long term memory system for AI agents that cuts token usage by 61.38% and it runs fully local with zero external API dependencies.
TencentDB Agent Memory builds a 4-tier semantic pyramid:
> L0: Raw conversation logs
> L1: Atomic facts extracted from those logs
> L2: Scene blocks grouped from related facts
> L3: Full user persona distilled from everything above
The agent reads the persona first and drills down to raw logs only when it needs to verify a specific detail.
- Upper layers carry judgment.
- Lower layers carry evidence.
For short-term memory, it compresses heavy tool logs into Mermaid symbol graphs. Instead of thousands of tokens of verbose output sitting in context, you get a lightweight node map. The agent navigates it using node IDs, pulling the full raw text only when an error occurs.
The benchmark numbers from the WideSearch test: task success rate up 51.52%, token consumption down 61.38%. On PersonaMem, accuracy jumped from 48% to 76%.
These were measured over continuous long-horizon sessions running 50 consecutive tasks each not isolated single-turn evals.
github.com/TencentCloud/Tenc…