memu-cli 0.1.0__tar.gz → 0.3.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 (389) hide show
  1. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/workflows/build.yml +1 -1
  2. memu_cli-0.3.0/.github/workflows/publish-memu-cli.yml +162 -0
  3. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/workflows/release-please.yml +3 -7
  4. memu_cli-0.3.0/AGENTS.md +77 -0
  5. memu_cli-0.3.0/PKG-INFO +227 -0
  6. memu_cli-0.3.0/README.md +198 -0
  7. memu_cli-0.3.0/SKILL.md +78 -0
  8. memu_cli-0.3.0/assets/structure-v2.png +0 -0
  9. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0009-codex-packaging-cli-and-config.md +1 -1
  10. memu_cli-0.3.0/docs/adr/0010-multi-host-adapters.md +167 -0
  11. memu_cli-0.3.0/docs/adr/0011-generic-host-adapter.md +85 -0
  12. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/README.md +2 -0
  13. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/sqlite.md +16 -16
  14. memu_cli-0.3.0/npm/README.md +54 -0
  15. {memu_cli-0.1.0 → memu_cli-0.3.0}/npm/bin/memu.js +9 -9
  16. {memu_cli-0.1.0 → memu_cli-0.3.0}/npm/package.json +2 -2
  17. {memu_cli-0.1.0 → memu_cli-0.3.0}/pyproject.toml +11 -33
  18. memu_cli-0.3.0/src/memu/app/__init__.py +19 -0
  19. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/app/agentic.py +32 -47
  20. memu_cli-0.3.0/src/memu/app/service.py +95 -0
  21. memu_cli-0.3.0/src/memu/app/settings.py +168 -0
  22. memu_cli-0.3.0/src/memu/cli.py +184 -0
  23. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/__init__.py +0 -8
  24. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/__init__.py +0 -4
  25. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/models.py +0 -18
  26. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repo.py +0 -16
  27. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repositories/__init__.py +0 -9
  28. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repositories/resource_repo.py +0 -2
  29. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/vector.py +3 -3
  30. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/interfaces.py +0 -10
  31. memu_cli-0.3.0/src/memu/database/models.py +110 -0
  32. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/__init__.py +0 -2
  33. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/migrations/versions/20260703_0001_initial_schema.py +0 -43
  34. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/models.py +2 -29
  35. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/postgres.py +0 -33
  36. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/repositories/__init__.py +0 -4
  37. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/repositories/resource_repo.py +0 -2
  38. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/schema.py +0 -18
  39. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/repositories/__init__.py +0 -4
  40. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/repositories/resource.py +0 -1
  41. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/models.py +0 -28
  42. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/repositories/__init__.py +0 -4
  43. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/repositories/resource_repo.py +0 -6
  44. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/schema.py +0 -18
  45. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/sqlite.py +0 -38
  46. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/state.py +0 -4
  47. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/__init__.py +1 -2
  48. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/base.py +1 -1
  49. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/base.py +3 -5
  50. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/defaults.py +8 -7
  51. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/gateway.py +3 -23
  52. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/env.py +14 -15
  53. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/__init__.py +3 -6
  54. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/base.py +8 -0
  55. memu_cli-0.3.0/src/memu/hosts/claude_code/BRIDGING_TASK.md +85 -0
  56. memu_cli-0.3.0/src/memu/hosts/claude_code/INSTALL.md +153 -0
  57. memu_cli-0.3.0/src/memu/hosts/claude_code/__init__.py +11 -0
  58. memu_cli-0.3.0/src/memu/hosts/claude_code/cli.py +47 -0
  59. memu_cli-0.3.0/src/memu/hosts/claude_code/sessions.py +72 -0
  60. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/codex/INSTALL.md +4 -4
  61. memu_cli-0.3.0/src/memu/hosts/codex/cli.py +68 -0
  62. memu_cli-0.3.0/src/memu/hosts/cursor/BRIDGING_TASK.md +80 -0
  63. memu_cli-0.3.0/src/memu/hosts/cursor/INSTALL.md +126 -0
  64. memu_cli-0.3.0/src/memu/hosts/cursor/__init__.py +11 -0
  65. memu_cli-0.3.0/src/memu/hosts/cursor/cli.py +48 -0
  66. memu_cli-0.3.0/src/memu/hosts/cursor/sessions.py +74 -0
  67. memu_cli-0.3.0/src/memu/hosts/generic/BRIDGING_TASK.md +107 -0
  68. memu_cli-0.3.0/src/memu/hosts/generic/INSTALL.md +151 -0
  69. memu_cli-0.3.0/src/memu/hosts/generic/__init__.py +12 -0
  70. memu_cli-0.3.0/src/memu/hosts/generic/cli.py +85 -0
  71. memu_cli-0.3.0/src/memu/hosts/generic/detect.py +207 -0
  72. memu_cli-0.3.0/src/memu/hosts/generic/sessions.py +141 -0
  73. memu_cli-0.3.0/src/memu/hosts/hermes/BRIDGING_TASK.md +83 -0
  74. memu_cli-0.3.0/src/memu/hosts/hermes/INSTALL.md +128 -0
  75. memu_cli-0.3.0/src/memu/hosts/hermes/__init__.py +12 -0
  76. memu_cli-0.3.0/src/memu/hosts/hermes/cli.py +49 -0
  77. memu_cli-0.3.0/src/memu/hosts/hermes/sessions.py +126 -0
  78. memu_cli-0.3.0/src/memu/hosts/host_cli.py +221 -0
  79. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/instruction.py +50 -32
  80. memu_cli-0.3.0/src/memu/hosts/openclaw/BRIDGING_TASK.md +108 -0
  81. memu_cli-0.3.0/src/memu/hosts/openclaw/INSTALL.md +129 -0
  82. memu_cli-0.3.0/src/memu/hosts/openclaw/__init__.py +11 -0
  83. memu_cli-0.3.0/src/memu/hosts/openclaw/cli.py +47 -0
  84. memu_cli-0.3.0/src/memu/hosts/openclaw/sessions.py +77 -0
  85. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/retrieval.py +4 -6
  86. memu_cli-0.3.0/src/memu/vector.py +64 -0
  87. memu_cli-0.3.0/tests/test_agentic.py +116 -0
  88. {memu_cli-0.1.0 → memu_cli-0.3.0}/tests/test_cli.py +7 -21
  89. {memu_cli-0.1.0 → memu_cli-0.3.0}/tests/test_embedding.py +5 -37
  90. memu_cli-0.3.0/tests/test_host_generic.py +144 -0
  91. {memu_cli-0.1.0 → memu_cli-0.3.0}/tests/test_host_instruction.py +32 -16
  92. memu_cli-0.3.0/tests/test_host_sessions.py +205 -0
  93. {memu_cli-0.1.0 → memu_cli-0.3.0}/tests/test_vector.py +1 -10
  94. memu_cli-0.3.0/uv.lock +1069 -0
  95. memu_cli-0.1.0/.claude/skills/memu/SKILL.md +0 -46
  96. memu_cli-0.1.0/AGENTS.md +0 -165
  97. memu_cli-0.1.0/PKG-INFO +0 -507
  98. memu_cli-0.1.0/README.md +0 -466
  99. memu_cli-0.1.0/docs/HACKATHON_ISSUE_DRAFT.md +0 -68
  100. memu_cli-0.1.0/docs/HACKATHON_MAD_COMBOS.md +0 -659
  101. memu_cli-0.1.0/docs/architecture.md +0 -392
  102. memu_cli-0.1.0/docs/integrations/grok.md +0 -53
  103. memu_cli-0.1.0/docs/langgraph_integration.md +0 -97
  104. memu_cli-0.1.0/docs/providers/grok.md +0 -70
  105. memu_cli-0.1.0/docs/sealos-devbox-guide.md +0 -410
  106. memu_cli-0.1.0/docs/sealos_use_case.md +0 -54
  107. memu_cli-0.1.0/docs/tutorials/getting_started.md +0 -181
  108. memu_cli-0.1.0/examples/example_1_conversation_memory.py +0 -117
  109. memu_cli-0.1.0/examples/example_2_skill_extraction.py +0 -274
  110. memu_cli-0.1.0/examples/example_3_multimodal_memory.py +0 -137
  111. memu_cli-0.1.0/examples/example_4_openrouter_memory.py +0 -112
  112. memu_cli-0.1.0/examples/example_5_with_lazyllm_client.py +0 -250
  113. memu_cli-0.1.0/examples/example_6_preprocess_modalities.py +0 -140
  114. memu_cli-0.1.0/examples/getting_started_robust.py +0 -107
  115. memu_cli-0.1.0/examples/langgraph_demo.py +0 -76
  116. memu_cli-0.1.0/examples/output/conversation_example/activities.md +0 -9
  117. memu_cli-0.1.0/examples/output/conversation_example/experiences.md +0 -5
  118. memu_cli-0.1.0/examples/output/conversation_example/goals.md +0 -17
  119. memu_cli-0.1.0/examples/output/conversation_example/habits.md +0 -13
  120. memu_cli-0.1.0/examples/output/conversation_example/knowledge.md +0 -29
  121. memu_cli-0.1.0/examples/output/conversation_example/opinions.md +0 -1
  122. memu_cli-0.1.0/examples/output/conversation_example/personal_info.md +0 -3
  123. memu_cli-0.1.0/examples/output/conversation_example/preferences.md +0 -6
  124. memu_cli-0.1.0/examples/output/conversation_example/relationships.md +0 -3
  125. memu_cli-0.1.0/examples/output/conversation_example/work_life.md +0 -12
  126. memu_cli-0.1.0/examples/proactive/memory/config.py +0 -66
  127. memu_cli-0.1.0/examples/proactive/memory/local/common.py +0 -31
  128. memu_cli-0.1.0/examples/proactive/memory/local/memorize.py +0 -38
  129. memu_cli-0.1.0/examples/proactive/memory/local/tools.py +0 -42
  130. memu_cli-0.1.0/examples/proactive/memory/platform/__init__.py +0 -0
  131. memu_cli-0.1.0/examples/proactive/memory/platform/memorize.py +0 -31
  132. memu_cli-0.1.0/examples/proactive/memory/platform/tools.py +0 -52
  133. memu_cli-0.1.0/examples/proactive/proactive.py +0 -198
  134. memu_cli-0.1.0/examples/resources/audio/audio_intro.mp3 +0 -0
  135. memu_cli-0.1.0/examples/resources/conversations/conv1.json +0 -54
  136. memu_cli-0.1.0/examples/resources/conversations/conv2.json +0 -67
  137. memu_cli-0.1.0/examples/resources/conversations/conv3.json +0 -67
  138. memu_cli-0.1.0/examples/resources/docs/doc1.txt +0 -330
  139. memu_cli-0.1.0/examples/resources/docs/doc2.txt +0 -433
  140. memu_cli-0.1.0/examples/resources/docs/doc_sample.pdf +0 -0
  141. memu_cli-0.1.0/examples/resources/images/image1.png +0 -0
  142. memu_cli-0.1.0/examples/resources/logs/log1.txt +0 -212
  143. memu_cli-0.1.0/examples/resources/logs/log2.txt +0 -226
  144. memu_cli-0.1.0/examples/resources/logs/log3.txt +0 -374
  145. memu_cli-0.1.0/examples/resources/video/video_test.mp4 +0 -0
  146. memu_cli-0.1.0/examples/sealos-assistant/README.md +0 -66
  147. memu_cli-0.1.0/examples/sealos-assistant/entrypoint.sh +0 -13
  148. memu_cli-0.1.0/examples/sealos-assistant/main.py +0 -286
  149. memu_cli-0.1.0/examples/sealos-assistant/requirements.txt +0 -4
  150. memu_cli-0.1.0/examples/sealos_support_agent.py +0 -70
  151. memu_cli-0.1.0/examples/test_nebius_provider.py +0 -228
  152. memu_cli-0.1.0/npm/README.md +0 -32
  153. memu_cli-0.1.0/readme/README_en.md +0 -542
  154. memu_cli-0.1.0/readme/README_es.md +0 -542
  155. memu_cli-0.1.0/readme/README_fr.md +0 -542
  156. memu_cli-0.1.0/readme/README_ja.md +0 -542
  157. memu_cli-0.1.0/readme/README_ko.md +0 -542
  158. memu_cli-0.1.0/readme/README_zh.md +0 -542
  159. memu_cli-0.1.0/src/memu/app/__init__.py +0 -37
  160. memu_cli-0.1.0/src/memu/app/crud.py +0 -792
  161. memu_cli-0.1.0/src/memu/app/memorize.py +0 -1210
  162. memu_cli-0.1.0/src/memu/app/memorize_workspace.py +0 -834
  163. memu_cli-0.1.0/src/memu/app/memory_files.py +0 -101
  164. memu_cli-0.1.0/src/memu/app/retrieve.py +0 -1427
  165. memu_cli-0.1.0/src/memu/app/retrieve_workspace.py +0 -276
  166. memu_cli-0.1.0/src/memu/app/service.py +0 -495
  167. memu_cli-0.1.0/src/memu/app/settings.py +0 -594
  168. memu_cli-0.1.0/src/memu/blob/__init__.py +0 -0
  169. memu_cli-0.1.0/src/memu/blob/document_text.py +0 -65
  170. memu_cli-0.1.0/src/memu/blob/folder.py +0 -185
  171. memu_cli-0.1.0/src/memu/blob/local_fs.py +0 -97
  172. memu_cli-0.1.0/src/memu/cli.py +0 -246
  173. memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_entry_repo.py +0 -263
  174. memu_cli-0.1.0/src/memu/database/inmemory/repositories/recall_file_entry_repo.py +0 -65
  175. memu_cli-0.1.0/src/memu/database/models.py +0 -197
  176. memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_entry_repo.py +0 -401
  177. memu_cli-0.1.0/src/memu/database/postgres/repositories/recall_file_entry_repo.py +0 -145
  178. memu_cli-0.1.0/src/memu/database/repositories/recall_entry.py +0 -60
  179. memu_cli-0.1.0/src/memu/database/repositories/recall_file_entry.py +0 -31
  180. memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_entry_repo.py +0 -544
  181. memu_cli-0.1.0/src/memu/database/sqlite/repositories/recall_file_entry_repo.py +0 -211
  182. memu_cli-0.1.0/src/memu/hosts/codex/cli.py +0 -167
  183. memu_cli-0.1.0/src/memu/integrations/__init__.py +0 -3
  184. memu_cli-0.1.0/src/memu/integrations/langgraph.py +0 -163
  185. memu_cli-0.1.0/src/memu/llm/anthropic_client.py +0 -149
  186. memu_cli-0.1.0/src/memu/llm/backends/__init__.py +0 -21
  187. memu_cli-0.1.0/src/memu/llm/backends/base.py +0 -43
  188. memu_cli-0.1.0/src/memu/llm/backends/claude.py +0 -84
  189. memu_cli-0.1.0/src/memu/llm/backends/deepseek.py +0 -14
  190. memu_cli-0.1.0/src/memu/llm/backends/doubao.py +0 -69
  191. memu_cli-0.1.0/src/memu/llm/backends/grok.py +0 -11
  192. memu_cli-0.1.0/src/memu/llm/backends/kimi.py +0 -14
  193. memu_cli-0.1.0/src/memu/llm/backends/minimax.py +0 -14
  194. memu_cli-0.1.0/src/memu/llm/backends/openai.py +0 -70
  195. memu_cli-0.1.0/src/memu/llm/backends/openrouter.py +0 -70
  196. memu_cli-0.1.0/src/memu/llm/gateway.py +0 -90
  197. memu_cli-0.1.0/src/memu/llm/http_client.py +0 -232
  198. memu_cli-0.1.0/src/memu/llm/lazyllm_client.py +0 -159
  199. memu_cli-0.1.0/src/memu/llm/openai_client.py +0 -202
  200. memu_cli-0.1.0/src/memu/llm/wrapper.py +0 -804
  201. memu_cli-0.1.0/src/memu/memory_fs/__init__.py +0 -23
  202. memu_cli-0.1.0/src/memu/memory_fs/exporter.py +0 -489
  203. memu_cli-0.1.0/src/memu/memory_fs/synthesizer.py +0 -115
  204. memu_cli-0.1.0/src/memu/preprocess/__init__.py +0 -99
  205. memu_cli-0.1.0/src/memu/preprocess/audio.py +0 -83
  206. memu_cli-0.1.0/src/memu/preprocess/base.py +0 -84
  207. memu_cli-0.1.0/src/memu/preprocess/conversation.py +0 -42
  208. memu_cli-0.1.0/src/memu/preprocess/document.py +0 -36
  209. memu_cli-0.1.0/src/memu/preprocess/image.py +0 -34
  210. memu_cli-0.1.0/src/memu/preprocess/video.py +0 -60
  211. memu_cli-0.1.0/src/memu/prompts/__init__.py +0 -13
  212. memu_cli-0.1.0/src/memu/prompts/category_patch/__init__.py +0 -7
  213. memu_cli-0.1.0/src/memu/prompts/category_patch/category.py +0 -45
  214. memu_cli-0.1.0/src/memu/prompts/category_summary/__init__.py +0 -22
  215. memu_cli-0.1.0/src/memu/prompts/category_summary/category.py +0 -296
  216. memu_cli-0.1.0/src/memu/prompts/category_summary/category_with_refs.py +0 -140
  217. memu_cli-0.1.0/src/memu/prompts/memory_fs/__init__.py +0 -213
  218. memu_cli-0.1.0/src/memu/prompts/memory_type/__init__.py +0 -46
  219. memu_cli-0.1.0/src/memu/prompts/memory_type/behavior.py +0 -176
  220. memu_cli-0.1.0/src/memu/prompts/memory_type/event.py +0 -182
  221. memu_cli-0.1.0/src/memu/prompts/memory_type/knowledge.py +0 -172
  222. memu_cli-0.1.0/src/memu/prompts/memory_type/profile.py +0 -190
  223. memu_cli-0.1.0/src/memu/prompts/memory_type/skill.py +0 -580
  224. memu_cli-0.1.0/src/memu/prompts/memory_type/tool.py +0 -120
  225. memu_cli-0.1.0/src/memu/prompts/preprocess/__init__.py +0 -11
  226. memu_cli-0.1.0/src/memu/prompts/preprocess/audio.py +0 -62
  227. memu_cli-0.1.0/src/memu/prompts/preprocess/conversation.py +0 -43
  228. memu_cli-0.1.0/src/memu/prompts/preprocess/document.py +0 -35
  229. memu_cli-0.1.0/src/memu/prompts/preprocess/image.py +0 -34
  230. memu_cli-0.1.0/src/memu/prompts/preprocess/video.py +0 -35
  231. memu_cli-0.1.0/src/memu/prompts/retrieve/__init__.py +0 -0
  232. memu_cli-0.1.0/src/memu/prompts/retrieve/judger.py +0 -39
  233. memu_cli-0.1.0/src/memu/prompts/retrieve/llm_category_ranker.py +0 -35
  234. memu_cli-0.1.0/src/memu/prompts/retrieve/llm_item_ranker.py +0 -40
  235. memu_cli-0.1.0/src/memu/prompts/retrieve/llm_resource_ranker.py +0 -40
  236. memu_cli-0.1.0/src/memu/prompts/retrieve/pre_retrieval_decision.py +0 -53
  237. memu_cli-0.1.0/src/memu/prompts/retrieve/query_rewriter.py +0 -44
  238. memu_cli-0.1.0/src/memu/prompts/retrieve/query_rewriter_judger.py +0 -48
  239. memu_cli-0.1.0/src/memu/utils/__init__.py +0 -5
  240. memu_cli-0.1.0/src/memu/utils/conversation.py +0 -89
  241. memu_cli-0.1.0/src/memu/utils/references.py +0 -172
  242. memu_cli-0.1.0/src/memu/utils/tool.py +0 -102
  243. memu_cli-0.1.0/src/memu/utils/video.py +0 -271
  244. memu_cli-0.1.0/src/memu/vector.py +0 -145
  245. memu_cli-0.1.0/src/memu/vlm/__init__.py +0 -24
  246. memu_cli-0.1.0/src/memu/vlm/anthropic_client.py +0 -80
  247. memu_cli-0.1.0/src/memu/vlm/backends/__init__.py +0 -19
  248. memu_cli-0.1.0/src/memu/vlm/backends/base.py +0 -65
  249. memu_cli-0.1.0/src/memu/vlm/backends/claude.py +0 -69
  250. memu_cli-0.1.0/src/memu/vlm/backends/doubao.py +0 -10
  251. memu_cli-0.1.0/src/memu/vlm/backends/grok.py +0 -9
  252. memu_cli-0.1.0/src/memu/vlm/backends/kimi.py +0 -9
  253. memu_cli-0.1.0/src/memu/vlm/backends/minimax.py +0 -10
  254. memu_cli-0.1.0/src/memu/vlm/backends/openai.py +0 -79
  255. memu_cli-0.1.0/src/memu/vlm/backends/openrouter.py +0 -19
  256. memu_cli-0.1.0/src/memu/vlm/base.py +0 -84
  257. memu_cli-0.1.0/src/memu/vlm/defaults.py +0 -30
  258. memu_cli-0.1.0/src/memu/vlm/gateway.py +0 -71
  259. memu_cli-0.1.0/src/memu/vlm/http_client.py +0 -142
  260. memu_cli-0.1.0/src/memu/vlm/openai_client.py +0 -76
  261. memu_cli-0.1.0/src/memu/workflow/__init__.py +0 -29
  262. memu_cli-0.1.0/src/memu/workflow/interceptor.py +0 -218
  263. memu_cli-0.1.0/src/memu/workflow/pipeline.py +0 -170
  264. memu_cli-0.1.0/src/memu/workflow/runner.py +0 -81
  265. memu_cli-0.1.0/src/memu/workflow/step.py +0 -101
  266. memu_cli-0.1.0/tests/__init__.py +0 -0
  267. memu_cli-0.1.0/tests/example/example_conversation.json +0 -704
  268. memu_cli-0.1.0/tests/integrations/test_langgraph.py +0 -80
  269. memu_cli-0.1.0/tests/llm/test_grok_provider.py +0 -45
  270. memu_cli-0.1.0/tests/test_audio_preprocess.py +0 -96
  271. memu_cli-0.1.0/tests/test_backend_conformance.py +0 -376
  272. memu_cli-0.1.0/tests/test_conversation_preprocess.py +0 -60
  273. memu_cli-0.1.0/tests/test_document_text.py +0 -101
  274. memu_cli-0.1.0/tests/test_folder_memorize.py +0 -295
  275. memu_cli-0.1.0/tests/test_inmemory.py +0 -89
  276. memu_cli-0.1.0/tests/test_lazyllm.py +0 -97
  277. memu_cli-0.1.0/tests/test_memory_files.py +0 -164
  278. memu_cli-0.1.0/tests/test_memory_fs_synthesis.py +0 -256
  279. memu_cli-0.1.0/tests/test_openai_max_tokens.py +0 -76
  280. memu_cli-0.1.0/tests/test_openrouter.py +0 -161
  281. memu_cli-0.1.0/tests/test_postgres.py +0 -82
  282. memu_cli-0.1.0/tests/test_references.py +0 -191
  283. memu_cli-0.1.0/tests/test_salience.py +0 -209
  284. memu_cli-0.1.0/tests/test_skill_track.py +0 -247
  285. memu_cli-0.1.0/tests/test_sqlite.py +0 -90
  286. memu_cli-0.1.0/tests/test_tool_memory.py +0 -327
  287. memu_cli-0.1.0/tests/test_vlm_preprocess.py +0 -217
  288. memu_cli-0.1.0/tests/utils/test_conversation.py +0 -91
  289. memu_cli-0.1.0/uv.lock +0 -2912
  290. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/ISSUE_TEMPLATE/bug_report.yml +0 -0
  291. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
  292. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/ISSUE_TEMPLATE/feature_request.yml +0 -0
  293. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/ISSUE_TEMPLATE/hackathon_task.yml +0 -0
  294. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/ISSUE_TEMPLATE/improvement_suggestion.yml +0 -0
  295. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/PULL_REQUEST_TEMPLATE.md +0 -0
  296. {memu_cli-0.1.0 → memu_cli-0.3.0}/.github/workflows/pr-title.yml +0 -0
  297. {memu_cli-0.1.0 → memu_cli-0.3.0}/.gitignore +0 -0
  298. {memu_cli-0.1.0 → memu_cli-0.3.0}/.pre-commit-config.yaml +0 -0
  299. {memu_cli-0.1.0 → memu_cli-0.3.0}/.python-version +0 -0
  300. {memu_cli-0.1.0 → memu_cli-0.3.0}/CHANGELOG.md +0 -0
  301. {memu_cli-0.1.0 → memu_cli-0.3.0}/CONTRIBUTING.md +0 -0
  302. {memu_cli-0.1.0 → memu_cli-0.3.0}/Cargo.lock +0 -0
  303. {memu_cli-0.1.0 → memu_cli-0.3.0}/Cargo.toml +0 -0
  304. {memu_cli-0.1.0 → memu_cli-0.3.0}/LICENSE.txt +0 -0
  305. {memu_cli-0.1.0 → memu_cli-0.3.0}/MANIFEST.in +0 -0
  306. {memu_cli-0.1.0 → memu_cli-0.3.0}/Makefile +0 -0
  307. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/banner.png +0 -0
  308. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/benchmark.png +0 -0
  309. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/memUbot.png +0 -0
  310. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/memorize.png +0 -0
  311. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/Clawdchat.png +0 -0
  312. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/LazyLLM.png +0 -0
  313. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/buddie.png +0 -0
  314. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/bytebase.png +0 -0
  315. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/jazz.png +0 -0
  316. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/openagents.png +0 -0
  317. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/partners/xroute.png +0 -0
  318. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/qrcode.png +0 -0
  319. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/retrieve.png +0 -0
  320. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/star.gif +0 -0
  321. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/structure.png +0 -0
  322. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_companion-0000.jpg +0 -0
  323. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_creation-0000.jpg +0 -0
  324. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_edu-0000.jpg +0 -0
  325. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_ip-0000.png +0 -0
  326. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_robot-0000.jpg +0 -0
  327. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_role_play-0000.jpg +0 -0
  328. {memu_cli-0.1.0 → memu_cli-0.3.0}/assets/usecase/ai_therapy-0000.jpg +0 -0
  329. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0001-workflow-pipeline-architecture.md +0 -0
  330. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0002-pluggable-storage-and-vector-strategy.md +0 -0
  331. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0003-user-scope-in-data-model.md +0 -0
  332. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0004-workspace-memorize-and-memory-file-system.md +0 -0
  333. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0005-dedicated-embedding-package.md +0 -0
  334. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0006-from-memory-item-category-to-tracked-workspace-memorization.md +0 -0
  335. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0007-three-independent-memory-lines-wiki-graph.md +0 -0
  336. {memu_cli-0.1.0 → memu_cli-0.3.0}/docs/adr/0008-two-integration-surfaces-hooks-and-api.md +0 -0
  337. {memu_cli-0.1.0 → memu_cli-0.3.0}/scripts/db.py +0 -0
  338. {memu_cli-0.1.0 → memu_cli-0.3.0}/setup.cfg +0 -0
  339. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/lib.rs +0 -0
  340. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/__init__.py +0 -0
  341. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/__main__.py +0 -0
  342. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/_core.pyi +0 -0
  343. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/app/client_pool.py +0 -0
  344. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/factory.py +0 -0
  345. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repositories/filter.py +0 -0
  346. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repositories/recall_file_repo.py +0 -0
  347. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repositories/recall_file_resource_repo.py +0 -0
  348. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/repositories/recall_file_segment_repo.py +0 -0
  349. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/inmemory/state.py +0 -0
  350. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/migration.py +0 -0
  351. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/migrations/__init__.py +0 -0
  352. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/migrations/env.py +0 -0
  353. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/migrations/script.py.mako +0 -0
  354. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/repositories/base.py +0 -0
  355. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/repositories/recall_file_repo.py +0 -0
  356. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/repositories/recall_file_resource_repo.py +0 -0
  357. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/repositories/recall_file_segment_repo.py +0 -0
  358. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/postgres/session.py +0 -0
  359. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/repositories/recall_file.py +0 -0
  360. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/repositories/recall_file_resource.py +0 -0
  361. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/repositories/recall_file_segment.py +0 -0
  362. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/__init__.py +0 -0
  363. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/repositories/base.py +0 -0
  364. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/repositories/recall_file_repo.py +0 -0
  365. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/repositories/recall_file_resource_repo.py +0 -0
  366. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/repositories/recall_file_segment_repo.py +0 -0
  367. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/database/sqlite/session.py +0 -0
  368. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/__init__.py +0 -0
  369. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/doubao.py +0 -0
  370. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/jina.py +0 -0
  371. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/openai.py +0 -0
  372. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/openrouter.py +0 -0
  373. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/backends/voyage.py +0 -0
  374. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/http_client.py +0 -0
  375. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/embedding/openai_sdk.py +0 -0
  376. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/__init__.py +0 -0
  377. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/instructions.py +0 -0
  378. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/layout.py +0 -0
  379. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/manifest.py +0 -0
  380. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/pipeline.py +0 -0
  381. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/recall_files.py +0 -0
  382. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/resources.py +0 -0
  383. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/bridging/transcripts.py +0 -0
  384. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/codex/BRIDGING_TASK.md +0 -0
  385. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/codex/__init__.py +0 -0
  386. {memu_cli-0.1.0 → memu_cli-0.3.0}/src/memu/hosts/codex/sessions.py +0 -0
  387. {memu_cli-0.1.0/examples/proactive/memory/local → memu_cli-0.3.0/tests}/__init__.py +0 -0
  388. {memu_cli-0.1.0 → memu_cli-0.3.0}/tests/rust_entry_test.py +0 -0
  389. {memu_cli-0.1.0 → memu_cli-0.3.0}/tests/test_postgres_migration_config.py +0 -0
