OpenClaw 的长期记忆功能。它能自动记住对话内容、回忆相关上下文,并构建持久的用户配置文件——这一切都由Supermemory云提供支持。无需本地基础设施。
需要Supermemory Pro 或更高版本- 为您的 OpenClaw 机器人解锁最先进的内存。
安装
openclaw plugins install @supermemory/openclaw-supermemory
安装完成后重启OpenClaw。
设置
openclaw supermemory setup
输入您在app.supermemory.ai上的 API 密钥。就这么简单。
高级设置
openclaw supermemory setup-advanced
交互式配置所有选项:容器标签、自动召回、自动捕获、捕获模式、自定义容器标签等。
工作原理
安装完成后,插件会自动运行:
-
自动回忆——在每次AI行动之前,它会查询超级记忆库以获取相关记忆,并将其作为上下文信息注入。AI会查看您的用户资料以及语义相似的过往对话。
-
自动捕获— 每次 AI 回合结束后,对话都会发送到超级内存进行提取和长期存储。
-
自定义容器标签— 定义自定义内存容器(例如,`
work<stdio.h> `、`<stdlib.h>`、personal`<stdlib.h>bookmarks`)。使用内存工具时,AI 会根据您的指令自动选择正确的容器。
所有操作都在云端进行。Supermemory 负责数据提取、去重和配置文件构建。
斜杠命令
| 命令 | 描述 |
|---|---|
/remember <text> |
手动将某些内容保存到内存中。 |
/recall <query> |
搜索具有相似度评分的记忆。 |
人工智能工具
AI 可自主使用这些工具。启用自定义容器标签后,所有工具都支持containerTag用于路由到特定容器的参数。
| 工具 | 描述 |
|---|---|
supermemory_store |
将信息保存到内存中。 |
supermemory_search |
按查询搜索记忆。 |
supermemory_forget |
按查询或 ID 删除内存。 |
supermemory_profile |
查看用户个人资料(持久事实+最近上下文)。 |
命令行界面命令
openclaw supermemory setup # Configure API key
openclaw supermemory setup-advanced # Configure all options
openclaw supermemory status # View current configuration
openclaw supermemory search <query> # Search memories
openclaw supermemory profile # View user profile
openclaw supermemory wipe # Delete all memories (requires confirmation)
配置
通过环境变量设置 API 密钥:
export SUPERMEMORY_OPENCLAW_API_KEY="sm_..."
或在以下位置配置~/.openclaw/openclaw.json:
选项
| 钥匙 | 类型 | 默认 | 描述 |
|---|---|---|---|
apiKey |
string |
— | SuperMemory API 密钥。 |
containerTag |
string |
openclaw_{hostname} |
根内存命名空间。 |
autoRecall |
boolean |
true |
在人工智能每次行动之前注入相关记忆。 |
autoCapture |
boolean |
true |
每次回合结束后都要存储对话。 |
maxRecallResults |
number |
10 |
每回合注入的最大内存量。 |
profileFrequency |
number |
50 |
每隔 N 圈注入完整配置文件。 |
captureMode |
string |
"all" |
"all"过滤短文本,"everything"全部捕获。 |
debug |
boolean |
false |
详细的调试日志。 |
enableCustomContainerTags |
boolean |
false |
启用自定义容器路由。 |
customContainers |
array |
[] |
tag带有和的自定义容器description。 |
customContainerInstructions |
string |
"" |
人工智能容器路由指令。 |
完整示例
{
"plugins": {
"entries": {
"openclaw-supermemory": {
"enabled": true,
"config": {
"apiKey": "${SUPERMEMORY_OPENCLAW_API_KEY}",
"containerTag": "my_memory",
"autoRecall": true,
"autoCapture": true,
"maxRecallResults": 10,
"profileFrequency": 50,
"captureMode": "all",
"debug": false,
"enableCustomContainerTags": true,
"customContainers": [
{ "tag": "work", "description": "Work-related memories" },
{ "tag": "personal", "description": "Personal notes" }
],
"customContainerInstructions": "Store work tasks in 'work', personal stuff in 'personal'"
}
}
}
}
}