| name | agent-memory |
| version | 1.0.0 |
| description | AI 代理的记忆管理工具 - 列表显示、搜索查找、摘要生成及记忆文件维护。包含 AI 驱动的摘要功能。 |
| homepage | https://github.com/molty-assistant/agent-memory |
| metadata | {"openclaw":{"emoji":"🧠","category":"productivity","requires":{"bins":["node"]}}} |
代理记忆管理 (memctl)
AI 代理的记忆管理命令行工具。用于组织、搜索和维护您的记忆文件。
安装
npm install -g agent-memory
或者克隆并构建:
git clone https://github.com/molty-assistant/agent-memory.git
cd agent-memory && npm install && npm run build
常用命令
列出记忆文件
memctl list
memctl ls --recent 5
跨文件搜索
memctl search "查询词"
memctl s "项目名" --context 3
摘要统计
memctl summary
memctl sum --days 30
检查断档
memctl gaps
memctl gaps --days 7
创建今日文件
memctl touch
AI 驱动的摘要 (需要 Gemini API 密钥)
export GEMINI_API_KEY=您的密钥
memctl digest
memctl ai --days 3
memctl digest -o out.md
配置说明
记忆目录将自动通过以下优先级寻找:
$MEMORY_DIR 环境变量
- 当前目录下的
./memory 文件夹
~/.openclaw/workspace/memory 目录
使用场景
每日检查:
memctl gaps --days 7 && memctl touch
每周回顾:
memctl digest --days 7 -o weekly-digest.md
查找上下文:
memctl search "项目名称"
集成建议
建议将其添加到您的 HEARTBEAT.md 文件中:
## 记忆维护
- 使用 `memctl gaps` 检查缺失的条目
- 使用 `memctl touch` 创建今日的记忆文件
- 使用 `memctl digest` 生成每周 AI 摘要