Agent Memory (memctl)
Memory management CLI for AI agents. Organize, search, and maintain your memory files.
Install
npm install -g agent-memoryOr clone and build:
git clone https://github.com/molty-assistant/agent-memory.git
cd agent-memory && npm install && npm run buildCommands
List memory files
memctl list # List all
memctl ls --recent 5 # Show recentSearch across files
memctl search "query" # Find mentions
memctl s "project" --context 3 # With context linesSummary stats
memctl summary # Last 7 days stats
memctl sum --days 30 # Last 30 daysCheck for gaps
memctl gaps # Missing daily entries (30 days)
memctl gaps --days 7 # Check last weekCreate today's file
memctl touch # Creates YYYY-MM-DD.md if missingAI-powered digest (requires Gemini API key)
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 fileConfiguration
Memory directory is found automatically:
$MEMORY_DIRenvironment variable./memoryin current directory~/.openclaw/workspace/memory
Use Cases
Daily check:
memctl gaps --days 7 && memctl touchWeekly review:
memctl digest --days 7 -o weekly-digest.mdFind context:
memctl search "project name"Integration
Add to your HEARTBEAT.md:
## Memory Maintenance
- `memctl gaps` to check for missing entries
- `memctl touch` to create today's file
- `memctl digest` for weekly AI summary