openclaw memory
管理语义记忆的索引与搜索。
由当前激活的记忆插件提供(默认是 memory-core;设置 plugins.slots.memory = "none" 可以关掉它)。
相关内容:
用法示例
openclaw memory status
openclaw memory status --deep
openclaw memory index --force
openclaw memory search "meeting notes"
openclaw memory search --query "deployment" --max-results 20
openclaw memory status --json
openclaw memory status --deep --index
openclaw memory status --deep --index --verbose
openclaw memory status --agent main
openclaw memory index --agent main --verbose
参数说明
memory status 和 memory index:
--agent <id>:限定到某个 agent。不指定的话,命令会对所有已配置的 agent 执行;如果没有配置 agent 列表,则回退到默认 agent。--verbose:在探测和索引过程中输出详细日志。
memory status:
--deep:探测向量存储和 embedding 的可用性。--index:如果存储有脏数据就重建索引(隐含--deep)。--json:输出 JSON 格式。
memory index:
--force:强制全量重建索引。
memory search:
- 查询输入:可以用位置参数
[query],也可以用--query <text>。 - 两者都传了的话,
--query优先。 - 两个都没传,命令会报错退出。
--agent <id>:限定到某个 agent(默认是默认 agent)。--max-results <n>:限制返回结果数量。--min-score <n>:过滤掉低分匹配。--json:输出 JSON 格式的结果。
注意事项:
memory index --verbose会打印每个阶段的详情(provider、模型、数据源、批次活动)。memory status的输出包含通过memorySearch.extraPaths配置的额外路径。- 如果当前激活的记忆远程 API key 字段配置为 SecretRef,命令会从当前 gateway 快照中解析这些值。如果 gateway 不可用,命令会直接失败。
- Gateway 版本兼容提示:此命令路径要求 gateway 支持
secrets.resolve;旧版 gateway 会返回 unknown-method 错误。