Loading...
Loading...
Continuous self-improvement through structured reflection and memory
npx skill4agent add sundial-org/awesome-openclaw-skills self-reflection# Check if reflection is needed
self-reflection check
# Log a new reflection
self-reflection log "error-handling" "Forgot timeout on API call" "Always add timeout=30"
# Read recent lessons
self-reflection read
# View statistics
self-reflection statsHeartbeat (60m) → Agent reads HEARTBEAT.md → Runs self-reflection check
│
┌─────────┴─────────┐
▼ ▼
OK ALERT
│ │
Continue Reflect
│
┌─────────┴─────────┐
▼ ▼
read log
(past lessons) (new insights)| Command | Description |
|---|---|
| Check if reflection is due (OK or ALERT) |
| Log a new reflection |
| Read last n reflections (default: 5) |
| Show reflection statistics |
| Reset the timer |
~/.openclaw/openclaw.json{
"agents": {
"defaults": {
"heartbeat": {
"every": "60m",
"activeHours": { "start": "08:00", "end": "22:00" }
}
}
}
}HEARTBEAT.md## Self-Reflection Check (required)
Run `self-reflection check` at each heartbeat.
If ALERT: read past lessons, reflect, then log insights.~/.openclaw/self-reflection.json{
"threshold_minutes": 60,
"memory_file": "~/workspace/memory/self-review.md",
"state_file": "~/.openclaw/self-review-state.json",
"max_entries_context": 5
}