Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
613c756
feat(core): add Trajectory schema and base memory agent
jinliyl Dec 11, 2025
cd7bd8a
feat(core): add Trajectory schema and base memory agent
jinliyl Dec 16, 2025
07fb548
refactor(agent): rename should_continue to should_act for clarity
jinliyl Dec 17, 2025
0173748
feat(memory): rename query field to memory_content in add_memory_op
jinliyl Dec 17, 2025
5de7179
feat(memory): implement memory tool operations for vector store inter…
jinliyl Dec 17, 2025
003b3fc
refactor(agent): rename base agent class and update memory handling
jinliyl Dec 17, 2025
fb2d7d5
docs(prompts): rename 'Workflow' to 'Task' in agent prompt files
jinliyl Dec 17, 2025
d155017
feat(agent): implement memory-aware agent operations
jinliyl Dec 17, 2025
1935a30
feat(core): restructure agent and tool modules for better organization
jinliyl Dec 17, 2025
924e4e3
feat(identity): implement identity agent for managing self-cognition …
jinliyl Dec 18, 2025
cd6be7d
refactor(memory): restructure memory tool operations
jinliyl Dec 18, 2025
f428bc0
feat(memory): add identity memory read and write operations
jinliyl Dec 18, 2025
cd91f3f
refactor(core): rename write identity memory op to update
jinliyl Dec 18, 2025
49b894e
feat(memory): implement tool memory read and update operations
jinliyl Dec 18, 2025
69e7456
feat(memory): add meta memory operations for file-based storage
jinliyl Dec 18, 2025
26ba930
feat(memory): add summary memory tool for vector store
jinliyl Dec 18, 2025
2cb740d
feat(memory): implement history memory operations
jinliyl Dec 18, 2025
673efcc
feat(memory): rename vector_retrieve_memory to retrieve_memory and en…
jinliyl Dec 18, 2025
914b38b
feat(agent): implement personal and procedural summary agents
jinliyl Dec 18, 2025
b4afed1
feat(memory): enhance memory retrieval and summary agents
jinliyl Dec 19, 2025
cc335e7
refactor(agent): optimize memory agent execution flow
jinliyl Dec 19, 2025
1668758
refactor(memory): standardize import paths and simplify metadata hand…
jinliyl Dec 19, 2025
ce555e0
feat(agent): implement ReMy conversational agent with memory integration
jinliyl Dec 19, 2025
04bb7c1
docs(agent): add memory retrieval tool usage guidelines
jinliyl Dec 19, 2025
d5ae573
docs(core): update summary agent prompt instructions
jinliyl Dec 19, 2025
368b630
refactor(core): restructure agent and tool modules
jinliyl Dec 19, 2025
64a305e
feat(agent): implement identity summary agent v1
jinliyl Dec 19, 2025
c0669f0
docs(reme_v2): refactor design document and update code structure
jinliyl Dec 19, 2025
dde1fe9
docs(reme_v2_design): update documentation structure and interface al…
jinliyl Dec 19, 2025
fc3de7f
feat(core): implement ReMeSummaryAgentV1Op and HandsOffOp for memory …
jinliyl Dec 20, 2025
4f8f22b
docs(test): add documentation for memory operations and agents
jinliyl Dec 21, 2025
7d3c80d
Merge pull request #53 from agentscope-ai/mem_agent
jinliyl Dec 21, 2025
7d6ccaf
refactor(core): streamline memory agent base and implementations
jinliyl Dec 21, 2025
12cf5b5
refactor(core): restructure memory tools and agents
jinliyl Dec 21, 2025
cd0d234
docs: add comprehensive documentation for ReMeV2 design and mem0 comp…
jinliyl Dec 24, 2025
74a06fd
docs(reme_v2_design): update memory configuration example and fix typo
jinliyl Dec 24, 2025
3762db2
docs(reme_v2_design): update ReMeApp class name in example code
jinliyl Dec 24, 2025
73ae4d8
refactor(core): restructure core modules with new enumeration and sch…
jinliyl Dec 25, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Pre-commit

on: [ push, pull_request ]

