Back to Model List

Hy Memory 2.0 – Tencent HunYuan's Open-Source Agent Memory Framework

AI Tech Editorial
RSS Feed

Executive Summary:

Hy Memory 2.0 is an open-source agent memory framework developed by Tencent HunYuan, featuring a three-tier architecture: "model + framework + application." It includes the Hy-Memory-30A3B model speci...

1. What is Hy Memory 2.0

Hy Memory 2.0 is an open-source agent memory framework developed by Tencent HunYuan, featuring a three-tier architecture: "model + framework + application." It includes the Hy-Memory-30A3B model specifically trained for memory tasks, an SDK that supports three types of memory—chat, work, and code—and a local memory management application called MemHub that can connect to 10 different AI tools. This framework enables the accumulation and synchronization of personal memories across conversations and tools, granting agents the ability to maintain continuous and complete long-term memory. It has already been validated and deployed in core Tencent business applications such as Tencent Self-Select and Tencent News.

Technical Positioning and Domain: Hy Memory 2.0 is positioned in the niche area of agent memory management, with its core objective being to address the "memory fragmentation" issue that large language models face in long-horizon tasks and multi-turn interactions. Unlike traditional retrieval-augmented generation (RAG) approaches, this framework systematically designs memory storage, updates, and retrieval as an independent technical stack, providing a structured long-term memory infrastructure for agents.

Development Background: This project was led by the Tencent HunYuan large model team, leveraging Tencent's extensive interaction data and engineering experience accumulated across social, content, and financial scenarios. The team observed that although large models excel in single-turn tasks, their ability to maintain context across sessions remains a bottleneck for deploying agents in complex business scenarios, prompting the initiation of specialized model training and framework development for memory-related applications.

Core Value: Hy Memory 2.0 elevates memory from being an "appendage of the context window" to a "manageable and reusable asset across tools." Through three key mechanisms—event-based organization, conditional reuse, and task resumption—the framework significantly improves memory accuracy while reducing Token consumption, offering an engineered memory solution for long-horizon agent tasks.

Technical Features: The framework employs a specialized memory model with approximately 3B active parameters, achieving the top performance among open-source frameworks on multiple benchmarks. It also introduces the concepts of working memory and code memory for the first time, covering a more comprehensive set of application scenarios than general conversational memory. Its minimal storage footprint and high Token efficiency make it a viable solution for deployment in resource-constrained environments.

2. Key Features

  • Three-tier fully open-source architecture: The specialized model, memory framework, and MemHub application are all fully open-sourced. Developers can use any one of these tiers independently or combine them into a complete Memory solution. This design offers high flexibility, meeting diverse needs ranging from lightweight integration to full-stack deployment.

  • Three types of memory management: The framework manages the storage, updating, and evolution of chat, work, and code memories. Developers can seamlessly integrate memory capabilities into their own Agent using the SDK. While these three types of memory are uniformly managed at the lower level, they differ in organizational logic and application scenarios, covering the complete memory requirements for Agent interactions.

  • Chat memory enhancement: Elevates fragmented factual memories into complete event narratives, automatically linking related content across different times and conversations, and resolving conflicting information. When handling multi-clue questions, the system first merges duplicate information and removes contradictory content, then provides the cleaned memory to the model, significantly improving the coherence and accuracy of responses.

  • Work memory consolidation: Records task objectives, established practices, and reusable experiences across multiple dimensions. Before reusing experiences, the system checks whether the conditions are matched. This mechanism prevents incorrect transfer of experiences across different scenarios, effectively supporting the execution and progression of long-term tasks.

  • Code memory construction: Specifically consolidates project context for code scenarios, including project standards, architectural decisions, and personal coding preferences. On the CodeMemoryBench benchmark, the task resolution rate reaches 35.6%, the highest among open-source frameworks, significantly improving the accuracy of code-related Q&A and task resolution.

  • MemHub memory synchronization: Local applications support connecting to 10 AI tools such as Cursor and Codex, allowing for one-click import of historical conversations and real-time cross-tool memory synchronization. The built-in Hy Memory SDK consolidates sessions from various tools into a unified personal memory locally and supplements the context back to the tools in plugin form.

  • Task resumption from breakpoints: When resuming a long-term task, the framework first identifies the current matter being processed, then precisely recalls relevant decisions, applicable experiences, and historical work processes. It retrieves the most relevant memory with the least number of Tokens, achieving efficient task resumption.

