Continuously captures and applies learnings from errors, user corrections, successful tasks, and periodic reviews to improve agent performance.
This skill enables OpenClaw to continuously improve by capturing learnings from:
When something noteworthy happens:
Type: error | correction | success | insight
Context: What was being attempted
Issue: What went wrong (for errors)
Correction: What should be done differently
Lesson: Generalizable takeaway
Tags: Relevant topics/skills
Learnings are stored in memory/learnings.jsonl with:
Before starting a task, search past learnings:
Use retrieved learnings to:
Learnings are stored in JSONL format:
{
"timestamp": "2026-03-06T10:30:00Z",
"type": "error",
"severity": "high",
"context": "Installing npm package globally",
"issue": "Permission denied without sudo",
"correction": "Use sudo for global installs or configure npm prefix",
"lesson": "Always check if operation requires elevated privileges",
"tags": ["npm", "permissions", "installation"],
"taskSlug": "npm-global-install"
}
| Type | When to Use | Example |
|---|---|---|
| error | Operation failed | Command returned non-zero exit code |
| correction | User corrected behavior | "Don't use rm, use trash instead" |
| success | Complex task completed | Successfully deployed to production |
| insight | Discovered optimization | "This API is faster than alternatives" |
# Manual capture (for user corrections)
openclaw memory add-learning --type correction --context "..." --lesson "..."
# Search by keyword
openclaw memory search-learnings "npm permissions"
# Search by tag
openclaw memory search-learnings --tag npm
# Search by type
openclaw memory search-learnings --type error
# Review recent learnings
openclaw memory review-learnings --days 7
# Review by category
openclaw memory review-learnings --tag deployment
Context: Running `npm install -g package`
Issue: EACCES permission error
Correction: Run with sudo or configure npm prefix
Lesson: Check if global install requires elevated privileges
Tags: npm, permissions, installation
Context: Suggested using `rm -rf` for cleanup
Correction: User prefers `trash` for safety
Lesson: Default to safe, reversible operations
Tags: safety, file-operations, user-preference
Context: Deploying to VPS via SSH
Success: Used rsync with specific flags for reliability
Lesson: rsync -avz --delete is reliable for deployments
Tags: deployment, ssh, rsync, success
ZIP package — ready to use