remember
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMem0 Remember
Mem0 记忆存储
Store a fact or learning directly into mem0.
直接将事实或学习内容存入mem0。
Execution
执行步骤
Step 1: Extract the content
步骤1:提取内容
The user provides the content as an argument:
/mem0:remember <text>If no text was provided, ask: "What should I remember?"
用户通过参数提供内容:
/mem0:remember <text>如果未提供文本,询问:“我应该记住什么?”
Step 2: Classify the memory
步骤2:分类记忆
Based on the content, pick the best :
metadata.type| Content signal | Type |
|---|---|
| "we decided...", "always use...", "never..." | |
| "X doesn't work because...", "don't try..." | |
| "I prefer...", "use X instead of Y" | |
| "the convention is...", "we always..." | |
| "learned that...", "figured out..." | |
| setup, env, tooling, config | |
| anything else | |
根据内容选择最合适的:
metadata.type| 内容信号 | 类型 |
|---|---|
| “我们决定...”, “始终使用...”, “绝不...” | |
| “X无法工作是因为...”, “不要尝试...” | |
| “我偏好...”, “使用X而非Y” | |
| “惯例是...”, “我们总是...” | |
| “了解到...”, “弄清楚了...” | |
| 设置、环境、工具、配置 | |
| 其他任何内容 | |
Step 3: Store
步骤3:存储
Call with:
add_memorytext="<the user's text>"user_id=<active_user_id>app_id=<active_project_id>metadata={"type": "<classified_type>", "branch": "<active_branch>", "confidence": 1.0, "source": "remember_command"}infer=False
infer=Falseconfidence=1.0调用接口,参数如下:
add_memorytext="<用户输入的文本>"user_id=<当前活跃用户ID>app_id=<当前活跃项目ID>metadata={"type": "<分类后的类型>", "branch": "<当前活跃分支>", "confidence": 1.0, "source": "remember_command"}infer=False
设置是因为用户明确陈述了事实——无需额外提取。
设置是因为用户明确要求存储该内容。
infer=Falseconfidence=1.0Step 4: Confirm
步骤4:确认
The response returns (not ) because writes are async.
Call once.
add_memoryevent_idmemory_idget_event_status(event_id=<event_id>)- If status is : print the memory ID from the result.
SUCCEEDED - If status is or
PENDING: print with the event ID as fallback.processing
Remembered as <type>: "<content, first 80 chars>"
Memory ID: <id from event status>Append only if content was truncated (longer than 80 chars).
...add_memoryevent_idmemory_idget_event_status(event_id=<event_id>)- 如果状态为:打印结果中的记忆ID。
SUCCEEDED - 如果状态为或
PENDING:使用事件ID作为备选进行打印。processing
已存储为<type>:"<内容,前80个字符>"
记忆ID:<事件状态返回的ID>仅当内容被截断(超过80字符)时才追加。
...