3. How to Use

  1. Obtain Open Source Resources: Download the framework and application code from the GitHub repositories (Tencent-Hunyuan/Hy-Memory, Tencent-Hunyuan/MemHub), and retrieve the model weights from the HuggingFace model library (tencent/Hy-Memory-30B-A3B). It is recommended to use Git to clone the repositories to ensure you stay up-to-date with version changes.

  2. Developer Integration with SDK: Integrate the Hy Memory SDK into your own Agent to leverage its core capabilities for storing, updating, and recalling memories. The SDK provides standardized API interfaces and supports mainstream development languages such as Python. Developers need to configure the backend service for memory storage based on their project requirements.

  3. Install MemHub for Regular Users: Download the CLI command-line tool or the Mac application for MemHub, using it as a local memory management center. After installation, initial configuration is required, including setting the local storage path and privacy options.

  4. Authorize and Link AI Tools: In MemHub, authorize and link 10 AI tools already supported, such as WorkBuddy, Cursor, and Codex. The authorization process follows the OAuth or API Key mechanisms of each respective tool, ensuring the security of data transmission.

  5. Import Historical Conversations: After authorization, import historical conversation records from each tool with a single click. The built-in Hy Memory SDK automatically processes these records into local personal memories. The import process includes deduplication, cleaning, and structuring to form a unified memory format.

  6. Enable Real-Time Synchronization: New conversations generated by each tool will automatically be consolidated into the same global memory without requiring manual intervention. The real-time synchronization mechanism ensures the timeliness and consistency of memories, enabling natural and smooth context transitions across tools.

  7. Invoke via Plugin: When initiating a task in any linked tool, MemHub automatically supplements the relevant memories as context for the current tool. The plugin mechanism fully decouples memory assets from the tools, allowing users to switch tools at any time while retaining their complete memory history.

4. Pros and Cons Analysis

Pros
Three-tier fully open-source architecture: The model, framework, and application are all open source, allowing for independent use or flexible combination, offering industry-leading customization space. Developers and enterprises can choose the access level based on their actual needs.
Comprehensive benchmark performance: It ranks first among open-source memory frameworks in four benchmarks across three scenarios: chat, work, and code. In the MemoryArena benchmark, it achieves an average score of 55.31%, outperforming the second-best solution by 10.2 percentage points, with solid data supporting its technical capabilities.
Outstanding Token efficiency: On the LoCoMo benchmark, Token consumption is reduced by 39.3%, achieving higher accuracy with less context, significantly lowering API call costs, and being especially beneficial for high-frequency interaction scenarios.
Decoupled memory assets across tools: MemHub integrates with 10 AI tools, enabling personal memory to flow continuously across tools without being tied to a single product, fundamentally addressing the industry pain point of memory loss caused by tool switching.

5. Comparative Analysis with Similar Tools

Comparison Dimension Hy Memory 2.0 Mem0
Open Source Level Fully open-sourced at the model, framework, and application layers, offering high transparency Framework is open-sourced, while the model is partially closed-source
Memory Types Three types of memory: chat, work, and code, covering a complete range of scenarios Primarily focused on general conversation memory, with limited scenario coverage
Dedicated Models Hy-Memory-30A3B, approximately 3B active parameters, specifically designed for memory training No self-developed dedicated memory model, relies on general large models
Code Memory Capability Task resolution rate of 35.6% on CodeMemoryBench, leading in the framework Resolution rate of 25.3% on SWE-ContextBench, lower than Hy Memory's 28.3%
Working Memory Capability Average score of 55.31% on MemoryArena, leading by 10.2 percentage points over the second-best Not covered in this dimension of evaluation
Chat Memory Performance Accuracy of 72.6% on LoCoMo, with a 39.3% reduction in Tokens LoCoMo performance is lower than that of Hy Memory
Application Layer Products MemHub local application, integrating 10 AI tools for real-time synchronization No similar local memory management application across tools
Business Validation Implemented in business scenarios such as Tencent Self-Selected Stocks, Tencent News, and iWiki Primarily targets the developer ecosystem, with fewer large-scale business cases

Selection Recommendations: For enterprises requiring a complete memory solution and prioritizing data privacy, Hy Memory 2.0's fully open-sourced three-layer architecture and local deployment capabilities make it the optimal choice. Particularly in industries such as finance and content creation, where memory accuracy is critical, its differentiated capabilities in working memory and code memory can directly enhance business value. For developers who already have a mature Agent framework and only need to supplement memory capabilities, Mem0's lightweight integration may be more convenient, though they must accept the reality of model closure and limited functional coverage. If the team has strong technical capabilities and is pursuing extreme customization, Hy Memory 2.0's three-layer decoupled design provides greater flexibility for operations.

6. Editor's Summary

The release of Hy Memory 2.0 marks a pivotal turning point in the evolution of agent memory, shifting it from an "auxiliary feature" to an "independent technology stack." From a technological innovation perspective, the three mechanisms—event-based memory organization, conditional experience reuse, and task resumption—form a complete closed-loop for memory lifecycle management, a first in open-source frameworks. Particularly notable is the introduction of working memory and code memory, which expand the scope of memory from simple conversation history to task execution and engineering practices, offering practical significance for implementing long-term agent tasks.

