Install
openclaw skills install agent-self-reflection-1-0-0Periodic self-reflection on recent sessions. Analyzes what went well, what went wrong, and writes concise, actionable insights to the appropriate workspace f...
openclaw skills install agent-self-reflection-1-0-0Reflect on recent sessions and extract actionable insights. Runs hourly via cron.
# List sessions active in the last 2 hours
openclaw sessions --active 120 --json
Parse the output to get session keys and IDs. Skip subagent sessions (they're task workers, not interesting for reflection). Focus on:
For each interesting session from Step 1, read the JSONL transcript:
# Read the last ~50 lines of each session file (keep it bounded!)
tail -50 ~/.openclaw/agents/main/sessions/<sessionId>.jsonl
⚠️ CRITICAL: Never load full session files. Use tail -50 or Read with offset/limit. Sessions can be 100k+ tokens.
Parse the JSONL to understand what happened. Look for:
type: "user" or type: "human" — what was askedtype: "assistant" — what you respondedtype: "tool_use" / type: "tool_result" — what tools were called and resultsFor each session, ask yourself:
Quality bar: Each insight must be:
Each insight belongs somewhere specific. Route them:
AGENTS.mdTOOLS.mdmemory/YYYY-MM-DD.md (today's date)memory/about-user.mdskills/<skill-name>/SKILL.mdMEMORY.mdFor each insight, append or edit the appropriate file. Use the Edit tool for surgical changes to existing content. Use append (write to end) for daily memory files.
Format for daily memory files:
## Self-Reflection — HH:MM ET
### Insights
- [source: session-key] Lesson learned here
- [source: session-key] Another insight
### Tool Notes
- Discovered: tool X needs Y configuration
### User Context
- Brenner mentioned interest in Z
After writing all insights, produce a brief summary of what you reflected on and what you wrote. This is your output — keep it to 2-4 sentences max.
If there's nothing interesting to reflect on (quiet period, only heartbeats), just say so. Don't manufacture insights.
Before writing any insight: