Agent frameworks#RAG#Multi-agent#Agent memory
Hy Memory 2.0: Tencent Hunyuan open-sources a three-layer memory system
Tencent Hunyuan open-sourced Hy Memory 2.0: separate memory pipelines for chat, work and code, a 30B-A3B memory model, and MemHub bridging ten AI tools.
Project facts
GitHub Ecosystem- License
- Apache-2.0
- Language
- Python
- Stars
- 760
- Data checked
- 2026-10-19
Snapshot figures reflect the check date and may change over time.

Most agent memory is either a growing conversation transcript or a vector store that only knows cosine similarity. Tencent Hunyuan released Hy Memory 2.0 on October 16, 2026, open-sourcing three layers at once: a Python SDK that stores and evolves memory, Hy-Memory-30B-A3B, a model trained specifically for writing memory, and MemHub, a local-first desktop and CLI app that merges conversation history from different AI tools into one personal memory. The repository was created on October 15, 2026, uses Apache-2.0, is primarily Python, and had 760 stars on October 18, 2026.

Core features
- Three pipelines by scene: chat, working and coding each get their own extraction and storage logic. When
sceneis omitted, writes without tool calls go straight to chat memory and writes with tool calls are classified once. The three keep separate tables and collections, so coding memory never bleeds into working memory. - Chat memory is eight layers: raw turns are append-only, atomic facts are versioned and immutable, and above them sit session summaries, mental models and prospective intentions that expire down to ordinary facts. Searches return profile, normal and proactive channels at once.
- Working and coding memory is two layers plus a chain: every session produces exactly one fact (what was done, and the result) and zero or more reusable experiences (trigger, approach, applicable environment, confidence). Coding adds a version-evolution chain that records every real diff with zero LLM calls — including versions later reverted and no longer present in the working tree or at HEAD.
- Three modes with very different costs:
litedoes raw-text embedding writes and searches with no LLM calls, equivalent to plain RAG;proadds extraction and conflict reconciliation;ultraadds System 2 schema induction and a cross-domain sweeper and requires a graph database. Working and coding memory only work inproorultra. - A separately trained memory model: Hy-Memory-30B-A3B is a 30B-parameter, 3B-active MoE trained with attributed reinforcement learning to extract facts from long conversations and reconcile conflicts. Weights are on Hugging Face and the technical report is on arXiv.
- MemHub connects ten tools: the desktop app and CLI share one runtime and one
~/.one-memorydata directory. After you authorize an app, MemHub imports its history — WorkBuddy, Cursor, Codex, Pi, Qwen Code, Hermes, DeepSeek Harness, OpenCode and others — and keeps new sessions in sync, isolating each source so different tools can be granted different access.
Typical use cases
- A personal assistant across sessions: a user says “only watch non-ferrous metals and semiconductors this week” and “lead with the PE percentile”, then changes direction. Memory has to persist across days and conversations, and archive the old preference rather than silently keep it.
- Long-running coding tasks: after seven revisions the final code shows little of why earlier attempts were reverted. The version chain keeps each diff and what was said at the time, so the next person can trace the decision.
- People who use several AI tools: a convention set in Cursor has to be restated in Codex. MemHub aims to consolidate that context into local memory and redistribute it per tool authorization.
- Teams unwilling to hand raw transcripts to a memory vendor: the SDK self-hosts, with ChromaDB, Qdrant or FAISS for vectors, Kuzu or Neo4j for graphs, and metadata in local SQLite. Writes and searches still call whichever LLM and embedding endpoints you configure.
Benchmarks
Every number below is Tencent’s own claim. The repository does not publish the full test harness or datasets, so treat these as vendor-reported rather than independently reproduced.
| Benchmark | Metric | Hy Memory | Comparison |
|---|---|---|---|
| LoCoMo (chat) | accuracy | 72.6% | EverOS 71.9% |
| LoCoMo (chat) | tokens per question | 703 | 1,159 before, a 39.3% cut |
| MemoryArena (working) | average score | 55.31% | 10.2 points above EverOS |
| CodeMemoryBench (coding) | QA accuracy | 64.2% | claimed first among memory frameworks |
| SWE-ContextBench (coding) | task solve rate | 28.3% | MemOS and Mem0 at 25.3% |
| Four memory systems | average score | 55.49 | Opus5 54.62, DeepSeek V4.1 Flash 53.64 |
Tencent also reports three internal deployments: the 自选股 stock assistant raised multi-hop recall from 50% to 90% and its composite score from 64.3 to 79.6; iWiki answered 36.7% of 251 questions correctly using retrieved memory alone versus 24.7% with the full raw conversation; and two Tencent News assistants averaged 91.68 across 41 complex conversations. Sample sets and scoring rubrics are not public.
Quick start
The core SDK is on PyPI, with 2.0.4 as the latest release while the README’s install snippet still says 2.0.3. You need one OpenAI-compatible LLM endpoint and one embedding endpoint:
pip install hy-memory==2.0.4
export MEMORY_LLM_API_KEY="sk-your-key"
export MEMORY_LLM_BASE_URL="https://api.deepseek.com"
export MEMORY_LLM_MODEL="deepseek-chat"
export MEMORY_EMBEDDER_API_KEY="sk-your-key"
export MEMORY_EMBEDDER_BASE_URL="https://dashscope.aliyuncs.com/compatible-mode/v1"
export MEMORY_EMBEDDER_MODEL="text-embedding-v3"
export MEMORY_EMBEDDING_DIMS=1024
Write one memory and read it back:
from hy_memory import HyMemoryClient
client = HyMemoryClient(mode="pro")
client.add("I love sci-fi movies, especially Interstellar", user_id="user_1")
print(client.search("What movies does the user like?", user_ids=["user_1"], limit=10))
client.close()
To try MemHub instead, grab the signed macOS build from GitHub Releases or install the memhub-cli npm package. Only memhub install downloads the managed runtime; postinstall does not. Hunyuan states MemHub is still in preview and does not support Windows.
Summary
It fits teams already shipping an agent product that have outgrown chunk-and-similarity retrieval. The split between chat, working and coding is a real design difference, and the coding version chain solves a problem summaries cannot: a reverted version is usually gone from both the working tree and HEAD. For individuals who just want several coding tools to share preferences, MemHub is the shortest path.
Accept the limits too. The repository is under a week old with 760 stars and an API still moving; GitHub reports the license as NOASSERTION because Tencent prepended its own notice to an Apache-2.0 text; MemHub is in preview with no Windows build; and every quality number is vendor-reported. Compared with Graphiti, which centers on a temporal knowledge graph, Hy Memory organizes memory by task type. The two can be combined, but benchmark recall on your own transcripts before choosing. Python, Apache-2.0.