Welcome to ReMe
Memory Management Framework for Agents
ReMe (formerly MemoryScope): Memory Management Framework for Agents
Remember Me, Refine Me.
ReMe provides AI agents with a unified memory system—enabling the ability to extract, reuse, and share memories across users, tasks, and agents.
Personal Memory + Task Memory = Agent Memory
Personal memory helps "understand user preferences", while task memory helps agents "perform better".
Architecture Design
ReMe integrates two complementary memory capabilities:
Task Memory/Experience
Procedural knowledge reused across agents
- Success Pattern Recognition: Identify effective strategies and understand their underlying principles
- Failure Analysis Learning: Learn from mistakes and avoid repeating the same issues
- Comparative Patterns: Different sampling trajectories provide more valuable memories through comparison
- Validation Patterns: Confirm the effectiveness of extracted memories through validation modules
Learn more about how to use task memory from task memory
Personal Memory
Contextualized memory for specific users
- Individual Preferences: User habits, preferences, and interaction styles
- Contextual Adaptation: Intelligent memory management based on time and context
- Progressive Learning: Gradually build deep understanding through long-term interaction
- Time Awareness: Time sensitivity in both retrieval and integration
Learn more about how to use personal memory from personal memory
Installation
Install from PyPI (Recommended)
pip install reme-ai
Install from Source
git clone https://github.com/modelscope/ReMe.git
cd ReMe
pip install .
Environment Configuration
Copy example.env
to .env and modify the corresponding parameters:
FLOW_APP_NAME=ReMe
FLOW_LLM_API_KEY=sk-xxxx
FLOW_LLM_BASE_URL=https://xxxx/v1
FLOW_EMBEDDING_API_KEY=sk-xxxx
FLOW_EMBEDDING_BASE_URL=https://xxxx/v1
Quick Start
HTTP Service Startup
reme \
backend=http \
http.port=8002 \
llm.default.model_name=qwen3-30b-a3b-thinking-2507 \
embedding_model.default.model_name=text-embedding-v4 \
vector_store.default.backend=local
MCP Server Support
reme \
backend=mcp \
mcp.transport=stdio \
llm.default.model_name=qwen3-30b-a3b-thinking-2507 \
embedding_model.default.model_name=text-embedding-v4 \
vector_store.default.backend=local
Core API Usage
Task Memory Management
import requests
# Experience Summarizer: Learn from execution trajectories
response = requests.post("http://localhost:8002/summary_task_memory", json={
"workspace_id": "task_workspace",
"trajectories": [
{"messages": [{"role": "user", "content": "Help me create a project plan"}], "score": 1.0}
]
})
# Retriever: Get relevant memories
response = requests.post("http://localhost:8002/retrieve_task_memory", json={
"workspace_id": "task_workspace",
"query": "How to efficiently manage project progress?",
"top_k": 1
})
curl version
# Experience Summarizer: Learn from execution trajectories
curl -X POST http://localhost:8002/summary_task_memory \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "task_workspace",
"trajectories": [
{"messages": [{"role": "user", "content": "Help me create a project plan"}], "score": 1.0}
]
}'
# Retriever: Get relevant memories
curl -X POST http://localhost:8002/retrieve_task_memory \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "task_workspace",
"query": "How to efficiently manage project progress?",
"top_k": 1
}'
Node.js version
// Experience Summarizer: Learn from execution trajectories
fetch("http://localhost:8002/summary_task_memory", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
workspace_id: "task_workspace",
trajectories: [
{messages: [{role: "user", content: "Help me create a project plan"}], score: 1.0}
]
})
})
.then(response => response.json())
.then(data => console.log(data));
// Retriever: Get relevant memories
fetch("http://localhost:8002/retrieve_task_memory", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
workspace_id: "task_workspace",
query: "How to efficiently manage project progress?",
top_k: 1
})
})
.then(response => response.json())
.then(data => console.log(data));
Personal Memory Management
# Memory Integration: Learn from user interactions
response = requests.post("http://localhost:8002/summary_personal_memory", json={
"workspace_id": "task_workspace",
"trajectories": [
{"messages":
[
{"role": "user", "content": "I like to drink coffee while working in the morning"},
{"role": "assistant",
"content": "I understand, you prefer to start your workday with coffee to stay energized"}
]
}
]
})
# Memory Retrieval: Get personal memory fragments
response = requests.post("http://localhost:8002/retrieve_personal_memory", json={
"workspace_id": "task_workspace",
"query": "What are the user's work habits?",
"top_k": 5
})
curl version
# Memory Integration: Learn from user interactions
curl -X POST http://localhost:8002/summary_personal_memory \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "task_workspace",
"trajectories": [
{"messages": [
{"role": "user", "content": "I like to drink coffee while working in the morning"},
{"role": "assistant", "content": "I understand, you prefer to start your workday with coffee to stay energized"}
]}
]
}'
# Memory Retrieval: Get personal memory fragments
curl -X POST http://localhost:8002/retrieve_personal_memory \
-H "Content-Type: application/json" \
-d '{
"workspace_id": "task_workspace",
"query": "What are the user's work habits?",
"top_k": 5
}'
Node.js version
// Memory Integration: Learn from user interactions
fetch("http://localhost:8002/summary_personal_memory", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
workspace_id: "task_workspace",
trajectories: [
{messages: [
{role: "user", content: "I like to drink coffee while working in the morning"},
{role: "assistant", content: "I understand, you prefer to start your workday with coffee to stay energized"}
]}
]
})
})
.then(response => response.json())
.then(data => console.log(data));
// Memory Retrieval: Get personal memory fragments
fetch("http://localhost:8002/retrieve_personal_memory", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
workspace_id: "task_workspace",
query: "What are the user's work habits?",
top_k: 5
})
})
.then(response => response.json())
.then(data => console.log(data));
Resources
- Personal memory & Task memory : Operators used in personal memory and task memory, You can modify the config to customize the pipelines.
- Example Collection: Real use cases and best practices
- Library: Directly use existing task memory/experience for your tasks, and you can also contribute more task memory/experience to us.
- Contribution: welcome to your contributions!
- Vector Storage Setup: Configure local/vector databases and usage
- MCP Guide: Create MCP services
Citation
@software{ReMe2025,
title = {ReMe: Memory Management Framework for Agents},
author = {Li Yu, Jiaji Deng, Zouying Cao},
url = {https://github.com/modelscope/ReMe},
year = {2025}
}