reme-ai 0.1.3__tar.gz → 0.1.5__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.
- {reme_ai-0.1.3/reme_ai.egg-info → reme_ai-0.1.5}/PKG-INFO +298 -133
- reme_ai-0.1.5/README.md +434 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/pyproject.toml +10 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/__init__.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/app.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/config/default.yaml +56 -5
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/constants/common_constants.py +0 -2
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/constants/language_constants.py +1 -1
- reme_ai-0.1.5/reme_ai/enumeration/language_enum.py +14 -0
- reme_ai-0.1.5/reme_ai/react/simple_react_op.py +24 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/extract_time_op.py +2 -3
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/fuse_rerank_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/print_memory_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/read_message_op.py +1 -1
- reme_ai-0.1.5/reme_ai/retrieve/personal/retrieve_memory_op.py +43 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/semantic_rank_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/set_query_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/build_query_op.py +2 -2
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/merge_memory_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/rerank_memory_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/rewrite_memory_op.py +6 -6
- reme_ai-0.1.5/reme_ai/service/base_memory_service.py +112 -0
- reme_ai-0.1.5/reme_ai/service/personal_memory_service.py +128 -0
- reme_ai-0.1.5/reme_ai/service/task_memory_service.py +126 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/contra_repeat_op.py +2 -2
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/get_observation_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/get_observation_with_time_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/get_reflection_subject_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/info_filter_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/load_today_memory_op.py +6 -7
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/long_contra_repeat_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/update_insight_op.py +4 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/__init__.py +0 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/comparative_extraction_op.py +9 -7
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/failure_extraction_op.py +7 -5
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/memory_deduplication_op.py +6 -6
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/memory_validation_op.py +8 -6
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/simple_comparative_summary_op.py +6 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/simple_summary_op.py +6 -4
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/success_extraction_op.py +7 -5
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/trajectory_preprocess_op.py +3 -32
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/trajectory_segmentation_op.py +6 -4
- reme_ai-0.1.5/reme_ai/utils/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/utils/datetime_handler.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/vector_store/delete_memory_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/vector_store/recall_vector_store_op.py +3 -3
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/vector_store/update_memory_freq_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/vector_store/update_memory_utility_op.py +1 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/vector_store/update_vector_store_op.py +3 -3
- reme_ai-0.1.5/reme_ai/vector_store/vector_store_action_op.py +58 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5/reme_ai.egg-info}/PKG-INFO +298 -133
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai.egg-info/SOURCES.txt +5 -3
- reme_ai-0.1.5/reme_ai.egg-info/requires.txt +1 -0
- reme_ai-0.1.3/README.md +0 -270
- reme_ai-0.1.3/reme_ai/enumeration/language_constants.py +0 -215
- reme_ai-0.1.3/reme_ai/react/simple_react_op.py +0 -21
- reme_ai-0.1.3/reme_ai/retrieve/personal/retrieve_memory_op.py +0 -13
- reme_ai-0.1.3/reme_ai/summary/task/pdf_preprocess_op_wrapper.py +0 -50
- reme_ai-0.1.3/reme_ai/utils/miner_u_pdf_processor.py +0 -726
- reme_ai-0.1.3/reme_ai/vector_store/vector_store_action_op.py +0 -55
- reme_ai-0.1.3/reme_ai.egg-info/requires.txt +0 -1
- {reme_ai-0.1.3 → reme_ai-0.1.5}/LICENSE +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/config/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/config/config_parser.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/constants/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/enumeration/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/react/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/extract_time_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/personal/print_memory_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/build_query_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/rerank_memory_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/retrieve/task/rewrite_memory_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/schema/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/schema/memory.py +0 -0
- {reme_ai-0.1.3/reme_ai/utils → reme_ai-0.1.5/reme_ai/service}/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/contra_repeat_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/get_observation_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/get_observation_with_time_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/get_reflection_subject_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/info_filter_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/long_contra_repeat_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/personal/update_insight_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/comparative_extraction_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/failure_extraction_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/memory_validation_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/simple_comparative_summary_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/simple_summary_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/success_extraction_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/summary/task/trajectory_segmentation_prompt.yaml +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/utils/op_utils.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai/vector_store/__init__.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai.egg-info/dependency_links.txt +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai.egg-info/entry_points.txt +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/reme_ai.egg-info/top_level.txt +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/setup.cfg +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/test/test1.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/test/test2.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/test/test3.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/test/test4.py +0 -0
- {reme_ai-0.1.3 → reme_ai-0.1.5}/test/test_update_insight_op.py +0 -0
@@ -1,8 +1,8 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: reme_ai
|
3
|
-
Version: 0.1.
|
3
|
+
Version: 0.1.5
|
4
4
|
Summary: Remember me
|
5
|
-
Author-email:
|
5
|
+
Author-email: "jinli.yl" <jinli.yl@alibaba-inc.com>, "dengjiaji.djj" <dengjiaji.djj@alibaba-inc.com>, "caozouying.czy" <caozouying.czy@alibaba-inc.com>
|
6
6
|
License: Apache License
|
7
7
|
Version 2.0, January 2004
|
8
8
|
http://www.apache.org/licenses/
|
@@ -205,132 +205,142 @@ License: Apache License
|
|
205
205
|
See the License for the specific language governing permissions and
|
206
206
|
limitations under the License.
|
207
207
|
|
208
|
+
Keywords: llm,memory,experience,memoryscope,ai,mcp,http
|
208
209
|
Classifier: Programming Language :: Python :: 3
|
209
210
|
Classifier: License :: OSI Approved :: Apache Software License
|
210
211
|
Classifier: Operating System :: OS Independent
|
211
|
-
Requires-Python: >=3.
|
212
|
+
Requires-Python: >=3.11
|
212
213
|
Description-Content-Type: text/markdown
|
213
214
|
License-File: LICENSE
|
214
|
-
Requires-Dist: flowllm>=0.1.
|
215
|
+
Requires-Dist: flowllm>=0.1.5
|
215
216
|
Dynamic: license-file
|
216
217
|
|
217
|
-
|
218
|
+
English | [**中文**](./README_ZH.md)
|
218
219
|
|
219
220
|
<p align="center">
|
220
|
-
<img src="
|
221
|
+
<img src="docs/figure/reme_logo.png" alt="ReMe Logo" width="50%">
|
221
222
|
</p>
|
222
223
|
|
223
224
|
<p align="center">
|
224
225
|
<a href="https://pypi.org/project/reme-ai/"><img src="https://img.shields.io/badge/python-3.12+-blue" alt="Python Version"></a>
|
225
|
-
<a href="https://pypi.org/project/reme-ai/"><img src="https://img.shields.io/badge/pypi-
|
226
|
+
<a href="https://pypi.org/project/reme-ai/"><img src="https://img.shields.io/badge/pypi-v0.1-blue?logo=pypi" alt="PyPI Version"></a>
|
226
227
|
<a href="./LICENSE"><img src="https://img.shields.io/badge/license-Apache--2.0-black" alt="License"></a>
|
227
|
-
<a href="https://github.com/modelscope/ReMe
|
228
|
+
<a href="https://github.com/modelscope/ReMe"><img src="https://img.shields.io/github/stars/modelscope/ReMe?style=social" alt="GitHub Stars"></a>
|
228
229
|
</p>
|
229
230
|
|
230
231
|
<p align="center">
|
231
|
-
<strong
|
232
|
-
<em>
|
232
|
+
<strong>ReMe (formerly MemoryScope): Memory Management Framework for Agents</strong><br>
|
233
|
+
<em>Remember Me, Refine Me.</em>
|
233
234
|
</p>
|
234
235
|
|
235
236
|
---
|
236
|
-
|
237
|
-
|
238
|
-
|
239
|
-
Remember Me, Reshape Me
|
240
|
-
|
241
|
-
Remember Me, Refine Me
|
242
|
-
|
243
|
-
Remember Me, Reinvent Me
|
244
|
-
|
245
|
-
今天的每个AI智能体都在从零开始。每当智能体处理任务时,它都在重新发明无数其他智能体已经发现的解决方案。这就像要求每个人都从头发现火、农业和数学一样。
|
246
|
-
|
247
|
-
ReMe.ai希望改变这一点。我们为AI智能体提供了统一的记忆与经验系统——在跨用户、跨任务、跨智能体下抽取、复用和分享记忆的能力。
|
237
|
+
ReMe provides AI agents with a unified memory system—enabling the ability to extract, reuse, and share memories across
|
238
|
+
users, tasks, and agents.
|
248
239
|
|
249
240
|
```
|
250
|
-
|
241
|
+
Personal Memory + Task Memory = Agent Memory
|
251
242
|
```
|
252
243
|
|
253
|
-
|
244
|
+
Personal memory helps "**understand user preferences**", while task memory helps agents "**perform better**".
|
254
245
|
|
255
246
|
---
|
256
247
|
|
257
|
-
## 📰
|
258
|
-
|
259
|
-
- **[2025-
|
260
|
-
|
261
|
-
|
248
|
+
## 📰 Latest Updates
|
249
|
+
|
250
|
+
- **[2025-09]** 🎉 ReMe v0.1
|
251
|
+
officially released, integrating task memory and personal memory. If you want to use the original memoryscope project,
|
252
|
+
you can find it in [MemoryScope](https://github.com/modelscope/Reme/tree/memoryscope_branch).
|
253
|
+
- **[2025-09]** 🧪 We validated the effectiveness of task memory extraction and reuse in agents in appworld, bfcl(v3),
|
254
|
+
and frozenlake environments. For more information,
|
255
|
+
check [appworld exp](./cookbook/appworld/quickstart.md), [bfcl exp](./cookbook/bfcl/quickstart.md),
|
256
|
+
and [frozenlake exp](./cookbook/frozenlake/quickstart.md).
|
257
|
+
- **[2025-08]** 🚀 MCP protocol support is now available -> [MCP Quick Start](docs/mcp_quick_start.md).
|
258
|
+
- **[2025-06]** 🚀 Multiple backend vector storage support (Elasticsearch &
|
259
|
+
ChromaDB) -> [Vector DB quick start](docs/vector_store_api_guide.md).
|
260
|
+
- **[2024-09]** 🧠 [MemoryScope](https://github.com/modelscope/Reme/tree/memoryscope_branch) v0.1 released,
|
261
|
+
personalized and time-aware memory storage and usage.
|
262
262
|
|
263
263
|
---
|
264
264
|
|
265
|
-
## ✨
|
265
|
+
## ✨ Architecture Design
|
266
|
+
|
267
|
+
<p align="center">
|
268
|
+
<img src="docs/figure/reme_structure.jpg" alt="ReMe Logo" width="100%">
|
269
|
+
</p>
|
266
270
|
|
267
|
-
|
271
|
+
ReMe integrates two complementary memory capabilities:
|
268
272
|
|
269
|
-
|
273
|
+
#### 🧠 **Task Memory/Experience**
|
270
274
|
|
271
|
-
|
272
|
-
跨智能体复用的程序性知识
|
273
|
-
- **成功模式识别**:识别有效策略并理解其根本原理
|
274
|
-
- **失败分析学习**:从错误中学习,避免重复同样的问题
|
275
|
-
- **规划策略**:不同问题类型的规划策略
|
276
|
-
- **工具使用模式**:经过验证的有效工具使用方法
|
277
|
-
- **标准操作流程**:经过验证的方法论和流程
|
275
|
+
Procedural knowledge reused across agents
|
278
276
|
|
279
|
-
|
277
|
+
- **Success Pattern Recognition**: Identify effective strategies and understand their underlying principles
|
278
|
+
- **Failure Analysis Learning**: Learn from mistakes and avoid repeating the same issues
|
279
|
+
- **Comparative Patterns**: Different sampling trajectories provide more valuable memories through comparison
|
280
|
+
- **Validation Patterns**: Confirm the effectiveness of extracted memories through validation modules
|
280
281
|
|
281
|
-
|
282
|
-
特定用户的情境化记忆
|
283
|
-
- **个体偏好**:用户的习惯、偏好和交互风格
|
284
|
-
- **情境适应**:基于时间和上下文的智能记忆管理
|
285
|
-
- **渐进学习**:通过长期交互逐步建立深度理解
|
286
|
-
- **时间感知**:检索和整合时都具备时间敏感性
|
282
|
+
Learn more about how to use task memory from [task memory](docs/task_memory/task_memory.md)
|
287
283
|
|
288
|
-
|
284
|
+
#### 👤 **Personal Memory**
|
289
285
|
|
286
|
+
Contextualized memory for specific users
|
287
|
+
|
288
|
+
- **Individual Preferences**: User habits, preferences, and interaction styles
|
289
|
+
- **Contextual Adaptation**: Intelligent memory management based on time and context
|
290
|
+
- **Progressive Learning**: Gradually build deep understanding through long-term interaction
|
291
|
+
- **Time Awareness**: Time sensitivity in both retrieval and integration
|
292
|
+
|
293
|
+
Learn more about how to use personal memory from [personal memory](docs/personal_memory/personal_memory.md)
|
290
294
|
|
291
295
|
---
|
292
296
|
|
293
|
-
## 🛠️
|
297
|
+
## 🛠️ Installation
|
298
|
+
|
299
|
+
### Install from PyPI (Recommended)
|
294
300
|
|
295
|
-
### 从PyPI安装(推荐)
|
296
301
|
```bash
|
297
302
|
pip install reme-ai
|
298
303
|
```
|
299
304
|
|
300
|
-
###
|
305
|
+
### Install from Source
|
306
|
+
|
301
307
|
```bash
|
302
|
-
git clone https://github.com/modelscope/ReMe.
|
303
|
-
cd ReMe
|
308
|
+
git clone https://github.com/modelscope/ReMe.git
|
309
|
+
cd ReMe
|
304
310
|
pip install .
|
305
311
|
```
|
306
312
|
|
307
|
-
###
|
308
|
-
|
313
|
+
### Environment Configuration
|
314
|
+
|
315
|
+
Copy `example.env` to .env and modify the corresponding parameters:
|
316
|
+
|
309
317
|
```bash
|
310
|
-
#
|
311
|
-
|
312
|
-
|
318
|
+
# Required: LLM API Configuration
|
319
|
+
FLOW_LLM_API_KEY=sk-xxxx
|
320
|
+
FLOW_LLM_BASE_URL=https://xxxx/v1
|
313
321
|
|
314
|
-
#
|
315
|
-
|
316
|
-
|
322
|
+
# Required: Embedding Model Configuration
|
323
|
+
FLOW_EMBEDDING_API_KEY=sk-xxxx
|
324
|
+
FLOW_EMBEDDING_BASE_URL=https://xxxx/v1
|
317
325
|
```
|
318
326
|
|
319
327
|
---
|
320
328
|
|
321
|
-
## 🚀
|
329
|
+
## 🚀 Quick Start
|
330
|
+
|
331
|
+
### HTTP Service Startup
|
322
332
|
|
323
|
-
### HTTP服务启动
|
324
333
|
```bash
|
325
334
|
reme \
|
326
|
-
backend=http \
|
327
|
-
http.port=
|
335
|
+
backend=http \
|
336
|
+
http.port=8002 \
|
328
337
|
llm.default.model_name=qwen3-30b-a3b-thinking-2507 \
|
329
338
|
embedding_model.default.model_name=text-embedding-v4 \
|
330
339
|
vector_store.default.backend=local
|
331
340
|
```
|
332
341
|
|
333
|
-
### MCP
|
342
|
+
### MCP Server Support
|
343
|
+
|
334
344
|
```bash
|
335
345
|
reme \
|
336
346
|
backend=mcp \
|
@@ -340,147 +350,302 @@ reme \
|
|
340
350
|
vector_store.default.backend=local
|
341
351
|
```
|
342
352
|
|
343
|
-
###
|
353
|
+
### Core API Usage
|
354
|
+
|
355
|
+
#### Task Memory Management
|
344
356
|
|
345
|
-
#### 任务经验管理
|
346
357
|
```python
|
347
358
|
import requests
|
348
359
|
|
349
|
-
#
|
360
|
+
# Experience Summarizer: Learn from execution trajectories
|
350
361
|
response = requests.post("http://localhost:8002/summary_task_memory", json={
|
351
362
|
"workspace_id": "task_workspace",
|
352
363
|
"trajectories": [
|
353
|
-
{"messages": [{"role": "user", "content": "
|
364
|
+
{"messages": [{"role": "user", "content": "Help me create a project plan"}], "score": 1.0}
|
354
365
|
]
|
355
366
|
})
|
356
367
|
|
357
|
-
#
|
368
|
+
# Retriever: Get relevant memories
|
358
369
|
response = requests.post("http://localhost:8002/retrieve_task_memory", json={
|
359
370
|
"workspace_id": "task_workspace",
|
360
|
-
"query": "
|
371
|
+
"query": "How to efficiently manage project progress?",
|
361
372
|
"top_k": 1
|
362
373
|
})
|
363
374
|
```
|
364
375
|
|
365
|
-
|
376
|
+
<details>
|
377
|
+
<summary>curl version</summary>
|
378
|
+
|
379
|
+
```bash
|
380
|
+
# Experience Summarizer: Learn from execution trajectories
|
381
|
+
curl -X POST http://localhost:8002/summary_task_memory \
|
382
|
+
-H "Content-Type: application/json" \
|
383
|
+
-d '{
|
384
|
+
"workspace_id": "task_workspace",
|
385
|
+
"trajectories": [
|
386
|
+
{"messages": [{"role": "user", "content": "Help me create a project plan"}], "score": 1.0}
|
387
|
+
]
|
388
|
+
}'
|
389
|
+
|
390
|
+
# Retriever: Get relevant memories
|
391
|
+
curl -X POST http://localhost:8002/retrieve_task_memory \
|
392
|
+
-H "Content-Type: application/json" \
|
393
|
+
-d '{
|
394
|
+
"workspace_id": "task_workspace",
|
395
|
+
"query": "How to efficiently manage project progress?",
|
396
|
+
"top_k": 1
|
397
|
+
}'
|
398
|
+
```
|
399
|
+
|
400
|
+
</details>
|
401
|
+
|
402
|
+
<details>
|
403
|
+
<summary>Node.js version</summary>
|
404
|
+
|
405
|
+
```javascript
|
406
|
+
// Experience Summarizer: Learn from execution trajectories
|
407
|
+
fetch("http://localhost:8002/summary_task_memory", {
|
408
|
+
method: "POST",
|
409
|
+
headers: {
|
410
|
+
"Content-Type": "application/json",
|
411
|
+
},
|
412
|
+
body: JSON.stringify({
|
413
|
+
workspace_id: "task_workspace",
|
414
|
+
trajectories: [
|
415
|
+
{messages: [{role: "user", content: "Help me create a project plan"}], score: 1.0}
|
416
|
+
]
|
417
|
+
})
|
418
|
+
})
|
419
|
+
.then(response => response.json())
|
420
|
+
.then(data => console.log(data));
|
421
|
+
|
422
|
+
// Retriever: Get relevant memories
|
423
|
+
fetch("http://localhost:8002/retrieve_task_memory", {
|
424
|
+
method: "POST",
|
425
|
+
headers: {
|
426
|
+
"Content-Type": "application/json",
|
427
|
+
},
|
428
|
+
body: JSON.stringify({
|
429
|
+
workspace_id: "task_workspace",
|
430
|
+
query: "How to efficiently manage project progress?",
|
431
|
+
top_k: 1
|
432
|
+
})
|
433
|
+
})
|
434
|
+
.then(response => response.json())
|
435
|
+
.then(data => console.log(data));
|
436
|
+
```
|
437
|
+
|
438
|
+
</details>
|
439
|
+
|
440
|
+
#### Personal Memory Management
|
441
|
+
|
366
442
|
```python
|
367
|
-
#
|
443
|
+
# Memory Integration: Learn from user interactions
|
368
444
|
response = requests.post("http://localhost:8002/summary_personal_memory", json={
|
369
445
|
"workspace_id": "task_workspace",
|
370
446
|
"trajectories": [
|
371
447
|
{"messages":
|
372
448
|
[
|
373
|
-
{"role": "user", "content": "
|
374
|
-
{"role": "assistant",
|
449
|
+
{"role": "user", "content": "I like to drink coffee while working in the morning"},
|
450
|
+
{"role": "assistant",
|
451
|
+
"content": "I understand, you prefer to start your workday with coffee to stay energized"}
|
375
452
|
]
|
376
453
|
}
|
377
454
|
]
|
378
455
|
})
|
379
456
|
|
380
|
-
#
|
457
|
+
# Memory Retrieval: Get personal memory fragments
|
381
458
|
response = requests.post("http://localhost:8002/retrieve_personal_memory", json={
|
382
459
|
"workspace_id": "task_workspace",
|
383
|
-
"query": "
|
460
|
+
"query": "What are the user's work habits?",
|
384
461
|
"top_k": 5
|
385
462
|
})
|
386
463
|
```
|
387
464
|
|
388
|
-
|
389
|
-
|
390
|
-
## 🧪 实验结果
|
465
|
+
<details>
|
466
|
+
<summary>curl version</summary>
|
391
467
|
|
392
|
-
|
393
|
-
|
394
|
-
|
395
|
-
|
396
|
-
|
397
|
-
|
398
|
-
|
468
|
+
```bash
|
469
|
+
# Memory Integration: Learn from user interactions
|
470
|
+
curl -X POST http://localhost:8002/summary_personal_memory \
|
471
|
+
-H "Content-Type: application/json" \
|
472
|
+
-d '{
|
473
|
+
"workspace_id": "task_workspace",
|
474
|
+
"trajectories": [
|
475
|
+
{"messages": [
|
476
|
+
{"role": "user", "content": "I like to drink coffee while working in the morning"},
|
477
|
+
{"role": "assistant", "content": "I understand, you prefer to start your workday with coffee to stay energized"}
|
478
|
+
]}
|
479
|
+
]
|
480
|
+
}'
|
399
481
|
|
400
|
-
|
482
|
+
# Memory Retrieval: Get personal memory fragments
|
483
|
+
curl -X POST http://localhost:8002/retrieve_personal_memory \
|
484
|
+
-H "Content-Type: application/json" \
|
485
|
+
-d '{
|
486
|
+
"workspace_id": "task_workspace",
|
487
|
+
"query": "What are the user's work habits?",
|
488
|
+
"top_k": 5
|
489
|
+
}'
|
490
|
+
```
|
401
491
|
|
402
|
-
|
403
|
-
|
492
|
+
</details>
|
493
|
+
|
494
|
+
<details>
|
495
|
+
<summary>Node.js version</summary>
|
496
|
+
|
497
|
+
```javascript
|
498
|
+
// Memory Integration: Learn from user interactions
|
499
|
+
fetch("http://localhost:8002/summary_personal_memory", {
|
500
|
+
method: "POST",
|
501
|
+
headers: {
|
502
|
+
"Content-Type": "application/json",
|
503
|
+
},
|
504
|
+
body: JSON.stringify({
|
505
|
+
workspace_id: "task_workspace",
|
506
|
+
trajectories: [
|
507
|
+
{messages: [
|
508
|
+
{role: "user", content: "I like to drink coffee while working in the morning"},
|
509
|
+
{role: "assistant", content: "I understand, you prefer to start your workday with coffee to stay energized"}
|
510
|
+
]}
|
511
|
+
]
|
512
|
+
})
|
513
|
+
})
|
514
|
+
.then(response => response.json())
|
515
|
+
.then(data => console.log(data));
|
516
|
+
|
517
|
+
// Memory Retrieval: Get personal memory fragments
|
518
|
+
fetch("http://localhost:8002/retrieve_personal_memory", {
|
519
|
+
method: "POST",
|
520
|
+
headers: {
|
521
|
+
"Content-Type": "application/json",
|
522
|
+
},
|
523
|
+
body: JSON.stringify({
|
524
|
+
workspace_id: "task_workspace",
|
525
|
+
query: "What are the user's work habits?",
|
526
|
+
top_k: 5
|
527
|
+
})
|
528
|
+
})
|
529
|
+
.then(response => response.json())
|
530
|
+
.then(data => console.log(data));
|
531
|
+
```
|
404
532
|
|
405
|
-
|
406
|
-
|---------------------------|-----------------|
|
407
|
-
| 无记忆(基线) | 0.66 |
|
408
|
-
| **使用任务经验** | 0.72 **(+9.1%)** |
|
533
|
+
</details>
|
409
534
|
|
410
|
-
|
411
|
-
|:----------------------------------------------------------:|:---------------------------------------:|
|
412
|
-
| <p align="center"><img src="doc/figure/frozenlake_failure.gif" alt="失败案例" width="30%"></p> | <p align="center"><img src="doc/figure/frozenlake_success.gif" alt="成功案例" width="30%"></p>
|
535
|
+
---
|
413
536
|
|
414
|
-
|
537
|
+
## 📦 Ready-to-Use Libraries
|
415
538
|
|
416
|
-
|
539
|
+
ReMe provides pre-built memory libraries that agents can immediately use with verified best practices:
|
417
540
|
|
418
|
-
|
541
|
+
### Available Libraries
|
419
542
|
|
420
|
-
|
543
|
+
- **`appworld.jsonl`**: Memory library for Appworld agent interactions, covering complex task planning and execution
|
544
|
+
patterns
|
545
|
+
- **`bfcl_v3.jsonl`**: Working memory library for BFCL tool calls
|
421
546
|
|
422
|
-
###
|
423
|
-
- **`appworld_v1.jsonl`**:Appworld智能体交互的记忆库,涵盖复杂任务规划和执行模式
|
424
|
-
- **`bfcl_v1.jsonl`**:BFCL工具调用的工作记忆库
|
547
|
+
### Quick Usage
|
425
548
|
|
426
|
-
### 快速使用
|
427
549
|
```python
|
428
|
-
#
|
550
|
+
# Load pre-built memories
|
429
551
|
response = requests.post("http://localhost:8002/vector_store", json={
|
430
|
-
"workspace_id": "
|
552
|
+
"workspace_id": "appworld",
|
431
553
|
"action": "load",
|
432
|
-
"path": "./library/"
|
554
|
+
"path": "./docs/library/"
|
433
555
|
})
|
434
556
|
|
435
|
-
#
|
557
|
+
# Query relevant memories
|
436
558
|
response = requests.post("http://localhost:8002/retrieve_task_memory", json={
|
437
|
-
"workspace_id": "
|
438
|
-
"query": "
|
559
|
+
"workspace_id": "appworld",
|
560
|
+
"query": "How to navigate to settings and update user profile?",
|
439
561
|
"top_k": 1
|
440
562
|
})
|
441
563
|
```
|
442
564
|
|
443
|
-
##
|
565
|
+
## 🧪 Experiments
|
444
566
|
|
445
|
-
|
446
|
-
|
447
|
-
-
|
448
|
-
|
449
|
-
|
567
|
+
### 🌍 [Appworld Experiment](./cookbook/appworld/quickstart.md)
|
568
|
+
|
569
|
+
We tested ReMe on Appworld using qwen3-8b:
|
570
|
+
|
571
|
+
| Method | pass@1 | pass@2 | pass@4 |
|
572
|
+
|--------------|-------------------|-------------------|-------------------|
|
573
|
+
| without ReMe | 0.083 | 0.140 | 0.228 |
|
574
|
+
| with ReMe | 0.109 **(+2.6%)** | 0.175 **(+3.5%)** | 0.281 **(+5.3%)** |
|
575
|
+
|
576
|
+
Pass@K measures the probability that at least one of the K generated samples successfully completes the task (
|
577
|
+
score=1).
|
578
|
+
The current experiment uses an internal AppWorld environment, which may have slight differences.
|
579
|
+
|
580
|
+
You can find more details on reproducing the experiment in [quickstart.md](cookbook/appworld/quickstart.md).
|
581
|
+
|
582
|
+
### 🧊 [Frozenlake Experiment](./cookbook/frozenlake/quickstart.md)
|
583
|
+
|
584
|
+
| without ReMe | with ReMe |
|
585
|
+
|:--------------------------------------------------------------------------------------------:|:--------------------------------------------------------------------------------------------:|
|
586
|
+
| <p align="center"><img src="docs/figure/frozenlake_failure.gif" alt="GIF 1" width="30%"></p> | <p align="center"><img src="docs/figure/frozenlake_success.gif" alt="GIF 2" width="30%"></p> |
|
587
|
+
|
588
|
+
We tested on 100 random frozenlake maps using qwen3-8b:
|
589
|
+
|
590
|
+
| Method | pass rate |
|
591
|
+
|--------------|------------------|
|
592
|
+
| without ReMe | 0.66 |
|
593
|
+
| with ReMe | 0.72 **(+6.0%)** |
|
594
|
+
|
595
|
+
You can find more details on reproducing the experiment in [quickstart.md](cookbook/frozenlake/quickstart.md).
|
596
|
+
|
597
|
+
### 🔧 [BFCL-V3 Experiment](./cookbook/bfcl/quickstart.md)
|
598
|
+
|
599
|
+
We tested ReMe on BFCL-V3 multi-turn-base (randomly split 50train/150val) using qwen3-8b:
|
600
|
+
|
601
|
+
| Method | pass@1 | pass@2 | pass@4 |
|
602
|
+
|--------------|---------------------|---------------------|---------------------|
|
603
|
+
| without ReMe | 0.2472 | 0.2733 | 0.2922 |
|
604
|
+
| with ReMe | 0.3061 **(+5.89%)** | 0.3500 **(+7.67%)** | 0.3888 **(+9.66%)** |
|
605
|
+
|
606
|
+
## 📚 Resources
|
607
|
+
|
608
|
+
- **[Quick Start](./cookbook/simple_demo)**: Get started quickly with practical examples
|
609
|
+
- **[Vector Storage Setup](docs/vector_store_api_guide.md)**: Configure local/vector databases and usage
|
610
|
+
- **[MCP Guide](docs/mcp_quick_start.md)**: Create MCP services
|
611
|
+
- **[personal memory](docs/personal_memory)** & **[task memory](docs/task_memory)** : Operators used in personal memory and task memory, You can modify the config to customize the pipelines.
|
612
|
+
- **[Example Collection](./cookbook)**: Real use cases and best practices
|
450
613
|
|
451
614
|
---
|
452
615
|
|
453
|
-
## 🤝
|
616
|
+
## 🤝 Contribution
|
617
|
+
|
618
|
+
We believe the best memory systems come from collective wisdom. Contributions welcome 👉[Guide](docs/contribution.md):
|
619
|
+
|
620
|
+
### Code Contributions
|
621
|
+
|
622
|
+
- New operation and tool development
|
623
|
+
- Backend implementation and optimization
|
624
|
+
- API enhancements and new endpoints
|
454
625
|
|
455
|
-
|
626
|
+
### Documentation Improvements
|
456
627
|
|
457
|
-
|
458
|
-
-
|
459
|
-
- 后端实现和优化
|
460
|
-
- API增强和新端点
|
628
|
+
- Usage examples and tutorials
|
629
|
+
- Best practice guides
|
461
630
|
|
462
|
-
### 文档改进
|
463
|
-
- 使用示例和教程
|
464
|
-
- 最佳实践指南
|
465
|
-
- 翻译和本地化
|
466
631
|
|
467
632
|
---
|
468
633
|
|
469
|
-
## 📄
|
634
|
+
## 📄 Citation
|
470
635
|
|
471
636
|
```bibtex
|
472
637
|
@software{ReMe2025,
|
473
|
-
title = {ReMe
|
474
|
-
author = {
|
475
|
-
url = {https://github.com/modelscope/ReMe
|
638
|
+
title = {ReMe: Memory Management Framework for Agents},
|
639
|
+
author = {Li Yu, Jiaji Deng, Zouying Cao},
|
640
|
+
url = {https://github.com/modelscope/ReMe},
|
476
641
|
year = {2025}
|
477
642
|
}
|
478
643
|
```
|
479
644
|
|
480
645
|
---
|
481
646
|
|
482
|
-
## ⚖️
|
647
|
+
## ⚖️ License
|
483
648
|
|
484
|
-
|
649
|
+
This project is licensed under the Apache License 2.0 - see the [LICENSE](./LICENSE) file for details.
|
485
650
|
|
486
651
|
---
|