jobs:
run:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: True
matrix:
os: [ ubuntu-latest ]
env:
OS: ${{ matrix.os }}
PYTHON: '3.10'
steps:
- uses: actions/checkout@master
- name: Setup Python
uses: actions/setup-python@master
with:
python-version: '3.10'
- name: Update setuptools
run: |
pip install -U setuptools wheel
- name: Install
run: |
pip install -q -e .[dev]
- name: Install pre-commit
run: |
pre-commit install
- name: Pre-commit starts
run: |
pre-commit run --all-files > pre-commit.log 2>&1 || true
cat pre-commit.log
if grep -q Failed pre-commit.log; then
echo -e "\e[41m [**FAIL**] Please install pre-commit and format your code first. \e[0m"
exit 1
fi
echo -e "\e[46m ********************************Passed******************************** \e[0m"
117 changes: 117 additions & 0 deletions docs/mem0_learn.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
# ReMeV2的设计文档

## 竞品调研(开源框架+商业化Memory+论文)
### mem0

开源方案 vs 闭源方案
1. from mem0.client.main import AsyncMemoryClient, MemoryClient
2. from mem0.memory.main import AsyncMemory, Memory
https://docs.mem0.ai/platform/platform-vs-oss

问题:之前对比的是闭源方案?

memory分类【短期记忆与长期记忆】:
https://docs.mem0.ai/core-concepts/memory-types
短期记忆使当前的对话保持连贯性。它包括:
- Conversation history – recent turns in order so the agent remembers what was just said.
- Working memory – temporary state such as tool outputs or intermediate calculations.
- Attention context – the immediate focus of the assistant, similar to what a person holds in mind mid-sentence.
长期记忆能够将知识在不同阶段间保存下来。它记录了:
- Factual memory – user preferences, account details, and domain facts.
- Episodic memory – summaries of past interactions or completed tasks.
- Semantic memory – relationships between concepts so agents can reason about them later.
``` ?
class MemoryType(Enum):
SEMANTIC = "semantic_memory" -> personal
EPISODIC = "episodic_memory" -> summary
PROCEDURAL = "procedural_memory" -> procedural
```
完全没有SEMANTIC和EPISODIC的引用,只有PROCEDURAL

提供了哪些接口:
https://docs.mem0.ai/core-concepts/memory-operations/add
1. add 对应 summary workflow
2. search 对应 retrieve workflow
3. update 原子操作
4. delete 原子操作
接口层面:开源版本和闭源版本是对齐的

MCP接口,
1. add_memory Save text or conversation history for a user/agent
2. search_memories Semantic search across existing memories with filters
3. get_memories List memories with structured filters and pagination
4. get_memory Retrieve one memory by its memory_id
5. update_memory Overwrite a memory’s text after confirming the ID
6. delete_memory Delete a single memory by memory_id
7. delete_all_memories Bulk delete all memories in scope
8. delete_entities Delete a user/agent/app/run entity and its memories
9. list_entities Enumerate users/agents/apps/runs stored in Mem0
前4个对齐的是闭源版本的python接口,add增加了text


user_id概念
user_id="alice" <==> memory_target
agent_id/session_id可选
多个user_id # 带讨论,库隔离

### letta(MemGPT) @weikang
TODO



## 我们相比竞品的优势
1. 算法层面:workflow -> agentic & 渐进式方案
2. 模型层面:mem-agent-rl
3. 支持用户友好的接口,只用用户二开

``` 同步方案
from reme_ai import xxx_summarizer, xxx_retriever # v2的agent
from reme_ai import xxx_tool # v2的agent
from reme_ai import xxx_op # v1的op
from reme_ai import OpenAILLM, OpenAIEMBEDDING
from reme_ai import VectorStore

def main():
reme = ReMe(
llm={},
embedding={},
vector_store={},
retriever=Retriever(ops=Opa(top_k=5) >> OpB()]
retriever=Retriever(tools=[ToolA(), ToolB()],
summarizer=Summarizer(ops=Opa(top_k=5) >> OpB()],
summarizer=Summarizer(tools=[ToolA(), ToolB()],
)

# 服务模式
reme.serve()

# 直接调用
result = reme.retrieve(
"food preferences",
filters={"user_id": "alice"}, top_k=10)

result = reme.summary(
user_id="alice",
messages=[{"role": "user", "content": "Help me create a project plan"}])

reme.close()

if __name__ == "__main__":
main()
```
Reme提供接口
1. 顶层:提供 summary 和 retrieve 的python使用 & http接口
2. 底层db:http接口 / mcp接口(和http保持一致)


### 引用的库希望不是外部一个小库
合并flowllm部分逻辑回来

### vector_store
1. 复用之前的,有不断开发的需求
2. 复用mem0,没有异步接口
3. 使用langchain和llama-index
1. 需要额外封装
2. 之前碰到es同步接口底层是es异步封装,外部要异步很复杂

增加下载量
Loading
Loading