Voice
Auto Memory Capture
Per-turn automatic memory capture plugin for OpenClaw β extracts facts, deduplicates locally, monthly LINT cleanup
README
# Auto Memory Capture for OpenClaw
Per-turn automatic memory capture plugin for [OpenClaw](https://docs.openclaw.ai). Extracts facts from every conversation, deduplicates locally, and writes atomic, searchable facts to daily notes.
## How it works
```
Every agent turn
ββ agent_end hook β extract facts (LLM) β dedup (Jaccard) β write memory/YYYY-MM-DD.md
Monthly (1st, 3am)
ββ lint_memory β merge duplicates, remove low-quality, archive stale, flag conflicts
```
## Install
```bash
# Clone into your OpenClaw extensions directory
git clone https://github.com/Charlesever/openclaw-auto-memory-capture.git \
~/.openclaw/extensions/auto-memory-capture
```
Then add to `~/.openclaw/openclaw.json`:
```json5
{
"plugins": {
"entries": {
"auto-memory-capture": {
"enabled": true,
"hooks": { "allowConversationAccess": true },
"config": {
"extractModel": "deepseek/deepseek-v4-flash",
"lintModel": "deepseek/deepseek-v4-pro",
"skipCronSessions": true,
"lintEnabled": true,
"lintDayOfMonth": 1,
"lintHour": 3
},
"llm": { "allowModelOverride": true }
}
}
}
}
```
Restart the gateway or wait for config hot-reload.
## Configuration
| Option | Default | Description |
|---|---|---|
| `extractModel` | session model | Model for per-turn fact extraction (cheap/fast recommended) |
| `lintModel` | `deepseek/deepseek-v4-pro` | Model for monthly LINT (needs strong reasoning) |
| `skipCronSessions` | `true` | Skip heartbeat/cron/isolated sessions |
| `lintEnabled` | `true` | Enable monthly automatic LINT |
| `lintDayOfMonth` | `1` | Day of month to run LINT |
| `lintHour` | `3` | Hour (0-23) to run LINT |
## Memory format
Facts are written to `memory/YYYY-MM-DD.md` in your OpenClaw workspace:
```markdown
## 14:32 θͺε¨ζε½
- Lam decided to move material pricing from hardcoded to runtime input due to supplier volatility
- Box side limit raised from 65cm to 70cm after customer feedback
## 15:10 θͺε¨ζε½
- Confirmed SQLite for local storage, rejected Postgres (deployment complexity)
- Added scrap rate parameter to pricing formula, default 3%, adjustable per material type
```
## lint_memory tool
Registered as a plugin tool. Dry-run by default:
```
/lint_memory days=30 apply=false # preview only
/lint_memory days=30 apply=true # execute cleanup
```
LINT performs four checks:
| Check | Action |
|---|---|
| Near-duplicates | Merge into best-worded version |
| Low quality | Remove vague/useless facts |
| Stale | Archive completed one-time tasks |
| Contradictions | Flag for manual review |
Auto-backs up affected files to `memory/.backup/` before any modification.
## Requirements
- OpenClaw >= 2026.5.22
- Plugin API >= 2026.5.0
## License
MIT
voice
Comments
Sign in to leave a comment