From a practical value standpoint, the performance data on multiple benchmarks provides strong technical validation: on LoCoMo, an accuracy rate of 72.6% is achieved alongside a 39.3% reduction in Token consumption, indicating that enterprises can achieve better memory performance while controlling costs. The business data from Tencent's self-selected stock platform, where multi-hop recall rate increased from 50% to 90%, further confirms its effectiveness in real-world scenarios.

This framework is applicable to a wide range of users: for AI application developers, the SDK provides a standardized method for integrating memory; for enterprise technology decision-makers, the three-tier architecture allows for on-demand deployment; and for individual users, the MemHub application lowers the barrier to entry. Its minimal storage requirements and moderate model parameters also make it a promising candidate for deployment on edge devices.

Looking ahead, as agent applications evolve from single-round interactions to long-term tasks, memory management will become an infrastructure-level necessity. By entering this space with an open-source approach, Hy Memory 2.0 has the potential to drive the formation of memory framework standards through the accumulation of community ecosystems. Its concept of cross-tool memory synchronization may also have a profound impact on the collaboration models of AI toolchains.

7. Application Scenarios

  • Financial Research Assistant: In scenarios such as Tencent Self-Selected Stocks, the Agent remembers the user's preferred sectors and analysis habits across days and sessions, enabling personalized investment research services. In actual deployment, the multi-hop recall rate for self-selected stocks improved from 50% to 90%, significantly enhancing user engagement and information retrieval efficiency.

  • Content Recommendation: In products such as Tencent News's "Zhisheng" and "News Sister," the Agent remembers the topics the user is interested in and their preferred terms of address, achieving an average score of 91.68 in long-term preference evaluations. This sustained personalization capability greatly improves the alignment between recommended content and user interests.

  • Knowledge Management Q&A: In the enterprise knowledge base iWiki scenario, answering based on recalled memory improved accuracy by 48.6% compared to providing the full original conversation. This result indicates that structured memory organization is more beneficial for the model to accurately extract key information than simply stacking original context.

  • Programming Development Assistance: The Agent remembers project standards and personal coding preferences across tools, enabling seamless reuse of code memory between tools like Cursor and Codex. The accumulation of code memory significantly improves the accuracy of the Agent in code-related Q&A and task resolution, reducing the cost of repeatedly describing context.

  • Office and Long-term Tasks: Recording task objectives, intermediate results, and reusable experiences allows office Agents to resume work from a breakpoint across multiple sessions. For example, when writing a long report or performing multi-step data analysis tasks, the Agent can automatically restore previous progress and decision-making rationale at the start of each session.

8. FAQ

Q: What is the fundamental difference between Hy Memory 2.0 and traditional RAG (Retrieval-Augmented Generation) approaches?
A: RAG focuses on retrieving relevant information from external knowledge bases, and its memory is static and stateless. In contrast, Hy Memory 2.0 builds a dynamic, structured memory system with full lifecycle management capabilities, including storage, updating, evolution, and reuse. It can not only recall facts but also remember task objectives, methods, and experiences, and verify applicable conditions before reusing them.

Q: The Hy-Memory-30A3B model has only about 3B active parameters, yet its memory performance exceeds that of Opus5. Why is that?
A: This model is specifically trained for memory update and management tasks, rather than being a general-purpose conversational model. Through targeted training data and optimization objectives, the model can outperform much larger general-purpose models in memory-related tasks, while maintaining lower inference costs and greater deployment flexibility.

Q: Which AI tools does MemHub support? How is cross-tool synchronization secured?
A: Currently, MemHub supports 10 mainstream AI tools, including WorkBuddy, Cursor, and Codex. All conversation data is stored and processed locally, and the authorization process follows the OAuth or API Key mechanisms of each tool. Memory data is stored locally by default, and users can control the export and deletion of data themselves.

Q: How can developers integrate Hy Memory into their own Agent? What technical background is required?
A: Developers can use the Hy Memory SDK to call core capabilities for storing, updating, and recalling memories. The SDK provides standardized API interfaces. Integration can be completed with Python development experience and basic knowledge of Agent construction, without requiring an in-depth understanding of the underlying implementation details of memory management.

Q: Is commercial use of Hy Memory 2.0 free? What open-source license does it use?
A: All three layers of Hy Memory 2.0 (model, framework, application) are fully open-sourced and can be used free of charge for commercial purposes. Please refer to the LICENSE file in the GitHub repository for specific license terms. It is recommended to carefully confirm compliance requirements before commercial deployment.

9. Project Links

© All Rights Reserved. Some content on this site is partially generated by AI with human review.