Tencent's Agent Memory Library Hits GitHub #1 with a Layered Architecture That Cuts Token Costs by 61%
GitHub Trending #1 | Tencent Agent Memory Library Technical Breakdown: Layered Memory vs. Vector Heaps, So AI Stops Asking Repeatedly
From #13 to #1 in four days, Tencent turned Agent memory into team-level infrastructure with permission governance
Project Overview
| Attribute | Value |
|---|---|
| Repository | TencentCloud/TencentDB-Agent-Memory |
| Language | TypeScript (91.6%) |
| License | README marks MIT, GitHub does not recognize it as a standard license |
| Total Stars | 13,404 |
| New Today | +1,138 |
| Forks | 1,264 |
| Latest Version | v2.0.0 (2026-08-04) |
| Created | 2026-04-07 |
| Trending Rank | #1 |
What It Is
It aims to solve a daily annoyance: you repeatedly explain the same project background, the same SOP, the same output format to an Agent. This information shouldn't need to be retold every time, nor should it be indiscriminately stuffed into the context.
TencentDB Agent Memory solidifies these things into four types of reusable assets—Chat Memory, Skill (reusable SOP), Wiki (structured documents and link graphs), CodeGraph (code symbol and call relationship index)—and equips them with ownership, versioning, visibility, and permissions. In the official phrasing, it lets the next Agent load the save file directly.
It explicitly rejects two common approaches: neither violently piling up all history, nor doing irreversible lossy summarization. Instead, it uses layering.
Technical Highlights
- Long-term memory layering: L0 raw conversation → L1 atomic facts → L2 scenarios → L3 persona profiles, forming a semantic pyramid. Daily reads only access the top layer; drill down layer by layer only when details are needed.
- Short-term context layering: The bottom layer archives complete tool outputs (
refs/*.md), the middle layer extracts step summaries (jsonl), and the top layer compresses everything into a lightweight Mermaid state diagram. - Symbolic memory: Only the Mermaid diagram stays in context; verbose logs are offloaded to external files, with precise traceability back to the original text via
node_id—compression without losing evidence. - Heterogeneous storage: Bottom-layer facts land in a database to guarantee full-text search; top-layer profiles are stored as Markdown to guarantee human readability and auditability—the lower layer stores evidence, the upper layer stores structure.
- Team governance: Three visibility levels—private / team / restricted—paired with Agent Loadout to bind different assets and priorities to different Agents.
Official Benchmark Data
The following are results self-tested by the project team on the OpenClaw host, measuring continuous long-session conversations rather than single-turn tasks (e.g., SWE-bench runs 50 tasks per session consecutively to simulate context accumulation pressure):
| Benchmark | Original | After Integration | Relative Change |
|---|---|---|---|
| WideSearch Success Rate | 33% | 50% | +51.52% |
| WideSearch tokens | 221.31M | 85.64M | −61.38% |
| SWE-bench Success Rate | 58.4% | 64.2% | +9.93% |
| SWE-bench tokens | 3,474.1M | 2,375.4M | −33.09% |
| PersonaMem Accuracy | 48% | 76% | +59% |
Why It's Hot Now
The Agent capability bottleneck is shifting from "can it do it" to "can it remember." When the same Agent needs to run dozens of tasks consecutively, or multiple Agents in a team need to share the same project understanding, context windows and vector databases are no longer enough. This gap has only truly been exposed this year, and Tencent is the first major company to build it into team-level infrastructure with permission governance.
| Date | Rank | Total Stars | New Today |
|---|---|---|---|
| 2026-08-02 | #13 | 10,239 | +342 |
| 2026-08-03 | #10 | 10,899 | +604 |
| 2026-08-04 | #5 | 12,019 | +1,091 |
| 2026-08-05 | #1 | 13,404 | +1,138 |
Comparison with Similar Solutions
- vs. pure vector memory libraries — Traditional solutions chop data into pieces and throw them into a flat vector database; recall degrades into blind searching among fragments. The layered design here lets retrieval first see the structure, then drill down, at the cost of much higher engineering complexity.
- vs. built-in session memory of various Agents — Built-in memory is usually bound to a single client, a single user. Its differentiator is cross-Agent, cross-framework transfer, plus team-level governance with ACL.
- vs. hand-written CLAUDE.md / project rules — Hand-written rules win on simplicity, directness, and full control. Its value is automatic sedimentation—reverse-extracting SOPs from successfully completed tasks, rather than relying on people remembering to write them down.
Sober Reflections
- All benchmarks are official self-tests, all measured on the single OpenClaw host. There is currently no third-party reproduction. The numbers are pretty, but treat them as vendor claims for now.
- 13,404 stars, only 51 Watchers. This ratio is abnormally high, indicating most people are "bookmark first, ask later"; the actual scale of usage is likely far smaller than the star count.
- 503 open issues is on the high side for a project only four months old. It's worth flipping through the issue list before integration to see where the pitfalls cluster.
- Deployment is not lightweight: three Docker images plus a proxy; enabling short-term compression also requires running a patch script to modify host behavior—not as simple as "install a plugin."
- License information is inconsistent—the README badge says MIT, but GitHub failed to recognize it as a standard protocol. Enterprises need to confirm this clearly before adoption.
Its real ambition is not to make Agents "remember more," but to turn memory into an asset that can circulate between teams and Agents—which also means it wants to occupy the position of infrastructure.
Who It's For
- Teams with multi-person collaboration that need multiple Agents to share the same project background and SOPs
- Heavy users stuck on token costs in long-task scenarios, urgently needing context offloading
- Developers already using OpenClaw or Hermes who want to try a memory layer at low cost
Future Outlook
Whether the memory layer will become a standard layer in the Agent tech stack is still undecided. But Tencent has bundled permission governance, asset versioning, and cross-framework assembly together, indicating it's benchmarking not against personal plugins, but against an enterprise-internal Agent middle platform. Two things to watch next: whether the official benchmark set can be reproduced by a third party, and whether the same effects can be maintained when switched to non-Tencent Cloud model endpoints.
📊 Data Source: GitHub Trending · 2026-08-05
This article is an in-depth interpretation of today's GitHub Trending #1 project. See the daily report for the full list.
Tracking GitHub Trending daily, writing daily reports and in-depth interpretations. More content available by following the public account "TrendingRadar".
Top 1 of 3 from juejin.cn, machine-translated. The original thread is authoritative.
Done something similar, adding an easily overlooked point: layering solves 'what to store,' but the real difficulty is 'when to trust.' Is the index still trustworthy after a crash and rebuild? Could recall overwrite a current decision with an expired answer? The pitfall I've stepped in: the biggest risk of a memory system isn't forgetting, but remembering the wrong thing and using it with full confidence. Evidence traceability and version invalidation are more important than layering itself.
Agreed. This is also why the official stance is not to recommend production use yet. It's like there's a lab-validated direction now, but it's not enough to handle the various complexities of a production environment. But since the lab direction has been validated and the hype is so high now, this project still has a chance to be tested in production later!
Agreed. The hype validates whether the direction is right, but production tests whether the details are solid enough — I'm focused on just two landing points: whether memory can still be mapped back to the original text after index rebuild (evidence traceability), and how expired facts get identified and down-weighted (version invalidation). If these two points aren't solved, 'remembering the wrong thing' will be more troublesome than 'forgetting' in production.