Record important information to long-term memory for learning user preferences, successful patterns, and error lessons. When you need to remember user preferences, save successful patterns, or record lessons from errors.
记录重要信息到长期记忆。
| 参数 | 类型 | 必填 | 说明 | |-----|------|-----|------| | content | string | 是 | 要记住的内容 | | type | string | 是 | 记忆类型(见下方列表) | | importance | number | 否 | 重要性(0-1),默认 0.5 |
fact: 事实信息preference: 用户偏好skill: 技能知识error: 错误教训rule: 规则约定记录用户偏好:
{
"content": "用户喜欢简洁的代码风格",
"type": "preference",
"importance": 0.8
}
记录错误教训:
{
"content": "在 Windows 上使用 / 而不是 \\ 作为路径分隔符",
"type": "error",
"importance": 0.7
}
search-memory: 搜索相关记忆get-memory-stats: 查看记忆统计Category:other