Install
openclaw skills install agent-memory-loopLightweight self-improvement loop for AI agents. Capture errors, corrections, and discoveries in a fast one-line format, dedup them, queue recurring or critical lessons for human-approved promotion, and review relevant learnings before major work.
openclaw skills install agent-memory-loopLightweight learning for agents that reset between sessions.
error / correction / discovery
↓
log one line in .learnings/
↓
dedup by id, then keyword
↓
count:3+ or severity:critical → promotion-queue
↓
human reviews promotion
↓
check relevant learnings before major work
↓
increment prevented:N when a learning actually changed behavior
bash scripts/install.sh
Creates:
.learnings/
errors.md
learnings.md
wishes.md
promotion-queue.md
details/
archive/
Add this to your agent instructions:
## Self-Improvement
Before major tasks: grep .learnings/*.md for relevant past issues.
After errors or corrections: log a one-line entry using agent-memory-loop.
Never auto-write to SOUL.md, AGENTS.md, TOOLS.md, or similar instruction files.
Stage candidate rule changes in .learnings/promotion-queue.md for human review.
One incident or discovery per line. Extra fields are optional.
[YYYY-MM-DD] id:ERR-YYYYMMDD-NNN | COMMAND | what failed | fix | count:N | prevented:N | severity:medium | source:agent
[YYYY-MM-DD] id:LRN-YYYYMMDD-NNN | CATEGORY | what | action | count:N | prevented:N | severity:medium | source:agent
[YYYY-MM-DD] CAPABILITY | what was wanted | workaround | requested:N
[YYYY-MM-DD] id:LRN-YYYYMMDD-NNN | proposed rule text | target: AGENTS.md | source:agent | evidence: count:N prevented:N | status: pending
Key fields:
count:N tracks recurrenceprevented:N tracks loop closureseverity:critical forces review even at count 1source:external is never promotableprevented:Nreferences/logging-format.md — canonical line formats, fields, examples, source labelsreferences/operating-rules.md — dedup, review queue, pre-task review, trimming rulesreferences/promotion-queue-format.md — queue entry structure and status lifecyclereferences/detail-template.md — optional detail-file template for complex failuresreferences/design-tradeoffs.md — why this stays lean instead of turning into a systemassets/errors.mdassets/learnings.mdassets/wishes.mdassets/promotion-queue.mdscripts/install.shscripts/setup.shscripts/review.shThe loop is working if agents actually use it:
prevented:N starts climbing on real work