Tencent open-sources Hy Memory 2.0 with RL-trained memory writer
- Source
- github.com
- Publisher
- Tencent
- Author
- Tencent Hy
- Date

Context
Tencent's Hunyuan team has open-sourced Hy Memory 2.0, an Apache-2.0 memory engine and Python SDK for agents, together with MemHub, a local desktop and command-line app that pulls conversation history and coding traces from tools such as Claude Code, Cursor and Codex into one local store (GitHub). The framework sorts what an agent experiences into three pipelines: a layered personal memory for chat that climbs from raw conversation to atomic facts, summaries and longer-lived intentions; a two-layer memory for work sessions that records what each session did plus any approach worth reusing; and the same for coding, with an extra chain that stores the real diff of every revision of a code block, because extracted facts deliberately leave out code and a version that was later reverted would otherwise be lost. It builds on the first release, covered here earlier, which introduced the layered design.
The new piece is Hy-Memory-30B-A3B, a model with about 3B active parameters that does only one job: the write step (Hugging Face). In memory frameworks such as Mem0 and MemOS, a general-purpose LLM behind a long prompt decides what to keep, how precisely to record it and how new information should update old entries; Tencent's model drops into that slot. The technical report frames writing as a long-horizon problem, since anything the writer omits can never be retrieved later, while storing everything raises cost and clutters retrieval (arXiv). Training a writer on whether final answers come out right is too blunt, because a question asked much later depends on only a few earlier writes, and handing every write the same score rewards irrelevant ones. So after a first stage that teaches each framework's write format, Tencent's reinforcement learning scores each chunk of conversation separately: probe questions check that facts introduced in that chunk are still recoverable, later cross-chunk questions are traced back to the chunks that supplied the evidence, and "trap" questions about things that should not have been stored, such as an assistant's generic encouragement, together with a penalty on memory growth, punish hoarding.
On fixed 20% subsamples of six benchmarks, run in four frameworks with everything except the writer held constant, Tencent reports a 55.49 average against 54.62 for Anthropic's Claude Opus 5, and first place in all four frameworks, including EverMemOS, which was kept out of training. That is the basis for the launch post's claim that the model "beats Opus 5 across major frameworks" (X). The per-framework numbers are less uniform. The clearest lead is on held-out EverMemOS (56.89 versus 54.04), with a smaller one on Mem0, but on the Hy-Memory and MemOS frameworks the gaps are 0.02 and 0.01 points, which the report itself says are not statistically significant at this sample size. The results are self-reported, not yet repeated across training seeds, and the report does not yet include ablations showing which of the reward components produce the gains. What it does support is that a compact open model can roughly match a frontier model at memory writing across several existing frameworks rather than one.
- Hy Memory routes memory by scene: chat uses an L0-L7 hierarchy from raw dialogue through facts, summaries and schemas to expiring intentions, while working and coding store one session fact plus reusable experiences.
- Coding extraction records file, function and branch coordinates instead of pasting code, so Hy Memory adds a diff chain that stores every revision's real diff with zero LLM calls, preserving versions that were later reverted.
- Three modes trade cost for depth: lite does raw writes and searches with no LLM calls, pro adds LLM extraction and conflict reconciliation, and ultra adds System 2 induction on an always-on graph store.
- When no scene is given, writes without tool calls go straight to chat memory with no classification call, and only writes containing tool calls are classified once into chat, working or coding.
- Tencent also released Hy-Memory-30B-A3B, a MoE model trained with attributed reinforcement learning specifically for long-term memory extraction and conflict reconciliation, with a technical report on arXiv.
- Large language model — A model trained on large amounts of data to process and generate language.
- mixture-of-experts — A model built from many specialist sub-networks where only a few activate per token, giving big-model capability at small-model running cost.
- embedding — A list of numbers representing a piece of text's meaning, so that similar meanings end up numerically close and can be searched.
- Schema — A written description of a data format: which fields exist, what kind of value each holds and which are required.