@@ -25,7 +25,7 @@ jobs:
25
25
 
26
26
  - name: Sync dependencies
27
27
  run: |
28
- uv sync --frozen --extra document
28
+ uv sync --frozen
29
29
  uv run pre-commit install
30
30
 
31
31
  - name: Run style checks
@@ -0,0 +1,162 @@
1
+ # Publishes the engine to PyPI as `memu-cli` — the one and only distribution.
2
+ #
3
+ # `memu-cli` versions independently of the release-please train (which still
4
+ # cuts GitHub releases and the changelog), so the npm launcher and docs can
5
+ # point at a stable install target; the version is set at build time from the
6
+ # workflow input.
7
+ #
8
+ # First-time setup: add a trusted publisher on PyPI for project `memu-cli`
9
+ # (workflow: publish-memu-cli.yml, environment: pypi).
10
+
11
+ on:
12
+ workflow_dispatch:
13
+ inputs:
14
+ version:
15
+ description: "memu-cli version to publish (e.g. 0.2.1)"
16
+ required: true
17
+ type: string
18
+
19
+ name: publish-memu-cli
20
+
21
+ jobs:
22
+ build-wheels:
23
+ name: build wheels (${{ matrix.label }})
24
+ runs-on: ${{ matrix.os }}
25
+ strategy:
26
+ fail-fast: false
27
+ matrix:
28
+ include:
29
+ - os: ubuntu-latest
30
+ label: linux-x86_64
31
+ target: x86_64-unknown-linux-gnu
32
+ extra-args: "--compatibility manylinux_2_39"
33
+ python-version: "3.13"
34
+ - os: ubuntu-latest
35
+ label: linux-aarch64
36
+ target: aarch64-unknown-linux-gnu
37
+ extra-args: "--compatibility manylinux_2_39"
38
+ python-version: "3.13"
39
+ - os: macos-15-intel
40
+ label: macos-x86_64
41
+ target: ""
42
+ extra-args: ""
43
+ python-version: "3.13"
44
+ - os: macos-latest
45
+ label: macos-aarch64
46
+ target: ""
47
+ extra-args: ""
48
+ python-version: "3.13"
49
+ - os: windows-latest
50
+ label: windows-x86_64
51
+ target: ""
52
+ extra-args: ""
53
+ python-version: "3.13"
54
+ steps:
55
+ - uses: actions/checkout@v6
56
+
57
+ # No $ anchors: Windows runners check out with CRLF line endings,
58
+ # where a trailing \r sits between the closing quote and the newline.
59
+ - name: Set memu-cli version
60
+ shell: bash
61
+ run: |
62
+ perl -pi -e 's/^version = "[^"]*"/version = "${{ inputs.version }}"/ if $. < 10' pyproject.toml
63
+ grep -q '^name = "memu-cli"' pyproject.toml || { echo "::error::pyproject is not memu-cli"; exit 1; }
64
+ grep -E '^(name|version) = ' pyproject.toml | head -2
65
+
66
+ - name: Install uv
67
+ uses: astral-sh/setup-uv@v7
68
+ with:
69
+ python-version: ${{ matrix.python-version }}
70
+
71
+ - name: Install maturin
72
+ run: uv tool install maturin
73
+
74
+ - name: Setup Rust
75
+ uses: dtolnay/rust-toolchain@stable
76
+ with:
77
+ targets: ${{ matrix.target }}
78
+
79
+ - name: Setup cross-compilation for Linux ARM64
80
+ if: matrix.label == 'linux-aarch64'
81
+ run: |
82
+ sudo apt-get update
83
+ sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
84
+
85
+ - name: Build wheel
86
+ run: uvx maturin build --release --out dist ${{ matrix.extra-args }} ${{ matrix.target && format('--target {0}', matrix.target) || '' }}
87
+ env:
88
+ CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc
89
+
90
+ - name: Smoke test wheel
91
+ if: matrix.label != 'linux-aarch64'
92
+ shell: bash
93
+ run: uvx --isolated --from ./dist/memu_cli-*.whl memu --help
94
+
95
+ - name: Upload wheel artifact
96
+ uses: actions/upload-artifact@v6
97
+ with:
98
+ name: memu-cli-wheels-${{ matrix.label }}
99
+ path: dist/*.whl
100
+ if-no-files-found: error
101
+
102
+ build-sdist:
103
+ name: build sdist
104
+ runs-on: ubuntu-latest
105
+ steps:
106
+ - uses: actions/checkout@v6
107
+
108
+ - name: Set memu-cli version
109
+ shell: bash
110
+ run: |
111
+ perl -pi -e 's/^version = "[^"]*"/version = "${{ inputs.version }}"/ if $. < 10' pyproject.toml
112
+ grep -q '^name = "memu-cli"' pyproject.toml || { echo "::error::pyproject is not memu-cli"; exit 1; }
113
+
114
+ - name: Install uv
115
+ uses: astral-sh/setup-uv@v7
116
+ with:
117
+ python-version: "3.13"
118
+
119
+ - name: Setup Rust
120
+ uses: dtolnay/rust-toolchain@stable
121
+
122
+ - name: Install maturin
123
+ run: uv tool install maturin
124
+
125
+ - name: Build sdist
126
+ run: uvx maturin sdist --out dist
127
+
128
+ - name: Upload sdist artifact
129
+ uses: actions/upload-artifact@v6
130
+ with:
131
+ name: memu-cli-sdist
132
+ path: dist/*.tar.gz
133
+ if-no-files-found: error
134
+
135
+ publish:
136
+ name: publish memu-cli to PyPI
137
+ runs-on: ubuntu-latest
138
+ needs:
139
+ - build-wheels
140
+ - build-sdist
141
+ environment: pypi
142
+ permissions:
143
+ id-token: write
144
+ steps:
145
+ - name: Download wheel artifacts
146
+ uses: actions/download-artifact@v7
147
+ with:
148
+ pattern: memu-cli-wheels-*
149
+ merge-multiple: true
150
+ path: dist
151
+
152
+ - name: Download sdist artifact
153
+ uses: actions/download-artifact@v7
154
+ with:
155
+ name: memu-cli-sdist
156
+ path: dist
157
+
158
+ - name: Publish to PyPI
159
+ uses: pypa/gh-action-pypi-publish@release/v1
160
+ with:
161
+ packages-dir: dist/
162
+ skip-existing: true
@@ -120,6 +120,9 @@ jobs:
120
120
  path: dist/*.tar.gz
121
121
  if-no-files-found: error
122
122
 
123
+ # Release artifacts go to the GitHub release only. PyPI publishing happens
124
+ # exclusively through publish-memu-cli.yml (the `memu-cli` distribution,
125
+ # versioned independently of this release train).
123
126
  publish:
124
127
  name: publish release artifacts
125
128
  runs-on: ubuntu-latest
@@ -128,9 +131,7 @@ jobs:
128
131
  - build-wheels
129
132
  - build-sdist
130
133
  if: ${{ needs.release-please.outputs.releases_created == 'true' && needs.release-please.outputs.tag_name != '' }}
131
- environment: pypi
132
134
  permissions:
133
- id-token: write
134
135
  contents: write
135
136
  steps:
136
137
  - name: Download wheel artifacts
@@ -153,8 +154,3 @@ jobs:
153
154
  file: dist/*
154
155
  tag: ${{ needs.release-please.outputs.tag_name }}
155
156
  file_glob: true
156
-
157
- - name: Publish to PyPI
158
- uses: pypa/gh-action-pypi-publish@release/v1
159
- with:
160
- packages-dir: dist/
@@ -0,0 +1,77 @@
1
+ # AGENTS.md
2
+
3
+ Operational guide for AI coding agents working in this repository.
4
+
5
+ ## Mission
6
+
7
+ Ship small, verified feature and bugfix changes while preserving memU's current architecture.
8
+
9
+ Core invariants:
10
+
11
+ - `MemoryService` (`src/memu/app/service.py`) is the composition root: config, storage, and the embedding client pool. Its public surface is exactly the three `AgenticMixin` entry points — `list_all_recall_files`, `progressive_retrieve`, `commit_results`.
12
+ - memU is embedding-only. No LLM/chat call happens anywhere in the service; do not add one.
13
+ - Storage is pluggable across `inmemory`, `sqlite`, and `postgres`; repository contract changes require backend parity.
14
+ - Scope data comes from `UserConfig.model`; validate `where` filters (`_normalize_where`) and do not bypass scope filtering.
15
+ - Retrieval config lives in `ProgressiveRetrieveConfig` (`file` + `resource` layers); embedding profiles in `EmbeddingProfilesConfig`.
16
+
17
+ ## Layer Map
18
+
19
+ - Service + three entry points: `src/memu/app/service.py`, `src/memu/app/agentic.py`
20
+ - Config models/defaults: `src/memu/app/settings.py`
21
+ - Storage protocols/factory: `src/memu/database/interfaces.py`, `src/memu/database/factory.py`
22
+ - Backends: `src/memu/database/{inmemory,sqlite,postgres}/*`
23
+ - Vector math/ranking: `src/memu/vector.py`
24
+ - Embedding clients: `src/memu/embedding/*`
25
+ - CLI (`memu`): `src/memu/cli.py`; shared `MEMU_*` config: `src/memu/env.py`
26
+ - Host adapters (`memu-codex`, bridging pipeline): `src/memu/hosts/*`
27
+ - Tests: `tests/*`
28
+
29
+ Read the relevant implementation and nearby tests first. Prefer local patterns over new abstractions.
30
+
31
+ ## Implementation Rules
32
+
33
+ - Keep changes narrow and localized to the affected layer.
34
+ - Preserve async behavior and result shapes unless the task explicitly asks for a breaking change.
35
+ - Maintain type hints and mypy compatibility.
36
+ - Keep provider-specific logic inside `memu.embedding.backends`; storage-neutral logic outside concrete backends.
37
+ - Do not duplicate client caching — use the existing `ClientPool` pattern.
38
+ - Do not silently swallow errors that should be visible to callers or tests.
39
+
40
+ ## Backend Parity
41
+
42
+ If a repository method, model field, filter behavior, or vector search contract changes:
43
+
44
+ 1. Update the protocol in `src/memu/database/repositories/`.
45
+ 2. Update `inmemory`, `sqlite`, and `postgres` implementations where applicable.
46
+ 3. Extend `tests/test_agentic.py` (runs against inmemory + sqlite).
47
+ 4. Check migrations/bootstrap behavior for SQL backends (`src/memu/database/postgres/migrations/`).
48
+
49
+ ## Testing And Validation
50
+
51
+ Use `uv` for local runs.
52
+
53
+ - Setup: `make install`
54
+ - Run all tests: `make test`
55
+ - Run focused tests: `uv run python -m pytest tests/<target_test>.py`
56
+ - Full quality checks: `make check`
57
+
58
+ Useful focused areas:
59
+
60
+ - The three entry points end-to-end: `tests/test_agentic.py`
61
+ - Vector ranking: `tests/test_vector.py`
62
+ - Embedding providers/gateway: `tests/test_embedding.py`
63
+ - CLI surface: `tests/test_cli.py`
64
+ - Host adapter inject seam: `tests/test_host_instruction.py`
65
+
66
+ ## Documentation Rules
67
+
68
+ - Update `README.md` or `npm/README.md` when user-visible behavior changes.
69
+ - Add or update ADRs under `docs/adr/` for architectural changes; existing ADRs are historical records — do not rewrite them.
70
+ - Do not document speculative features as implemented.
71
+
72
+ ## Done Criteria
73
+
74
+ - Code compiles for touched paths; tests for changed behavior pass.
75
+ - New behavior has test coverage.
76
+ - Backend parity considered and implemented where needed.
77
+ - No unrelated files modified.
@@ -0,0 +1,227 @@
1
+ Metadata-Version: 2.4
2
+ Name: memu-cli
3
+ Version: 0.3.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Intended Audience :: Developers
6
+ Classifier: Operating System :: OS Independent
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.13
9
+ Requires-Dist: httpx>=0.28.1
10
+ Requires-Dist: numpy>=2.3.4
11
+ Requires-Dist: openai>=2.8.0
12
+ Requires-Dist: pydantic>=2.12.4
13
+ Requires-Dist: sqlmodel>=0.0.27
14
+ Requires-Dist: alembic>=1.14.0
15
+ Requires-Dist: pendulum>=3.1.0
16
+ Requires-Dist: pgvector>=0.3.4 ; extra == 'postgres'
17
+ Requires-Dist: sqlalchemy[postgresql-psycopgbinary]>=2.0.36 ; extra == 'postgres'
18
+ Provides-Extra: postgres
19
+ License-File: LICENSE.txt
20
+ Summary: Personal memory as files — fast retrieval, higher accuracy, lower cost.
21
+ Keywords: agent,agentic,agent-harness,harness,loop-engineering,context-engineering,context-window,memory,personal-information,workspace,retrieval,llm
22
+ Author-email: MemU Team <contact@nevamind.ai>
23
+ Requires-Python: >=3.13
24
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
25
+ Project-URL: Bug Tracker, https://github.com/NevaMind-AI/MemU/issues
26
+ Project-URL: Documentation, https://github.com/NevaMind-AI/MemU#readme
27
+ Project-URL: Homepage, https://github.com/NevaMind-AI/MemU
28
+
29
+ ![MemU Banner](assets/banner.png)
30
+
31
+ <div align="center">
32
+
33
+ # memU
34
+
35
+ ### Personal memory, stored as files
36
+
37
+ **Across Agents. Fast retrieval. Lower cost.**
38
+
39
+ [![PyPI version](https://badge.fury.io/py/memu-cli.svg)](https://badge.fury.io/py/memu-cli)
40
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
41
+ [![Python 3.13+](https://img.shields.io/badge/python-3.13+-blue.svg)](https://www.python.org/downloads/)
42
+ [![Discord](https://img.shields.io/badge/Discord-Join%20Chat-5865F2?logo=discord&logoColor=white)](https://discord.com/invite/hQZntfGsbJ)
43
+ [![Twitter](https://img.shields.io/badge/Twitter-Follow-1DA1F2?logo=x&logoColor=white)](https://x.com/memU_ai)
44
+
45
+ <a href="https://trendshift.io/repositories/17374" target="_blank"><img src="https://trendshift.io/api/badge/repositories/17374" alt="NevaMind-AI%2FmemU | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
46
+
47
+ </div>
48
+
49
+ ---
50
+
51
+ memU is a 500-line memory system for AI agents. Agents write what's worth keeping as Markdown; memU stores it, embeds it, and retrieves ranked context in a single call — embeddings are the only model calls it makes. The entire memory logic lives in [`agentic.py`](src/memu/app/agentic.py) + [`service.py`](src/memu/app/service.py); everything else is pluggable storage and embedding transport.
52
+
53
+ **Installation is agent-driven.** The guides are written for the agent, not for you. One message is the whole setup — tell your agent:
54
+
55
+ > Read https://raw.githubusercontent.com/NevaMind-AI/MemU/main/SKILL.md and follow it to install memU.
56
+
57
+ It works for Codex, Claude Code, Cursor, OpenClaw, Hermes — and any other agent, via detection. Details in [Host adapters](#host-adapters-memory-for-desktop-coding-agents).
58
+
59
+ ## Quick start
60
+
61
+ ```python
62
+ from memu.app import MemoryService
63
+
64
+ service = MemoryService(
65
+ database_config={"metadata_store": {"provider": "sqlite", "dsn": "sqlite:///memu.sqlite3"}},
66
+ )
67
+
68
+ # 1. Persist agent-prepared memory: recall files (memory/skill tracks) + resources
69
+ await service.commit_results(
70
+ recall_files=[
71
+ {
72
+ "name": "Profile",
73
+ "track": "memory",
74
+ "description": "who the user is",
75
+ "content": "# Profile\n- prefers dark roast coffee\n- ships on Fridays",
76
+ },
77
+ {
78
+ "name": "deploy-checklist",
79
+ "track": "skill",
80
+ "description": "how to deploy this repo",
81
+ "content": "1. run tests\n2. tag\n3. push",
82
+ },
83
+ ],
84
+ resource=[{"path": "/abs/path/notes.md", "description": "meeting notes from the launch review"}],
85
+ )
86
+
87
+ # 2. See what is stored, across every track
88
+ files = await service.list_all_recall_files()
89
+
90
+ # 3. Single-shot embedding retrieval over segments / files / resources
91
+ context = await service.progressive_retrieve("What should I know about this user's launch preferences?")
92
+ ```
93
+
94
+ Or straight from the terminal — no code:
95
+
96
+ ```bash
97
+ export OPENAI_API_KEY=sk-... # embedding API key — the only model calls memU makes
98
+
99
+ npx memu-cli commit results.json # {"recall_files": [...], "resource": [...]}
100
+ npx memu-cli list-files
101
+ npx memu-cli retrieve "What should I know about this user's launch preferences?"
102
+ ```
103
+
104
+ State persists in a local SQLite database (`./data/memu.sqlite3` by default), so commit in one invocation and retrieve in the next.
105
+
106
+ ## How it works
107
+
108
+ ![memU memory system architecture](assets/structure-v2.png)
109
+
110
+ ### The data model
111
+
112
+ Memory is a set of **recall files** — one Markdown document per topic (`track="memory"`) or per learned skill (`track="skill"`). Committing a file also writes its search index:
113
+
114
+ | Record | What it is | How it's embedded |
115
+ |---|---|---|
116
+ | **RecallFile** | The Markdown document itself (`name`, `track`, `description`, `content`) | `name: description`, once at creation |
117
+ | **RecallFileSegment** | Searchable slices of a file | memory track: one per content line (headings skipped); skill track: one `name: description` segment per skill |
118
+ | **Resource** | A raw source on disk (`url`, `caption`) | its one-line caption |
119
+
120
+ Segments are reconciled on every commit: lines that disappeared are deleted, only genuinely new lines are embedded, unchanged lines keep their vectors — so re-committing a lightly edited file is nearly free.
121
+
122
+ ### Retrieval
123
+
124
+ `progressive_retrieve(query)` embeds the query **once** and returns three ranked layers:
125
+
126
+ - `segments` — the matched slices, narrowest and usually most on-point, each with a `score`
127
+ - `files` — the documents those segments belong to (usually what you want), each scored by its best segment and carrying its linked `resource_urls`
128
+ - `resources` — matching raw sources, for when summaries are not enough
129
+
130
+ There is no intention routing, sufficiency checking, or summarization — one embedding call in, ranked context out.
131
+
132
+ ## Host adapters: memory for desktop coding agents
133
+
134
+ memU runs as a sidecar to a desktop agent (ADR 0008/0009/0010), one binary per host. Each binds two seams:
135
+
136
+ - **record** — a scheduled bridging task slices new session logs into self-contained job files; the agent itself distills them into memory/skill Markdown; `commit` submits whatever the agent left on disk back through `commit_results`.
137
+ - **inject** — a standing instruction in the host's instruction file tells the agent to run `<binary> retrieve` (→ `progressive_retrieve`) before answering.
138
+
139
+ | Host | Binary | Session log it mines | Instruction file it patches |
140
+ | --- | --- | --- | --- |
141
+ | Codex | `memu-codex` | `~/.codex/sessions/**/*.jsonl` | `~/.codex/AGENTS.md` |
142
+ | Claude Code | `memu-claude-code` | `~/.claude/projects/<project>/<session>.jsonl` | `~/.claude/CLAUDE.md` |
143
+ | Cursor (Agent/CLI) | `memu-cursor` | `~/.cursor/projects/<project>/agent-transcripts/**.jsonl` | `./AGENTS.md` (per project) |
144
+ | OpenClaw | `memu-openclaw` | `~/.openclaw/agents/<agentId>/sessions/*.jsonl` | `~/.openclaw/workspace/AGENTS.md` |
145
+ | Hermes Agent | `memu-hermes` | `~/.hermes/state.db` (SQLite, read-only) | `~/.hermes/SOUL.md` |
146
+ | **any other agent** | `memu-agent` | found by `memu-agent detect` (JSONL dialect sniffed) | found by `detect` (AGENTS.md / CLAUDE.md / SOUL.md / …) |
147
+
148
+ For agents without a dedicated binary, `memu-agent detect` probes the machine and reports per agent whether **memorization** works (a recognizable session log exists) and whether **retrieval** works (an instruction file exists to patch) — then the same verbs run against what it found.
149
+
150
+ All hosts share one store and one embedding space via `~/.memu/config.env` — what one host's sessions taught memU, another host retrieves.
151
+
152
+ Installation is the one-message setup at the top of this README. [SKILL.md](SKILL.md) is the routing skill it hands your agent: install the package, identify which host you are (falling back to `memu-agent detect` for anything without a dedicated adapter), print that host's packaged install guide (`<binary> docs install`), and follow it — configure the store, register the scheduled bridging task, patch the instruction file, each step behind a verify gate — then report which seams (memorization / retrieval) are now active.
153
+
154
+ Afterwards `<binary> doctor` proves the whole loop resolves: config, store, and a live retrieval.
155
+
156
+ Adding another host means implementing one `TranscriptSource` (where its session logs live, how its records are shaped) plus a `HostSpec`-sized CLI — the pipeline, verbs, and instruction text are shared (ADR 0010).
157
+
158
+ ## Installation
159
+
160
+ ```bash
161
+ pip install memu-cli # library + memu + memu-codex CLIs
162
+ npx memu-cli --help # CLI via npm launcher (engine: PyPI package memu-cli)
163
+ uvx --from memu-cli memu # CLI via uv, no install
164
+ ```
165
+
166
+ ## Configuration
167
+
168
+ Values resolve in order: process env → `~/.memu/config.env` → default. Every CLI flag has a matching variable:
169
+
170
+ | Setting | Env var | Default |
171
+ |---|---|---|
172
+ | Store | `MEMU_DB` | `./data/memu.sqlite3` (CLI); **required** for host adapters |
173
+ | Embedding provider | `MEMU_EMBED_PROVIDER` | `openai` (also: `jina`, `voyage`, `doubao`, `openrouter`); legacy `MEMU_LLM_PROVIDER` still read |
174
+ | API key | `MEMU_API_KEY` | the provider's env var, e.g. `OPENAI_API_KEY` |
175
+ | Embedding model | `MEMU_EMBED_MODEL` | the provider's default |
176
+ | Base URL | `MEMU_BASE_URL` | the provider's default |
177
+
178
+ ### Storage backends
179
+
180
+ | Provider | DSN | Vector search | Use for |
181
+ |---|---|---|---|
182
+ | `inmemory` | — | brute-force cosine | tests, throwaway sessions |
183
+ | `sqlite` | `sqlite:///path.sqlite3` | brute-force cosine | local/default, single writer |
184
+ | `postgres` | `postgresql://...` | pgvector | concurrent access, large stores (`pip install "memu-cli[postgres]"`) |
185
+
186
+ ```python
187
+ service = MemoryService(
188
+ database_config={"metadata_store": {"provider": "postgres", "dsn": "postgresql://..."}},
189
+ embedding_profiles={"default": {"provider": "jina"}},
190
+ )
191
+ ```
192
+
193
+ ### Multi-tenancy
194
+
195
+ Every record carries optional scope fields (`user_id`, `agent_id` by default). Pass `user=` on writes and `where=` on reads to partition one store:
196
+
197
+ ```python
198
+ await service.commit_results(recall_files=[...], user={"user_id": "alice"})
199
+ await service.progressive_retrieve("launch preferences", where={"user_id": "alice"})
200
+ ```
201
+
202
+ Need different scope fields? Supply your own model — filters are validated against it, unknown fields raise:
203
+
204
+ ```python
205
+ from pydantic import BaseModel
206
+
207
+ class TeamScope(BaseModel):
208
+ team_id: str | None = None
209
+ user_id: str | None = None
210
+
211
+ service = MemoryService(user_config={"model": TeamScope})
212
+ ```
213
+
214
+ ## Development
215
+
216
+ ```bash
217
+ make install # uv sync + pre-commit hooks
218
+ make test # pytest with coverage
219
+ make check # lock check, pre-commit, mypy, deptry
220
+ ```
221
+
222
+ Architecture decisions live in [`docs/adr/`](docs/adr/) — notably tracked workspace memorization (ADR 0006), the segment/file/resource retrieval lines (ADR 0007), and the host-adapter seams (ADR 0008/0009).
223
+
224
+ ## License
225
+
226
+ Apache-2.0
227
+