hy-memory 2.0.3__tar.gz → 2.0.5.dev1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (141) hide show
  1. {hy_memory-2.0.3/hy_memory.egg-info → hy_memory-2.0.5.dev1}/PKG-INFO +12 -10
  2. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/README.md +11 -9
  3. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/__init__.py +12 -0
  4. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/abstractor.py +2 -1
  5. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/episode_summary.py +13 -3
  6. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/extractor.py +2 -0
  7. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/llm_provider.py +21 -16
  8. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/reconciler.py +2 -0
  9. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/client.py +668 -119
  10. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/chain_store.py +3 -1
  11. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/extractor.py +1 -0
  12. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/fact_reconciler.py +35 -2
  13. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/judge.py +11 -3
  14. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/reconciler.py +34 -1
  15. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/store.py +98 -15
  16. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/config.py +7 -0
  17. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/cache_base.py +31 -0
  18. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/cache_mysql.py +130 -16
  19. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/cache_sqlite.py +236 -129
  20. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/history_store.py +115 -71
  21. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/vector_store_faiss.py +33 -8
  22. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/intention.py +20 -5
  23. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/reader_base.py +2 -0
  24. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/writer.py +1 -1
  25. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/server.py +19 -6
  26. hy_memory-2.0.5.dev1/hy_memory/snapshot.py +150 -0
  27. hy_memory-2.0.5.dev1/hy_memory/utils/model_call_context.py +24 -0
  28. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/pipeline_log_writer.py +35 -4
  29. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1/hy_memory.egg-info}/PKG-INFO +12 -10
  30. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory.egg-info/SOURCES.txt +2 -0
  31. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/pyproject.toml +1 -1
  32. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/LICENSE +0 -0
  33. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/MANIFEST.in +0 -0
  34. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/__init__.py +0 -0
  35. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/emotion_analyzer.py +0 -0
  36. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/intention_detector.py +0 -0
  37. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/mem_agent.py +0 -0
  38. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/prompts_zh.py +0 -0
  39. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/reflector.py +0 -0
  40. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/tools/__init__.py +0 -0
  41. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/tools/base.py +0 -0
  42. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/agent/tools/basic_profile.py +0 -0
  43. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/__init__.py +0 -0
  44. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/lexical.py +0 -0
  45. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/preproc.py +0 -0
  46. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/prompts_zh.py +0 -0
  47. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/types.py +0 -0
  48. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/coding/writer.py +0 -0
  49. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/core/__init__.py +0 -0
  50. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/core/embed_service.py +0 -0
  51. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/core/merger.py +0 -0
  52. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/core/scorer.py +0 -0
  53. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/core/workload.py +0 -0
  54. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/__init__.py +0 -0
  55. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/cache.py +0 -0
  56. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/graph_store.py +0 -0
  57. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/graph_store_base.py +0 -0
  58. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/graph_store_kuzu.py +0 -0
  59. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/graph_store_neo4j.py +0 -0
  60. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/kv_store.py +0 -0
  61. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/rdb.py +0 -0
  62. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/vector_store.py +0 -0
  63. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/vector_store_base.py +0 -0
  64. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/vector_store_chroma.py +0 -0
  65. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/data/vector_store_qdrant.py +0 -0
  66. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/inspector.py +0 -0
  67. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/metrics.py +0 -0
  68. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/models/__init__.py +0 -0
  69. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/models/memory.py +0 -0
  70. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/models/requests.py +0 -0
  71. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/__init__.py +0 -0
  72. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_graph/__init__.py +0 -0
  73. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_graph/projector.py +0 -0
  74. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_graph/rerank.py +0 -0
  75. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_graph/topic_summary.py +0 -0
  76. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/__init__.py +0 -0
  77. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/bm25.py +0 -0
  78. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/bm25_fastembed.py +0 -0
  79. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/candidate_guards.py +0 -0
  80. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/config.py +0 -0
  81. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/date_view.py +0 -0
  82. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/dedup.py +0 -0
  83. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/diversity.py +0 -0
  84. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/entities.py +0 -0
  85. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/entity_store.py +0 -0
  86. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/evolution.py +0 -0
  87. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/hierarchy_bundle.py +0 -0
  88. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/intent.py +0 -0
  89. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/lemmatize.py +0 -0
  90. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/local_rerank.py +0 -0
  91. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/memory_format.py +0 -0
  92. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/multi_seed_bundle.py +0 -0
  93. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/ner.py +0 -0
  94. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/profile_evidence.py +0 -0
  95. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/profile_owner_gate.py +0 -0
  96. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/query_expand.py +0 -0
  97. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/reconcile_retrieval.py +0 -0
  98. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/record_date_view.py +0 -0
  99. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/retrieval_clauses.py +0 -0
  100. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/rrf.py +0 -0
  101. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/scoring.py +0 -0
  102. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/series_tail_guard.py +0 -0
  103. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/session_episode.py +0 -0
  104. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/strength.py +0 -0
  105. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/supplemental_propositions.py +0 -0
  106. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/tag_index.py +0 -0
  107. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/temporal.py +0 -0
  108. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/topic_candidates.py +0 -0
  109. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/trace.py +0 -0
  110. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/underflow.py +0 -0
  111. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/_retrieval/user_level_l0.py +0 -0
  112. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/balanced_catalog.py +0 -0
  113. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/base.py +0 -0
  114. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/cross_domain_sweeper.py +0 -0
  115. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/reader.py +0 -0
  116. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/reader_hybrid.py +0 -0
  117. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/reader_legacy.py +0 -0
  118. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/registry.py +0 -0
  119. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/specific_supplement.py +0 -0
  120. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/system2_agent.py +0 -0
  121. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/system2_tools.py +0 -0
  122. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/system2_writer.py +0 -0
  123. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/pipelines/user_profile_scope.py +0 -0
  124. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/runtime.py +0 -0
  125. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/structure.py +0 -0
  126. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/async_executor.py +0 -0
  127. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/clone_references.py +0 -0
  128. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/keyword_ties.py +0 -0
  129. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/lang_detect.py +0 -0
  130. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/log_setup.py +0 -0
  131. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/metrics.py +0 -0
  132. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/pipeline_observability.py +0 -0
  133. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/source_filter.py +0 -0
  134. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/time_window.py +0 -0
  135. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/token_count.py +0 -0
  136. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/trace_file_writer.py +0 -0
  137. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory/utils/tracer.py +0 -0
  138. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory.egg-info/dependency_links.txt +0 -0
  139. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory.egg-info/requires.txt +0 -0
  140. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/hy_memory.egg-info/top_level.txt +0 -0
  141. {hy_memory-2.0.3 → hy_memory-2.0.5.dev1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: hy-memory
3
- Version: 2.0.3
3
+ Version: 2.0.5.dev1
4
4
  Summary: HY Memory - Industrial-grade dual-system cognitive memory framework
5
5
  Author: alvinfei
6
6
  License-Expression: Apache-2.0
@@ -83,7 +83,9 @@ English | [中文](README.zh.md)
83
83
 
84
84
  ## Latest News
85
85
 
86
- * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Released** **Hy Memory 2.0 (`hy-memory==2.0.3`)** on [PyPI](https://pypi.org/project/hy-memory/2.0.3/) and open-sourced the **Hy-Memory** monorepo together with **[MemHub](memhub/README.md)**!
86
+ * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Open-sourced** quantized **FP8** (**[Hy-Memory-30B-A3B-FP8](https://huggingface.co/tencent/Hy-Memory-30B-A3B-FP8)**) and **GGUF** (**[Hy-Memory-30B-A3B-GGUF](https://huggingface.co/tencent/Hy-Memory-30B-A3B-GGUF)**) versions of **Hy-Memory-30B-A3B** on Hugging Face!
87
+ * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 📦 **Released [MemHub v1.0.4](https://github.com/Tencent-Hunyuan/Hy-Memory/releases/tag/v1.0.4)** and **[memhub-cli 1.0.5](https://www.npmjs.com/package/memhub-cli/v/1.0.5)**, with a signed macOS desktop app and verified macOS/Linux Runtimes!
88
+ * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Released** **Hy Memory 2.0 (`hy-memory==2.0.4`)** on [PyPI](https://pypi.org/project/hy-memory/2.0.4/) and open-sourced the **Hy-Memory** monorepo together with **[MemHub](memhub/README.md)**!
87
89
  * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Open-sourced** **[Hy-Memory-30B-A3B](https://huggingface.co/tencent/Hy-Memory-30B-A3B)** on Hugging Face along with its [technical report](https://arxiv.org/abs/2610.22196) on attributed reinforcement learning for long-term memory writing!
88
90
  * *<mark>[new]</mark>* 🔥🔥 **[2026-09]**: 📊 **Released** **[CMB: A Coding Memory Benchmark for Long-Horizon and Interleaved Coding Agents](docs/papers/CMB_A_Coding_Memory_Benchmark_for_Long_Horizon_and_Interleaved_Coding_Agents.pdf)** (submitted to **ICLR 2027**).
89
91
  * *<mark>[new]</mark>* 🔥🔥 **[2026-08]**: 🎉 **Accepted** at **EMNLP 2026**: **[Memory Beyond Recall: A Dual-Process Cognitive Memory System for Self-Evolving LLM Agents](https://arxiv.org/abs/2606.09483)**!
@@ -114,13 +116,13 @@ Welcome to the **Hy Memory Research Family**, covering cognitive chat memory, lo
114
116
  ### 1. Installation
115
117
 
116
118
  ```bash
117
- pip install hy-memory==2.0.3 # core (includes ChromaDB and Kuzu)
118
- pip install "hy-memory[qdrant]==2.0.3" # + Qdrant
119
- pip install "hy-memory[faiss]==2.0.3" # + FAISS
120
- pip install "hy-memory[graph]==2.0.3" # + Neo4j
121
- pip install "hy-memory[mysql]==2.0.3" # + MySQL cache
122
- pip install "hy-memory[rerank]==2.0.3" # + local multilingual cross-encoder rerank
123
- pip install "hy-memory[all]==2.0.3" # everything
119
+ pip install hy-memory==2.0.4 # core (includes ChromaDB and Kuzu)
120
+ pip install "hy-memory[qdrant]==2.0.4" # + Qdrant
121
+ pip install "hy-memory[faiss]==2.0.4" # + FAISS
122
+ pip install "hy-memory[graph]==2.0.4" # + Neo4j
123
+ pip install "hy-memory[mysql]==2.0.4" # + MySQL cache
124
+ pip install "hy-memory[rerank]==2.0.4" # + local multilingual cross-encoder rerank
125
+ pip install "hy-memory[all]==2.0.4" # everything
124
126
  ```
125
127
 
126
128
  ### 2. Configuration
@@ -202,7 +204,7 @@ result = client.search(
202
204
 
203
205
  result["facts"] # fact layer
204
206
  result["experiences"] # experience layer
205
- result["chain_block"] # coding only: version-evolution context
207
+ result["chain_block"] # coding only: version-evolution context (empty unless MEMORY_CODING_CHAIN_BLOCK_ENABLED)
206
208
  ```
207
209
 
208
210
  ### 5. Routing, Source Isolation & Advanced APIs
@@ -32,7 +32,9 @@ English | [中文](README.zh.md)
32
32
 
33
33
  ## Latest News
34
34
 
35
- * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Released** **Hy Memory 2.0 (`hy-memory==2.0.3`)** on [PyPI](https://pypi.org/project/hy-memory/2.0.3/) and open-sourced the **Hy-Memory** monorepo together with **[MemHub](memhub/README.md)**!
35
+ * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Open-sourced** quantized **FP8** (**[Hy-Memory-30B-A3B-FP8](https://huggingface.co/tencent/Hy-Memory-30B-A3B-FP8)**) and **GGUF** (**[Hy-Memory-30B-A3B-GGUF](https://huggingface.co/tencent/Hy-Memory-30B-A3B-GGUF)**) versions of **Hy-Memory-30B-A3B** on Hugging Face!
36
+ * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 📦 **Released [MemHub v1.0.4](https://github.com/Tencent-Hunyuan/Hy-Memory/releases/tag/v1.0.4)** and **[memhub-cli 1.0.5](https://www.npmjs.com/package/memhub-cli/v/1.0.5)**, with a signed macOS desktop app and verified macOS/Linux Runtimes!
37
+ * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Released** **Hy Memory 2.0 (`hy-memory==2.0.4`)** on [PyPI](https://pypi.org/project/hy-memory/2.0.4/) and open-sourced the **Hy-Memory** monorepo together with **[MemHub](memhub/README.md)**!
36
38
  * *<mark>[new]</mark>* 🔥🔥🔥 **[2026-10]**: 🚀 **Open-sourced** **[Hy-Memory-30B-A3B](https://huggingface.co/tencent/Hy-Memory-30B-A3B)** on Hugging Face along with its [technical report](https://arxiv.org/abs/2610.22196) on attributed reinforcement learning for long-term memory writing!
37
39
  * *<mark>[new]</mark>* 🔥🔥 **[2026-09]**: 📊 **Released** **[CMB: A Coding Memory Benchmark for Long-Horizon and Interleaved Coding Agents](docs/papers/CMB_A_Coding_Memory_Benchmark_for_Long_Horizon_and_Interleaved_Coding_Agents.pdf)** (submitted to **ICLR 2027**).
38
40
  * *<mark>[new]</mark>* 🔥🔥 **[2026-08]**: 🎉 **Accepted** at **EMNLP 2026**: **[Memory Beyond Recall: A Dual-Process Cognitive Memory System for Self-Evolving LLM Agents](https://arxiv.org/abs/2606.09483)**!
@@ -63,13 +65,13 @@ Welcome to the **Hy Memory Research Family**, covering cognitive chat memory, lo
63
65
  ### 1. Installation
64
66
 
65
67
  ```bash
66
- pip install hy-memory==2.0.3 # core (includes ChromaDB and Kuzu)
67
- pip install "hy-memory[qdrant]==2.0.3" # + Qdrant
68
- pip install "hy-memory[faiss]==2.0.3" # + FAISS
69
- pip install "hy-memory[graph]==2.0.3" # + Neo4j
70
- pip install "hy-memory[mysql]==2.0.3" # + MySQL cache
71
- pip install "hy-memory[rerank]==2.0.3" # + local multilingual cross-encoder rerank
72
- pip install "hy-memory[all]==2.0.3" # everything
68
+ pip install hy-memory==2.0.4 # core (includes ChromaDB and Kuzu)
69
+ pip install "hy-memory[qdrant]==2.0.4" # + Qdrant
70
+ pip install "hy-memory[faiss]==2.0.4" # + FAISS
71
+ pip install "hy-memory[graph]==2.0.4" # + Neo4j
72
+ pip install "hy-memory[mysql]==2.0.4" # + MySQL cache
73
+ pip install "hy-memory[rerank]==2.0.4" # + local multilingual cross-encoder rerank
74
+ pip install "hy-memory[all]==2.0.4" # everything
73
75
  ```
74
76
 
75
77
  ### 2. Configuration
@@ -151,7 +153,7 @@ result = client.search(
151
153
 
152
154
  result["facts"] # fact layer
153
155
  result["experiences"] # experience layer
154
- result["chain_block"] # coding only: version-evolution context
156
+ result["chain_block"] # coding only: version-evolution context (empty unless MEMORY_CODING_CHAIN_BLOCK_ENABLED)
155
157
  ```
156
158
 
157
159
  ### 5. Routing, Source Isolation & Advanced APIs
@@ -55,6 +55,13 @@ except Exception:
55
55
  from .client import HyMemoryClient
56
56
  from .inspector import MemoryInspector
57
57
  from .runtime import SharedRuntime
58
+ from .snapshot import (
59
+ DataPlaneRestore,
60
+ DataPlaneSnapshot,
61
+ DataPlaneSnapshotRejected,
62
+ restore_local_data_plane,
63
+ snapshot_local_data_plane,
64
+ )
58
65
 
59
66
  # ====== 配置 ======
60
67
  from .config import MemoryConfig
@@ -111,6 +118,11 @@ __all__ = [
111
118
  "HyMemoryClient",
112
119
  "MemoryInspector",
113
120
  "SharedRuntime",
121
+ "DataPlaneRestore",
122
+ "DataPlaneSnapshot",
123
+ "DataPlaneSnapshotRejected",
124
+ "restore_local_data_plane",
125
+ "snapshot_local_data_plane",
114
126
  # 配置
115
127
  "MemoryConfig",
116
128
  # Embedding 端点覆盖
@@ -22,7 +22,8 @@ logger = logging.getLogger(__name__)
22
22
 
23
23
  # ================================================================
24
24
  # 数据结构
25
- # ================================================================@dataclass
25
+ # ================================================================
26
+ @dataclass
26
27
  class SessionSummaryResult:
27
28
  """Session 摘要结果 (V2)"""
28
29
  success: bool
@@ -39,6 +39,7 @@ import logging
39
39
  import hashlib
40
40
  import json
41
41
  import re
42
+ from datetime import datetime
42
43
  from typing import Any, Dict, List, Optional
43
44
  import uuid
44
45
 
@@ -252,6 +253,17 @@ def _series_episode_id(
252
253
  return str(uuid.uuid5(uuid.NAMESPACE_URL, "hy-memory:series-episode:" + raw))
253
254
 
254
255
 
256
+ def _series_memory_at(times: List[int]) -> Optional[datetime]:
257
+ """Earliest member timestamp as the same local wall clock it came from.
258
+
259
+ ``_node_timestamp`` produces ``datetime.timestamp()`` values. Reading them
260
+ back with ``utcfromtimestamp`` turns them into a naive *UTC* datetime, which
261
+ the vector payload later re-interprets as local time and shifts by the
262
+ machine's UTC offset.
263
+ """
264
+ return datetime.fromtimestamp(min(times)) if times else None
265
+
266
+
255
267
  def _node_timestamp(node: Any) -> Optional[int]:
256
268
  value = getattr(node, "memory_at", None) or getattr(node, "gmt_created", None)
257
269
  if value is None:
@@ -974,8 +986,6 @@ async def finalize_series_episode_containers(
974
986
  Stored text is only a title plus a structural intro. Exact L2 bodies remain in
975
987
  their canonical nodes and are referenced by ID from dated timeline segments.
976
988
  """
977
- from datetime import datetime
978
-
979
989
  from ..models.memory import MemoryLayer, MemoryNode, MemoryStatus, SourceType
980
990
  from ..pipelines._retrieval.session_episode import (
981
991
  add_parent_episode_membership,
@@ -1061,7 +1071,7 @@ async def finalize_series_episode_containers(
1061
1071
  segment["memory_at"] for segment in plan["timeline"]
1062
1072
  if segment.get("memory_at") is not None
1063
1073
  ]
1064
- memory_at = datetime.utcfromtimestamp(min(times)) if times else None
1074
+ memory_at = _series_memory_at(times)
1065
1075
  content = f"{plan['title']}. {plan['intro']}".strip()
1066
1076
  series = MemoryNode(
1067
1077
  node_id=series_id, user_id=user_id,
@@ -1123,6 +1123,7 @@ class Extractor:
1123
1123
  max_tokens=self._llm_config.agent_max_tokens,
1124
1124
  tools=None,
1125
1125
  tool_choice=None,
1126
+ audit_stage="extract",
1126
1127
  )
1127
1128
  self._call_count += 1
1128
1129
  total_tokens += response.tokens_used
@@ -1233,6 +1234,7 @@ class Extractor:
1233
1234
  max_tokens=self._llm_config.agent_max_tokens,
1234
1235
  tools=None,
1235
1236
  tool_choice=None,
1237
+ audit_stage="extract",
1236
1238
  )
1237
1239
  self._call_count += 1
1238
1240
  total_tokens += response.tokens_used
@@ -34,6 +34,7 @@ import os
34
34
  import weakref
35
35
 
36
36
  from ..config import MemoryConfig
37
+ from ..utils.model_call_context import model_call_stage
37
38
  from ..core.workload import llm_slot
38
39
 
39
40
  logger = logging.getLogger(__name__)
@@ -348,6 +349,7 @@ class LLMProvider:
348
349
  stop: List[str] = None,
349
350
  tools: Optional[List[Dict[str, Any]]] = None,
350
351
  tool_choice: Optional[Any] = None,
352
+ audit_stage: Optional[str] = None,
351
353
  **kwargs
352
354
  ) -> LLMResponse:
353
355
  """
@@ -386,15 +388,16 @@ class LLMProvider:
386
388
  len(prompt), _content_fingerprint(prompt),
387
389
  )
388
390
 
389
- response = await self._call_llm(
390
- prompt=prompt,
391
- max_tokens=max_tokens,
392
- temperature=temperature,
393
- stop=stop,
394
- tools=tools,
395
- tool_choice=tool_choice,
396
- **kwargs
397
- )
391
+ with model_call_stage(audit_stage):
392
+ response = await self._call_llm(
393
+ prompt=prompt,
394
+ max_tokens=max_tokens,
395
+ temperature=temperature,
396
+ stop=stop,
397
+ tools=tools,
398
+ tool_choice=tool_choice,
399
+ **kwargs
400
+ )
398
401
 
399
402
  self._total_calls += 1
400
403
  self._total_tokens += response.tokens_used
@@ -595,6 +598,7 @@ class LLMProvider:
595
598
  temperature: Optional[float] = None,
596
599
  tools: Optional[List[Dict[str, Any]]] = None,
597
600
  tool_choice: Optional[Any] = None,
601
+ audit_stage: Optional[str] = None,
598
602
  ) -> LLMResponse:
599
603
  """
600
604
  多轮 messages 调用(支持 tool results 回传)。
@@ -622,13 +626,14 @@ class LLMProvider:
622
626
  f"msgs={len(messages)} tools={len(tools) if tools else 0}"
623
627
  )
624
628
 
625
- response = await self._chat_completions(
626
- messages,
627
- max_tokens=max_tokens,
628
- temperature=temperature,
629
- tools=tools,
630
- tool_choice=tool_choice,
631
- )
629
+ with model_call_stage(audit_stage):
630
+ response = await self._chat_completions(
631
+ messages,
632
+ max_tokens=max_tokens,
633
+ temperature=temperature,
634
+ tools=tools,
635
+ tool_choice=tool_choice,
636
+ )
632
637
 
633
638
  self._total_calls += 1
634
639
  self._total_tokens += response.tokens_used
@@ -669,6 +669,7 @@ class MemoryReconciler:
669
669
  response = await llm.complete(
670
670
  prompt=prompt,
671
671
  max_tokens=500,
672
+ audit_stage="reconcile",
672
673
  )
673
674
  text = response.content.strip()
674
675
  if "```json" in text:
@@ -1383,6 +1384,7 @@ class MemoryReconciler:
1383
1384
  response = await llm.complete(
1384
1385
  prompt=prompt,
1385
1386
  max_tokens=dyn_max_tokens,
1387
+ audit_stage="reconcile",
1386
1388
  )
1387
1389
  except Exception as e:
1388
1390
  # LLM 彻底不可用(provider 已按 max_retries 重试过,网关 500 /