mcpField
A
agent-memory

agent-memory

github.com/molty-assistantAgent 工作流0341 次安装38 周前更新
代码仓库

关于 agent-memory

agent-memory 是供 AI Agent 管理记忆文件的命令行工具,支持整理、搜索和维护,并可生成统计摘要及 Gemini AI 摘要。

主要功能

  1. 01列出记忆文件和最近条目
  2. 02搜索文件并显示上下文
  3. 03按日期范围查看活动摘要
  4. 04检查缺失的每日条目
  5. 05创建日期文件并生成 AI 摘要

适用场景

  1. 01日常维护时检查缺失条目
  2. 02生成每周摘要以供回顾
  3. 03搜索记忆文件中的项目背景

安装

复制下面的命令,在终端中运行。

$npx skills add https://github.com/molty-assistant/agent-memory-skill --skill agent-memory

安装后在 Claude Code 中输入/agent-memory确认已加载。

附带文件package.json

详细介绍

Agent Memory (memctl)

面向 AI Agent 的记忆管理命令行工具。整理、搜索和维护记忆文件。

安装

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              # List all
memctl ls --recent 5     # Show recent
搜索所有文件
memctl search "query"              # Find mentions
memctl s "project" --context 3     # With context lines
摘要统计
memctl summary           # Last 7 days stats
memctl sum --days 30     # Last 30 days
检查遗漏
memctl gaps              # Missing daily entries (30 days)
memctl gaps --days 7     # Check last week
创建今天的文件
memctl touch             # Creates YYYY-MM-DD.md if missing
AI 生成摘要(需要 Gemini API 密钥)
export GEMINI_API_KEY=your_key
memctl digest            # AI summary of last 7 days
memctl ai --days 3       # Last 3 days
memctl digest -o out.md  # Save to file

配置

记忆目录会自动查找:

  1. $MEMORY_DIR 环境变量
  2. 当前目录下的 ./memory
  3. ~/.openclaw/workspace/memory

使用场景

每日检查:

memctl gaps --days 7 && memctl touch

每周回顾:

memctl digest --days 7 -o weekly-digest.md

查找上下文:

memctl search "project name"

集成

添加到你的 HEARTBEAT.md:

## Memory Maintenance
- `memctl gaps` to check for missing entries
- `memctl touch` to create today's file
- `memctl digest` for weekly AI summary

评论

支持 Markdown