ベクトルメモリの概要
OpenClaw の Memory システムにより、AIアシスタントは単一の会話のコンテキストウィンドウを超えた長期記憶を持つことができます。ベクトルデータベースを使用して情報の保存と検索を行い、セマンティック検索に対応しています。
メモリシステムの有効化
openclaw memory enable
設定:
{
"memory": {
"enabled": true,
"provider": "local",
"embeddingModel": "text-embedding-3-small",
"embeddingProvider": "openai",
"maxMemories": 10000,
"searchResults": 5
}
}
メモリの手動追加
openclaw memory add "会社は2020年に設立され、本社は東京にあります"
# ファイルからインポート
openclaw memory import knowledge.txt
openclaw memory import faq.md --format markdown
# ディレクトリから一括インポート
openclaw memory import ./docs/ --recursive
メモリの検索
openclaw memory search "会社はいつ設立されましたか"
メモリの管理
# 最新のメモリを表示
openclaw memory list --last 20
# 特定のメモリを削除
openclaw memory delete mem_abc123
# すべてのメモリをクリア
openclaw memory clear --confirm
自動メモリ
会話から重要な情報を自動的に抽出・保存する設定:
{
"memory": {
"autoCapture": {
"enabled": true,
"threshold": 0.8,
"categories": ["fact", "preference", "instruction"],
"maxPerSession": 10
}
}
}
バックアップと復元
openclaw memory export --output memory-backup.json
openclaw memory import --input memory-backup.json
まとめ
ベクトルメモリシステムにより、OpenClaw のAIアシスタントは長期記憶能力を獲得し、ユーザーの好み、企業知識、過去の会話の重要情報を記憶できます。自動メモリと手動の知識インポートを適切に設定することで、使えば使うほどユーザーを理解するAIアシスタントを構築できます。