memu-py 1.3.0__tar.gz → 1.4.0__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 (236) hide show
  1. {memu_py-1.3.0 → memu_py-1.4.0}/.github/workflows/build.yml +1 -1
  2. {memu_py-1.3.0 → memu_py-1.4.0}/.github/workflows/release-please.yml +6 -6
  3. {memu_py-1.3.0 → memu_py-1.4.0}/CHANGELOG.md +26 -0
  4. {memu_py-1.3.0 → memu_py-1.4.0}/PKG-INFO +98 -34
  5. {memu_py-1.3.0 → memu_py-1.4.0}/README.md +97 -33
  6. memu_py-1.4.0/assets/memUbot.png +0 -0
  7. memu_py-1.4.0/docs/HACKATHON_ISSUE_DRAFT.md +68 -0
  8. memu_py-1.4.0/docs/HACKATHON_MAD_COMBOS.md +659 -0
  9. memu_py-1.4.0/docs/sealos-devbox-guide.md +410 -0
  10. {memu_py-1.3.0 → memu_py-1.4.0}/examples/example_5_with_lazyllm_client.py +2 -2
  11. memu_py-1.4.0/examples/sealos-assistant/README.md +66 -0
  12. memu_py-1.4.0/examples/sealos-assistant/entrypoint.sh +13 -0
  13. memu_py-1.4.0/examples/sealos-assistant/main.py +286 -0
  14. memu_py-1.4.0/examples/sealos-assistant/requirements.txt +4 -0
  15. memu_py-1.4.0/examples/test_nebius_provider.py +228 -0
  16. {memu_py-1.3.0 → memu_py-1.4.0}/pyproject.toml +11 -1
  17. {memu_py-1.3.0 → memu_py-1.4.0}/readme/README_en.md +97 -29
  18. {memu_py-1.3.0 → memu_py-1.4.0}/readme/README_es.md +98 -33
  19. {memu_py-1.3.0 → memu_py-1.4.0}/readme/README_fr.md +98 -34
  20. {memu_py-1.3.0 → memu_py-1.4.0}/readme/README_ja.md +98 -31
  21. {memu_py-1.3.0 → memu_py-1.4.0}/readme/README_ko.md +98 -30
  22. {memu_py-1.3.0 → memu_py-1.4.0}/readme/README_zh.md +98 -30
  23. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/crud.py +1 -1
  24. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/memorize.py +151 -27
  25. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/patch.py +1 -1
  26. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/retrieve.py +46 -6
  27. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/settings.py +26 -0
  28. memu_py-1.4.0/src/memu/client/__init__.py +26 -0
  29. memu_py-1.4.0/src/memu/client/openai_wrapper.py +268 -0
  30. memu_py-1.4.0/src/memu/database/inmemory/repositories/memory_item_repo.py +262 -0
  31. memu_py-1.4.0/src/memu/database/inmemory/vector.py +137 -0
  32. memu_py-1.4.0/src/memu/database/models.py +148 -0
  33. memu_py-1.4.0/src/memu/database/postgres/repositories/memory_item_repo.py +401 -0
  34. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/repositories/memory_item.py +8 -0
  35. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/repositories/memory_item_repo.py +233 -4
  36. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/http_client.py +29 -0
  37. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/lazyllm_client.py +26 -1
  38. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/openai_sdk.py +27 -0
  39. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/wrapper.py +34 -0
  40. memu_py-1.4.0/src/memu/prompts/category_summary/__init__.py +22 -0
  41. memu_py-1.4.0/src/memu/prompts/category_summary/category_with_refs.py +140 -0
  42. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/memory_type/__init__.py +3 -1
  43. memu_py-1.4.0/src/memu/prompts/memory_type/tool.py +120 -0
  44. memu_py-1.4.0/src/memu/utils/references.py +172 -0
  45. memu_py-1.4.0/src/memu/utils/tool.py +102 -0
  46. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/utils/video.py +13 -0
  47. memu_py-1.4.0/tests/test_client_wrapper.py +130 -0
  48. {memu_py-1.3.0 → memu_py-1.4.0}/tests/test_lazyllm.py +1 -1
  49. memu_py-1.4.0/tests/test_references.py +191 -0
  50. memu_py-1.4.0/tests/test_salience.py +209 -0
  51. memu_py-1.4.0/tests/test_tool_memory.py +327 -0
  52. {memu_py-1.3.0 → memu_py-1.4.0}/uv.lock +150 -4
  53. memu_py-1.3.0/src/memu/database/inmemory/repositories/memory_item_repo.py +0 -98
  54. memu_py-1.3.0/src/memu/database/inmemory/vector.py +0 -59
  55. memu_py-1.3.0/src/memu/database/models.py +0 -88
  56. memu_py-1.3.0/src/memu/database/postgres/repositories/memory_item_repo.py +0 -200
  57. memu_py-1.3.0/src/memu/prompts/category_summary/__init__.py +0 -14
  58. {memu_py-1.3.0 → memu_py-1.4.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  59. {memu_py-1.3.0 → memu_py-1.4.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  60. {memu_py-1.3.0 → memu_py-1.4.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  61. {memu_py-1.3.0 → memu_py-1.4.0}/.github/ISSUE_TEMPLATE/hackathon_task.yml +0 -0
  62. {memu_py-1.3.0 → memu_py-1.4.0}/.github/ISSUE_TEMPLATE/improvement_suggestion.yml +0 -0
  63. {memu_py-1.3.0 → memu_py-1.4.0}/.github/workflows/pr-title.yml +0 -0
  64. {memu_py-1.3.0 → memu_py-1.4.0}/.gitignore +0 -0
  65. {memu_py-1.3.0 → memu_py-1.4.0}/.pre-commit-config.yaml +0 -0
  66. {memu_py-1.3.0 → memu_py-1.4.0}/.python-version +0 -0
  67. {memu_py-1.3.0 → memu_py-1.4.0}/CONTRIBUTING.md +0 -0
  68. {memu_py-1.3.0 → memu_py-1.4.0}/Cargo.lock +0 -0
  69. {memu_py-1.3.0 → memu_py-1.4.0}/Cargo.toml +0 -0
  70. {memu_py-1.3.0 → memu_py-1.4.0}/LICENSE.txt +0 -0
  71. {memu_py-1.3.0 → memu_py-1.4.0}/MANIFEST.in +0 -0
  72. {memu_py-1.3.0 → memu_py-1.4.0}/Makefile +0 -0
  73. {memu_py-1.3.0 → memu_py-1.4.0}/assets/banner.png +0 -0
  74. {memu_py-1.3.0 → memu_py-1.4.0}/assets/benchmark.png +0 -0
  75. {memu_py-1.3.0 → memu_py-1.4.0}/assets/memorize.png +0 -0
  76. {memu_py-1.3.0 → memu_py-1.4.0}/assets/partners/LazyLLM.png +0 -0
  77. {memu_py-1.3.0 → memu_py-1.4.0}/assets/partners/buddie.png +0 -0
  78. {memu_py-1.3.0 → memu_py-1.4.0}/assets/partners/bytebase.png +0 -0
  79. {memu_py-1.3.0 → memu_py-1.4.0}/assets/partners/jazz.png +0 -0
  80. {memu_py-1.3.0 → memu_py-1.4.0}/assets/partners/openagents.png +0 -0
  81. {memu_py-1.3.0 → memu_py-1.4.0}/assets/partners/xroute.png +0 -0
  82. {memu_py-1.3.0 → memu_py-1.4.0}/assets/qrcode.png +0 -0
  83. {memu_py-1.3.0 → memu_py-1.4.0}/assets/retrieve.png +0 -0
  84. {memu_py-1.3.0 → memu_py-1.4.0}/assets/star.gif +0 -0
  85. {memu_py-1.3.0 → memu_py-1.4.0}/assets/structure.png +0 -0
  86. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_companion-0000.jpg +0 -0
  87. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_creation-0000.jpg +0 -0
  88. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_edu-0000.jpg +0 -0
  89. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_ip-0000.png +0 -0
  90. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_robot-0000.jpg +0 -0
  91. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_role_play-0000.jpg +0 -0
  92. {memu_py-1.3.0 → memu_py-1.4.0}/assets/usecase/ai_therapy-0000.jpg +0 -0
  93. {memu_py-1.3.0 → memu_py-1.4.0}/docs/integrations/grok.md +0 -0
  94. {memu_py-1.3.0 → memu_py-1.4.0}/docs/langgraph_integration.md +0 -0
  95. {memu_py-1.3.0 → memu_py-1.4.0}/docs/providers/grok.md +0 -0
  96. {memu_py-1.3.0 → memu_py-1.4.0}/docs/sealos_use_case.md +0 -0
  97. {memu_py-1.3.0 → memu_py-1.4.0}/docs/sqlite.md +0 -0
  98. {memu_py-1.3.0 → memu_py-1.4.0}/docs/tutorials/getting_started.md +0 -0
  99. {memu_py-1.3.0 → memu_py-1.4.0}/examples/example_1_conversation_memory.py +0 -0
  100. {memu_py-1.3.0 → memu_py-1.4.0}/examples/example_2_skill_extraction.py +0 -0
  101. {memu_py-1.3.0 → memu_py-1.4.0}/examples/example_3_multimodal_memory.py +0 -0
  102. {memu_py-1.3.0 → memu_py-1.4.0}/examples/example_4_openrouter_memory.py +0 -0
  103. {memu_py-1.3.0 → memu_py-1.4.0}/examples/getting_started_robust.py +0 -0
  104. {memu_py-1.3.0 → memu_py-1.4.0}/examples/langgraph_demo.py +0 -0
  105. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/activities.md +0 -0
  106. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/experiences.md +0 -0
  107. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/goals.md +0 -0
  108. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/habits.md +0 -0
  109. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/knowledge.md +0 -0
  110. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/opinions.md +0 -0
  111. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/personal_info.md +0 -0
  112. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/preferences.md +0 -0
  113. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/relationships.md +0 -0
  114. {memu_py-1.3.0 → memu_py-1.4.0}/examples/output/conversation_example/work_life.md +0 -0
  115. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/config.py +0 -0
  116. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/local/__init__.py +0 -0
  117. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/local/common.py +0 -0
  118. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/local/memorize.py +0 -0
  119. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/local/tools.py +0 -0
  120. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/platform/__init__.py +0 -0
  121. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/platform/memorize.py +0 -0
  122. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/memory/platform/tools.py +0 -0
  123. {memu_py-1.3.0 → memu_py-1.4.0}/examples/proactive/proactive.py +0 -0
  124. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/conversations/conv1.json +0 -0
  125. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/conversations/conv2.json +0 -0
  126. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/conversations/conv3.json +0 -0
  127. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/docs/doc1.txt +0 -0
  128. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/docs/doc2.txt +0 -0
  129. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/images/image1.png +0 -0
  130. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/logs/log1.txt +0 -0
  131. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/logs/log2.txt +0 -0
  132. {memu_py-1.3.0 → memu_py-1.4.0}/examples/resources/logs/log3.txt +0 -0
  133. {memu_py-1.3.0 → memu_py-1.4.0}/examples/sealos_support_agent.py +0 -0
  134. {memu_py-1.3.0 → memu_py-1.4.0}/setup.cfg +0 -0
  135. {memu_py-1.3.0 → memu_py-1.4.0}/src/lib.rs +0 -0
  136. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/__init__.py +0 -0
  137. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/_core.pyi +0 -0
  138. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/__init__.py +0 -0
  139. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/app/service.py +0 -0
  140. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/blob/__init__.py +0 -0
  141. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/blob/local_fs.py +0 -0
  142. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/__init__.py +0 -0
  143. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/factory.py +0 -0
  144. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/__init__.py +0 -0
  145. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/models.py +0 -0
  146. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/repo.py +0 -0
  147. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/repositories/__init__.py +0 -0
  148. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/repositories/category_item_repo.py +0 -0
  149. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/repositories/filter.py +0 -0
  150. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/repositories/memory_category_repo.py +0 -0
  151. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/repositories/resource_repo.py +0 -0
  152. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/inmemory/state.py +0 -0
  153. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/interfaces.py +0 -0
  154. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/__init__.py +0 -0
  155. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/migration.py +0 -0
  156. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/migrations/__init__.py +0 -0
  157. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/migrations/env.py +0 -0
  158. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/models.py +0 -0
  159. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/postgres.py +0 -0
  160. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/repositories/__init__.py +0 -0
  161. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/repositories/base.py +0 -0
  162. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/repositories/category_item_repo.py +0 -0
  163. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/repositories/memory_category_repo.py +0 -0
  164. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/repositories/resource_repo.py +0 -0
  165. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/schema.py +0 -0
  166. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/postgres/session.py +0 -0
  167. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/repositories/__init__.py +0 -0
  168. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/repositories/category_item.py +0 -0
  169. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/repositories/memory_category.py +0 -0
  170. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/repositories/resource.py +0 -0
  171. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/__init__.py +0 -0
  172. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/models.py +0 -0
  173. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/repositories/__init__.py +0 -0
  174. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/repositories/base.py +0 -0
  175. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/repositories/category_item_repo.py +0 -0
  176. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/repositories/memory_category_repo.py +0 -0
  177. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/repositories/resource_repo.py +0 -0
  178. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/schema.py +0 -0
  179. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/session.py +0 -0
  180. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/sqlite/sqlite.py +0 -0
  181. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/database/state.py +0 -0
  182. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/__init__.py +0 -0
  183. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/backends/__init__.py +0 -0
  184. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/backends/base.py +0 -0
  185. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/backends/doubao.py +0 -0
  186. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/backends/openai.py +0 -0
  187. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/http_client.py +0 -0
  188. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/embedding/openai_sdk.py +0 -0
  189. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/integrations/__init__.py +0 -0
  190. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/integrations/langgraph.py +0 -0
  191. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/backends/__init__.py +0 -0
  192. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/backends/base.py +0 -0
  193. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/backends/doubao.py +0 -0
  194. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/backends/grok.py +0 -0
  195. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/backends/openai.py +0 -0
  196. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/llm/backends/openrouter.py +0 -0
  197. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/__init__.py +0 -0
  198. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/category_patch/__init__.py +0 -0
  199. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/category_patch/category.py +0 -0
  200. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/category_summary/category.py +0 -0
  201. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/memory_type/behavior.py +0 -0
  202. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/memory_type/event.py +0 -0
  203. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/memory_type/knowledge.py +0 -0
  204. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/memory_type/profile.py +0 -0
  205. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/memory_type/skill.py +0 -0
  206. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/preprocess/__init__.py +0 -0
  207. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/preprocess/audio.py +0 -0
  208. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/preprocess/conversation.py +0 -0
  209. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/preprocess/document.py +0 -0
  210. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/preprocess/image.py +0 -0
  211. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/preprocess/video.py +0 -0
  212. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/__init__.py +0 -0
  213. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/judger.py +0 -0
  214. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/llm_category_ranker.py +0 -0
  215. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/llm_item_ranker.py +0 -0
  216. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/llm_resource_ranker.py +0 -0
  217. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/pre_retrieval_decision.py +0 -0
  218. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/query_rewriter.py +0 -0
  219. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/prompts/retrieve/query_rewriter_judger.py +0 -0
  220. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/utils/__init__.py +0 -0
  221. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/utils/conversation.py +0 -0
  222. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/workflow/__init__.py +0 -0
  223. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/workflow/interceptor.py +0 -0
  224. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/workflow/pipeline.py +0 -0
  225. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/workflow/runner.py +0 -0
  226. {memu_py-1.3.0 → memu_py-1.4.0}/src/memu/workflow/step.py +0 -0
  227. {memu_py-1.3.0 → memu_py-1.4.0}/tests/__init__.py +0 -0
  228. {memu_py-1.3.0 → memu_py-1.4.0}/tests/example/example_conversation.json +0 -0
  229. {memu_py-1.3.0 → memu_py-1.4.0}/tests/integrations/test_langgraph.py +0 -0
  230. {memu_py-1.3.0 → memu_py-1.4.0}/tests/llm/test_grok_provider.py +0 -0
  231. {memu_py-1.3.0 → memu_py-1.4.0}/tests/rust_entry_test.py +0 -0
  232. {memu_py-1.3.0 → memu_py-1.4.0}/tests/test_inmemory.py +0 -0
  233. {memu_py-1.3.0 → memu_py-1.4.0}/tests/test_openrouter.py +0 -0
  234. {memu_py-1.3.0 → memu_py-1.4.0}/tests/test_postgres.py +0 -0
  235. {memu_py-1.3.0 → memu_py-1.4.0}/tests/test_sqlite.py +0 -0
  236. {memu_py-1.3.0 → memu_py-1.4.0}/tests/utils/test_conversation.py +0 -0
@@ -11,7 +11,7 @@ jobs:
11
11
  python-version: ["3.13"]
12
12
 
13
13
  steps:
14
- - uses: actions/checkout@v4
14
+ - uses: actions/checkout@v6
15
15
 
16
16
  - name: Install uv & set Python
17
17
  uses: astral-sh/setup-uv@v7
@@ -58,7 +58,7 @@ jobs:
58
58
  extra-args: ""
59
59
  python-version: "3.13"
60
60
  steps:
61
- - uses: actions/checkout@v4
61
+ - uses: actions/checkout@v6
62
62
 
63
63
  - name: Install uv
64
64
  uses: astral-sh/setup-uv@v7
@@ -85,7 +85,7 @@ jobs:
85
85
  CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
86
86
 
87
87
  - name: Upload wheel artifact
88
- uses: actions/upload-artifact@v4
88
+ uses: actions/upload-artifact@v6
89
89
  with:
90
90
  name: wheels-${{ matrix.label }}
91
91
  path: dist/*.whl
@@ -97,7 +97,7 @@ jobs:
97
97
  needs: release-please
98
98
  if: ${{ needs.release-please.outputs.releases_created == 'true' && needs.release-please.outputs.tag_name != '' }}
99
99
  steps:
100
- - uses: actions/checkout@v4
100
+ - uses: actions/checkout@v6
101
101
 
102
102
  - name: Install uv
103
103
  uses: astral-sh/setup-uv@v7
@@ -114,7 +114,7 @@ jobs:
114
114
  run: uvx maturin sdist --out dist
115
115
 
116
116
  - name: Upload sdist artifact
117
- uses: actions/upload-artifact@v4
117
+ uses: actions/upload-artifact@v6
118
118
  with:
119
119
  name: sdist
120
120
  path: dist/*.tar.gz
@@ -134,14 +134,14 @@ jobs:
134
134
  contents: write
135
135
  steps:
136
136
  - name: Download wheel artifacts
137
- uses: actions/download-artifact@v4
137
+ uses: actions/download-artifact@v7
138
138
  with:
139
139
  pattern: wheels-*
140
140
  merge-multiple: true
141
141
  path: dist
142
142
 
143
143
  - name: Download sdist artifact
144
- uses: actions/download-artifact@v4
144
+ uses: actions/download-artifact@v7
145
145
  with:
146
146
  name: sdist
147
147
  path: dist
@@ -1,5 +1,31 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.4.0](https://github.com/NevaMind-AI/memU/compare/v1.3.0...v1.4.0) (2026-02-06)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add inline memory item references in category summaries ([#202](https://github.com/NevaMind-AI/memU/issues/202)) ([#205](https://github.com/NevaMind-AI/memU/issues/205)) ([5213571](https://github.com/NevaMind-AI/memU/commit/5213571b218d85784e0771f7a721eafd7da1c1ff))
9
+ * Add salience-aware memory with reinforcement tracking ([#186](https://github.com/NevaMind-AI/memU/issues/186)) ([#206](https://github.com/NevaMind-AI/memU/issues/206)) ([2bdbcce](https://github.com/NevaMind-AI/memU/commit/2bdbcce1a87ae1017d5930901fb0ae8d2924dcee))
10
+ * Add Tool Memory type with specialized metadata and statistics ([#247](https://github.com/NevaMind-AI/memU/issues/247)) ([4e8a035](https://github.com/NevaMind-AI/memU/commit/4e8a03578641afd0e07f9700629dff8d91d2b3fb))
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * add chat() API and stop misusing summarize() ([#208](https://github.com/NevaMind-AI/memU/issues/208)) ([be0a5c7](https://github.com/NevaMind-AI/memU/commit/be0a5c73250f0a21ad5e0d39b0e66e3018809e0f))
16
+ * remove unused type: ignore comment and add lazyllm mypy override ([#275](https://github.com/NevaMind-AI/memU/issues/275)) ([0e490f7](https://github.com/NevaMind-AI/memU/commit/0e490f7333feecffaef0901cccb1c9a5dbb7bafb))
17
+ * **video:** cleanup temp files on extraction failure ([#295](https://github.com/NevaMind-AI/memU/issues/295)) ([16b65e5](https://github.com/NevaMind-AI/memU/commit/16b65e54aef69dfe617835ca534c12752e06eda8))
18
+
19
+
20
+ ### Documentation
21
+
22
+ * file system in readme ([#301](https://github.com/NevaMind-AI/memU/issues/301)) ([ee27d8a](https://github.com/NevaMind-AI/memU/commit/ee27d8aa5e42d249963b08d5775338080b0255f8))
23
+ * fix name ([#291](https://github.com/NevaMind-AI/memU/issues/291)) ([fd0d179](https://github.com/NevaMind-AI/memU/commit/fd0d17998f6c0c9ba5c7e91964c39ee909f2b366))
24
+ * fix readme lint ([#290](https://github.com/NevaMind-AI/memU/issues/290)) ([a7a5516](https://github.com/NevaMind-AI/memU/commit/a7a55169ecbc1579ae87dc68c5e09b1d62f07b56))
25
+ * lint error ([#287](https://github.com/NevaMind-AI/memU/issues/287)) ([7f61dc7](https://github.com/NevaMind-AI/memU/commit/7f61dc72ffbadf849f227cf314bba7ce7964761b))
26
+ * readme memubot ([#289](https://github.com/NevaMind-AI/memU/issues/289)) ([2f30798](https://github.com/NevaMind-AI/memU/commit/2f30798367e3591107e1e66a184d0dd4ad6c2f93))
27
+ * Update README.md ([#300](https://github.com/NevaMind-AI/memU/issues/300)) ([1075d7c](https://github.com/NevaMind-AI/memU/commit/1075d7c9ec3a272846c9fdb8c22ec58ff73cf6e7))
28
+
3
29
  ## [1.3.0](https://github.com/NevaMind-AI/memU/compare/v1.2.0...v1.3.0) (2026-01-29)
4
30
 
5
31
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: memu-py
3
- Version: 1.3.0
3
+ Version: 1.4.0
4
4
  Classifier: Development Status :: 4 - Beta
5
5
  Classifier: Intended Audience :: Developers
6
6
  Classifier: Operating System :: OS Independent
@@ -40,7 +40,7 @@ Project-URL: Homepage, https://github.com/NevaMind-AI/MemU
40
40
 
41
41
  # memU
42
42
 
43
- ### Always-On Proactive Memory for AI Agents
43
+ ### 24/7 Always-On Proactive Memory for AI Agents
44
44
 
45
45
  [![PyPI version](https://badge.fury.io/py/memu-py.svg)](https://badge.fury.io/py/memu-py)
46
46
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
@@ -60,7 +60,54 @@ memU is a memory framework built for **24/7 proactive agents**.
60
60
  It is designed for long-running use and greatly **reduces the LLM token cost** of keeping agents always online, making always-on, evolving agents practical in production systems.
61
61
  memU **continuously captures and understands user intent**. Even without a command, the agent can tell what you are about to do and act on it by itself.
62
62
 
63
- check our [memU bot](https://memu.bot)
63
+ ---
64
+
65
+ ## 🤖 [OpenClaw (Moltbot, Clawdbot) Alternative](https://memu.bot)
66
+
67
+ <img width="100%" src="https://github.com/NevaMind-AI/memU/blob/main/assets/memUbot.png" />
68
+
69
+ - **Download-and-use and simple** to get started.
70
+ - Builds long-term memory to **understand user intent** and act proactively.
71
+ - **Cuts LLM token cost** with smaller context.
72
+
73
+ Try now: [memU bot](https://memu.bot)
74
+
75
+ ---
76
+
77
+ ## 🗃️ Memory as File System, File System as Memory
78
+
79
+ memU treats **memory like a file system**—structured, hierarchical, and instantly accessible.
80
+
81
+ | File System | memU Memory |
82
+ |-------------|-------------|
83
+ | 📁 Folders | 🏷️ Categories (auto-organized topics) |
84
+ | 📄 Files | 🧠 Memory Items (extracted facts, preferences, skills) |
85
+ | 🔗 Symlinks | 🔄 Cross-references (related memories linked) |
86
+ | 📂 Mount points | 📥 Resources (conversations, documents, images) |
87
+
88
+ **Why this matters:**
89
+ - **Navigate memories** like browsing directories—drill down from broad categories to specific facts
90
+ - **Mount new knowledge** instantly—conversations and documents become queryable memory
91
+ - **Cross-link everything**—memories reference each other, building a connected knowledge graph
92
+ - **Persistent & portable**—export, backup, and transfer memory like files
93
+
94
+ ```
95
+ memory/
96
+ ├── preferences/
97
+ │ ├── communication_style.md
98
+ │ └── topic_interests.md
99
+ ├── relationships/
100
+ │ ├── contacts/
101
+ │ └── interaction_history/
102
+ ├── knowledge/
103
+ │ ├── domain_expertise/
104
+ │ └── learned_skills/
105
+ └── context/
106
+ ├── recent_conversations/
107
+ └── pending_tasks/
108
+ ```
109
+
110
+ Just as a file system turns raw bytes into organized data, memU transforms raw interactions into **structured, searchable, proactive intelligence**.
64
111
 
65
112
  ---
66
113
 
@@ -94,35 +141,53 @@ python proactive.py
94
141
 
95
142
  ### Proactive Memory Lifecycle
96
143
  ```
97
- ┌─────────────────────────────────────────────────┐
98
- 1. USER INITIAL QUERY
99
- │ └─ User input, context, or any trigger event │
100
- Conversation starts here
101
- └─────────────────────────────────────────────────┘
102
-
103
- ┌─────────────────────────────────────────────────┐
104
- 2. AGENT PLANNING / ACTIONS
105
- └─ Analyze request, execute tasks
106
- │ Retrieve relevant memories for context │
107
- └─────────────────────────────────────────────────┘
108
-
109
- ┌─────────────────────────────────────────────────┐
110
- 3. MEMORIZE & UPDATE TODOLIST
111
- └─ Store new insights, facts, preferences
112
- Modify task list based on progress
113
- └─────────────────────────────────────────────────┘
114
-
115
- ┌─────────────────────────────────────────────────┐
116
- 4. PREDICT USER INTENT
117
- └─ Anticipate next steps and needs
118
- Proactively prepare relevant context
119
- └─────────────────────────────────────────────────┘
120
-
121
- ┌─────────────────────────────────────────────────┐
122
- 5. LOOP (2 → 4)
123
- └─ Continuous iteration until task complete
124
- Agent-driven proactive workflow
125
- └─────────────────────────────────────────────────┘
144
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
145
+ USER QUERY
146
+ └──────────────────────────────────────────────────────────────────────────────────────────────────┘
147
+
148
+ ▼ ▼
149
+ ┌────────────────────────────────────────┐ ┌────────────────────────────────────────────────┐
150
+ │ 🤖 MAIN AGENT │ │ 🧠 MEMU BOT │
151
+ │ │
152
+ Handle user queries & execute tasks ◄───► │ Monitor, memorize & proactive intelligence │
153
+ ├────────────────────────────────────────┤ ├────────────────────────────────────────────────┤
154
+ │ │ │ │
155
+ │ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
156
+ │ │ 1. RECEIVE USER INPUT │ │ │ │ 1. MONITOR INPUT/OUTPUT │ │
157
+ │ Parse query, understand │ │ ───► │ │ Observe agent interactions
158
+ │ context and intent │ │ │ │ Track conversation flow
159
+ └──────────────────────────────────┘ │ └──────────────────────────────────────────┘ │
160
+ │ │ │ │ │ │
161
+ │ ▼ │ │ ▼ │
162
+ │ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
163
+ │ 2. PLAN & EXECUTE │ │ │ 2. MEMORIZE & EXTRACT │ │
164
+ │ Break down tasks │ │ ◄─── │ │ Store insights, facts, preferences
165
+ │ │ Call tools, retrieve data │ inject │ │ Extract skills & knowledge
166
+ │ │ Generate responses │ │ memory │ │ Update user profile │ │
167
+ │ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
168
+ │ │ │ │ │ │
169
+ │ ▼ │
170
+ ┌──────────────────────────────────┐ │ ┌──────────────────────────────────────────┐ │
171
+ │ 3. RESPOND TO USER │ │ │ 3. PREDICT USER INTENT │ │
172
+ │ │ Deliver answer/result │ │ ───► │ │ Anticipate next steps │ │
173
+ │ │ Continue conversation │ │ │ │ Identify upcoming needs │ │
174
+ │ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
175
+ │ │ │ │ │ │
176
+ │ ▼ │ │ ▼ │
177
+ │ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
178
+ │ │ 4. LOOP │ │ │ │ 4. RUN PROACTIVE TASKS │ │
179
+ │ │ Wait for next user input │ │ ◄─── │ │ Pre-fetch relevant context │ │
180
+ │ │ or proactive suggestions │ │ suggest│ │ Prepare recommendations │ │
181
+ │ └──────────────────────────────────┘ │ │ │ Update todolist autonomously │ │
182
+ │ │ │ └──────────────────────────────────────────┘ │
183
+ └────────────────────────────────────────┘ └────────────────────────────────────────────────┘
184
+ │ │
185
+ └───────────────────────────┬───────────────────────────────┘
186
+
187
+ ┌──────────────────────────────┐
188
+ │ CONTINUOUS SYNC LOOP │
189
+ │ Agent ◄──► MemU Bot ◄──► DB │
190
+ └──────────────────────────────┘
126
191
  ```
127
192
 
128
193
  ---
@@ -378,6 +443,7 @@ See [`examples/example_4_openrouter_memory.py`](examples/example_4_openrouter_me
378
443
  Processes inputs in real-time and immediately updates memory:
379
444
 
380
445
  <img width="100%" alt="memorize" src="assets/memorize.png" />
446
+
381
447
  ```python
382
448
  result = await service.memorize(
383
449
  resource_url="path/to/file.json", # File path or URL
@@ -455,8 +521,6 @@ result = await service.retrieve(
455
521
  - `where={"agent_id__in": ["1", "2"]}` - Multi-agent coordination
456
522
  - Omit `where` for global context awareness
457
523
 
458
- > 📚 **For complete API documentation**, see [SERVICE_API.md](docs/SERVICE_API.md) - includes proactive workflow patterns, pipeline configuration, and real-time update handling.
459
-
460
524
  ---
461
525
 
462
526
  ## 💡 Proactive Scenarios
@@ -4,7 +4,7 @@
4
4
 
5
5
  # memU
6
6
 
7
- ### Always-On Proactive Memory for AI Agents
7
+ ### 24/7 Always-On Proactive Memory for AI Agents
8
8
 
9
9
  [![PyPI version](https://badge.fury.io/py/memu-py.svg)](https://badge.fury.io/py/memu-py)
10
10
  [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
@@ -24,7 +24,54 @@ memU is a memory framework built for **24/7 proactive agents**.
24
24
  It is designed for long-running use and greatly **reduces the LLM token cost** of keeping agents always online, making always-on, evolving agents practical in production systems.
25
25
  memU **continuously captures and understands user intent**. Even without a command, the agent can tell what you are about to do and act on it by itself.
26
26
 
27
- check our [memU bot](https://memu.bot)
27
+ ---
28
+
29
+ ## 🤖 [OpenClaw (Moltbot, Clawdbot) Alternative](https://memu.bot)
30
+
31
+ <img width="100%" src="https://github.com/NevaMind-AI/memU/blob/main/assets/memUbot.png" />
32
+
33
+ - **Download-and-use and simple** to get started.
34
+ - Builds long-term memory to **understand user intent** and act proactively.
35
+ - **Cuts LLM token cost** with smaller context.
36
+
37
+ Try now: [memU bot](https://memu.bot)
38
+
39
+ ---
40
+
41
+ ## 🗃️ Memory as File System, File System as Memory
42
+
43
+ memU treats **memory like a file system**—structured, hierarchical, and instantly accessible.
44
+
45
+ | File System | memU Memory |
46
+ |-------------|-------------|
47
+ | 📁 Folders | 🏷️ Categories (auto-organized topics) |
48
+ | 📄 Files | 🧠 Memory Items (extracted facts, preferences, skills) |
49
+ | 🔗 Symlinks | 🔄 Cross-references (related memories linked) |
50
+ | 📂 Mount points | 📥 Resources (conversations, documents, images) |
51
+
52
+ **Why this matters:**
53
+ - **Navigate memories** like browsing directories—drill down from broad categories to specific facts
54
+ - **Mount new knowledge** instantly—conversations and documents become queryable memory
55
+ - **Cross-link everything**—memories reference each other, building a connected knowledge graph
56
+ - **Persistent & portable**—export, backup, and transfer memory like files
57
+
58
+ ```
59
+ memory/
60
+ ├── preferences/
61
+ │ ├── communication_style.md
62
+ │ └── topic_interests.md
63
+ ├── relationships/
64
+ │ ├── contacts/
65
+ │ └── interaction_history/
66
+ ├── knowledge/
67
+ │ ├── domain_expertise/
68
+ │ └── learned_skills/
69
+ └── context/
70
+ ├── recent_conversations/
71
+ └── pending_tasks/
72
+ ```
73
+
74
+ Just as a file system turns raw bytes into organized data, memU transforms raw interactions into **structured, searchable, proactive intelligence**.
28
75
 
29
76
  ---
30
77
 
@@ -58,35 +105,53 @@ python proactive.py
58
105
 
59
106
  ### Proactive Memory Lifecycle
60
107
  ```
61
- ┌─────────────────────────────────────────────────┐
62
- 1. USER INITIAL QUERY
63
- │ └─ User input, context, or any trigger event │
64
- Conversation starts here
65
- └─────────────────────────────────────────────────┘
66
-
67
- ┌─────────────────────────────────────────────────┐
68
- 2. AGENT PLANNING / ACTIONS
69
- └─ Analyze request, execute tasks
70
- │ Retrieve relevant memories for context │
71
- └─────────────────────────────────────────────────┘
72
-
73
- ┌─────────────────────────────────────────────────┐
74
- 3. MEMORIZE & UPDATE TODOLIST
75
- └─ Store new insights, facts, preferences
76
- Modify task list based on progress
77
- └─────────────────────────────────────────────────┘
78
-
79
- ┌─────────────────────────────────────────────────┐
80
- 4. PREDICT USER INTENT
81
- └─ Anticipate next steps and needs
82
- Proactively prepare relevant context
83
- └─────────────────────────────────────────────────┘
84
-
85
- ┌─────────────────────────────────────────────────┐
86
- 5. LOOP (2 → 4)
87
- └─ Continuous iteration until task complete
88
- Agent-driven proactive workflow
89
- └─────────────────────────────────────────────────┘
108
+ ┌──────────────────────────────────────────────────────────────────────────────────────────────────┐
109
+ USER QUERY
110
+ └──────────────────────────────────────────────────────────────────────────────────────────────────┘
111
+
112
+ ▼ ▼
113
+ ┌────────────────────────────────────────┐ ┌────────────────────────────────────────────────┐
114
+ │ 🤖 MAIN AGENT │ │ 🧠 MEMU BOT │
115
+ │ │
116
+ Handle user queries & execute tasks ◄───► │ Monitor, memorize & proactive intelligence │
117
+ ├────────────────────────────────────────┤ ├────────────────────────────────────────────────┤
118
+ │ │ │ │
119
+ │ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
120
+ │ │ 1. RECEIVE USER INPUT │ │ │ │ 1. MONITOR INPUT/OUTPUT │ │
121
+ │ Parse query, understand │ │ ───► │ │ Observe agent interactions
122
+ │ context and intent │ │ │ │ Track conversation flow
123
+ └──────────────────────────────────┘ │ └──────────────────────────────────────────┘ │
124
+ │ │ │ │ │ │
125
+ │ ▼ │ │ ▼ │
126
+ │ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
127
+ │ 2. PLAN & EXECUTE │ │ │ 2. MEMORIZE & EXTRACT │ │
128
+ │ Break down tasks │ │ ◄─── │ │ Store insights, facts, preferences
129
+ │ │ Call tools, retrieve data │ inject │ │ Extract skills & knowledge
130
+ │ │ Generate responses │ │ memory │ │ Update user profile │ │
131
+ │ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
132
+ │ │ │ │ │ │
133
+ │ ▼ │
134
+ ┌──────────────────────────────────┐ │ ┌──────────────────────────────────────────┐ │
135
+ │ 3. RESPOND TO USER │ │ │ 3. PREDICT USER INTENT │ │
136
+ │ │ Deliver answer/result │ │ ───► │ │ Anticipate next steps │ │
137
+ │ │ Continue conversation │ │ │ │ Identify upcoming needs │ │
138
+ │ └──────────────────────────────────┘ │ │ └──────────────────────────────────────────┘ │
139
+ │ │ │ │ │ │
140
+ │ ▼ │ │ ▼ │
141
+ │ ┌──────────────────────────────────┐ │ │ ┌──────────────────────────────────────────┐ │
142
+ │ │ 4. LOOP │ │ │ │ 4. RUN PROACTIVE TASKS │ │
143
+ │ │ Wait for next user input │ │ ◄─── │ │ Pre-fetch relevant context │ │
144
+ │ │ or proactive suggestions │ │ suggest│ │ Prepare recommendations │ │
145
+ │ └──────────────────────────────────┘ │ │ │ Update todolist autonomously │ │
146
+ │ │ │ └──────────────────────────────────────────┘ │
147
+ └────────────────────────────────────────┘ └────────────────────────────────────────────────┘
148
+ │ │
149
+ └───────────────────────────┬───────────────────────────────┘
150
+
151
+ ┌──────────────────────────────┐
152
+ │ CONTINUOUS SYNC LOOP │
153
+ │ Agent ◄──► MemU Bot ◄──► DB │
154
+ └──────────────────────────────┘
90
155
  ```
91
156
 
92
157
  ---
@@ -342,6 +407,7 @@ See [`examples/example_4_openrouter_memory.py`](examples/example_4_openrouter_me
342
407
  Processes inputs in real-time and immediately updates memory:
343
408
 
344
409
  <img width="100%" alt="memorize" src="assets/memorize.png" />
410
+
345
411
  ```python
346
412
  result = await service.memorize(
347
413
  resource_url="path/to/file.json", # File path or URL
@@ -419,8 +485,6 @@ result = await service.retrieve(
419
485
  - `where={"agent_id__in": ["1", "2"]}` - Multi-agent coordination
420
486
  - Omit `where` for global context awareness
421
487
 
422
- > 📚 **For complete API documentation**, see [SERVICE_API.md](docs/SERVICE_API.md) - includes proactive workflow patterns, pipeline configuration, and real-time update handling.
423
-
424
488
  ---
425
489
 
426
490
  ## 💡 Proactive Scenarios
Binary file
@@ -0,0 +1,68 @@
1
+ # GitHub Issue Draft: Memory Types + Tool Memory
2
+
3
+ ## Title
4
+ `[2026NewYearChallenge] Specialized Memory Types with Tool Learning`
5
+
6
+ ---
7
+
8
+ ## Description
9
+
10
+ ### What will this task implement?
11
+
12
+ This PR enhances MemU's memory type system to support specialized memory structures with type-specific metadata and introduces Tool Memory for agent self-improvement.
13
+
14
+ **Current State:** MemU has a `memory_type` field with 5 types (profile, event, knowledge, behavior, skill) and uses different LLM prompts to extract each type. However, after extraction, all memories share the same storage schema - just `summary` and `embedding`. There's no type-specific metadata, no type-aware retrieval, and no way for agents to learn from their tool usage.
15
+
16
+ **Enhancement:** Extend the memory system to support:
17
+ - Type-specific metadata fields (e.g., `when_to_use` for smarter retrieval)
18
+ - Tool Memory type for tracking tool execution history
19
+ - Tool usage statistics for agent self-improvement
20
+ - Type-aware retrieval filtering
21
+
22
+ **Key Benefits:**
23
+ - Agents can learn from their own tool usage patterns
24
+ - Smarter retrieval based on memory context
25
+ - Foundation for agents that improve over time
26
+ - Better alignment with agentic application needs
27
+
28
+ ---
29
+
30
+ ## Requirements
31
+
32
+ - [x] Type-specific metadata schema with `when_to_use` field
33
+ - [x] Tool Memory implementation with execution tracking
34
+ - [x] Tool statistics (success_rate, avg_time_cost, avg_score)
35
+ - [ ] Type-aware retrieval filtering
36
+ - [x] Tests for Tool Memory CRUD and statistics
37
+ - [ ] Documentation and usage examples
38
+
39
+ ---
40
+
41
+ ## Review Criteria
42
+
43
+ - Correctness: All tests pass, no regressions
44
+ - Quality: Clean code, follows existing patterns
45
+ - DX: Clear documentation and examples
46
+ - Impact: Enables agent self-improvement use cases
47
+
48
+ ---
49
+
50
+ ## Implementation Summary
51
+
52
+ ### Files Modified:
53
+ 1. `src/memu/database/models.py` - Added `ToolCallResult` model, extended `MemoryItem` with `when_to_use`, `metadata`, `tool_calls` fields
54
+ 2. `src/memu/database/repositories/memory_item.py` - Updated interface with new fields
55
+ 3. `src/memu/database/inmemory/repositories/memory_item_repo.py` - Updated implementation
56
+ 4. `src/memu/database/postgres/repositories/memory_item_repo.py` - Updated implementation
57
+ 5. `src/memu/database/postgres/models.py` - Added JSON columns for new fields
58
+ 6. `src/memu/prompts/memory_type/__init__.py` - Added tool type
59
+ 7. `src/memu/prompts/memory_type/tool.py` - New prompt for tool memory extraction
60
+
61
+ ### Files Added:
62
+ 1. `tests/test_tool_memory.py` - 14 unit tests for Tool Memory feature
63
+
64
+ ---
65
+
66
+ ## Notes
67
+
68
+ This builds on MemU's existing memory type foundation while adding the specialized structures needed for agentic applications. The Tool Memory feature is particularly valuable for agents that need to learn which tools work best in different situations.