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>:指定單一代理。未指定時,會對所有已設定的代理執行;若未設定代理清單,則使用預設代理。--verbose:在探測與索引過程中輸出詳細日誌。
memory status:
--deep:探測向量與嵌入的可用性。--index:若儲存區有未同步的變更,則重新索引(隱含--deep)。--json:輸出 JSON 格式。
memory index:
--force:強制全面重新索引。
memory search:
- 查詢輸入方式:傳入位置參數
[query]或使用--query <text>。 - 兩者同時提供時,
--query優先。 - 兩者皆未提供時,指令會以錯誤結束。
--agent <id>:指定單一代理(預設使用預設代理)。--max-results <n>:限制回傳結果數量。--min-score <n>:過濾低分數的比對結果。--json:以 JSON 格式輸出結果。
注意事項:
memory index --verbose會列印各階段的詳細資訊(提供者、模型、來源、批次處理狀態)。memory status的輸出包含透過memorySearch.extraPaths設定的額外路徑。- 若有效啟用的記憶遠端 API 金鑰欄位設定為 SecretRef,指令會從目前的 Gateway 快照解析這些值。Gateway 無法連線時,指令會立即失敗。
- Gateway 版本相容性提醒:此指令路徑需要支援
secrets.resolve的 Gateway;舊版 Gateway 會回傳 unknown-method 錯誤。