Tencent open-sources Agent Memory to cut AI token consumption by 61%

  • The open-source tool addresses context window limitations for AI agents in long tasks through context offloading and task canvas technologies.
  • Multi-task experiments show token consumption can be reduced by up to 61%, while significantly improving task success rates and reasoning stability.
(Image credit: Tencent Clou)

Tencent Cloud announced the official open-sourcing of its TencentDB Agent Memory tool, focusing on optimizing memory capabilities for AI agents in long-task scenarios.

The open-source release focuses on short-term memory compression, following the launch of its long-term memory feature last month which provides personalized memory support.

The new technology aims to solve the high-cost issue of AI agents handling lengthy tasks, reducing token consumption by up to 61%, according to an announcement on Thursday.

As the task chains of AI agents continue to lengthen in scenarios such as code development, a massive amount of intermediate results can quickly fill up the context window of large language models.

This leads to a sharp increase in token costs, as well as the loss of task states and a decline in reasoning stability.

To address these challenges, the Tencent Cloud database team introduced the "Mermaid task canvas" technology, the announcement said.

The technology transforms linear historical records into a visual, structured navigation map. This allows AI agents to clearly identify parallel branches and prerequisites, preventing them from losing direction during the execution of complex long tasks.

Another core technology is context offloading. After each tool invocation, the system writes the complete results to external files, retaining only summaries and indexes in the context window.

This four-tier progressive storage structure significantly saves token space while ensuring 100% complete traceability of the underlying raw data.

Experimental data shows that in multi-task continuous sessions, the solution significantly improves task success rates while lowering token consumption. Reducing context noise allows the model's attention to focus more on the current target, the announcement said.

The tool is currently compatible with mainstream agent frameworks such as OpenClaw and Hermes, supporting minimalist installation and local deployment with zero external dependencies, the announcement added.

The open-source move releases internally validated capabilities to the community, providing developers with a more reliable and transparent "second brain" and turning every interaction into a reusable asset, according to Tencent.

Tencent launches the overseas beta of its minimalist desktop AI agent QClaw, integrating major international messaging apps such as WhatsApp and Telegram.
Apr 21, 2026
AI News Alert
Subscribe to receive email notifications immediately when new articles about AI are published.
AI
View more channels