Install
openclaw skills install self-improverSelf-improving agent system for OpenClaw. Enables continuous learning from interactions, errors, and recoveries. Automatically improves performance over time.
openclaw skills install self-improverA continuous learning agent system for OpenClaw that learns from:
# Clone to OpenClaw skills directory
cd ~/.openclaw/workspace/skills
git clone https://github.com/leohuang8688/self-improving-agent.git
Auto-learning is enabled by default! After each OpenClaw session, the agent will automatically learn and improve.
# Clone the repository
git clone https://github.com/leohuang8688/self-improving-agent.git
cd self-improving-agent
# Install with pip
pip install -e .
# Or install with uv
uv pip install -e .
Just use OpenClaw normally! Learning happens automatically after each session, error, or recovery.
# Start OpenClaw
openclaw
# Use it normally...
# Exit OpenClaw
# → Auto-learning triggers automatically!
# Run the self-improving agent
python -m self_improving_agent run
# Learn from last session
python -m self_improving_agent learn
# Learn from errors
python -m self_improving_agent learn-errors
# Learn from recoveries
python -m self_improving_agent learn-recoveries
# Review all learnings
python -m self_improving_agent review
# Export learnings to file
python -m self_improving_agent export
run - Run the AgentExecutes the self-improving agent with all applied improvements.
python -m self_improving_agent run --workspace /path/to/workspace
learn - Learn from SessionAnalyzes the last session and extracts learnings.
python -m self_improving_agent learn --verbose
learn-errors - Learn from ErrorsAnalyzes error logs and extracts learnings.
python -m self_improving_agent learn-errors --verbose
learn-recoveries - Learn from RecoveriesAnalyzes recovery logs and extracts successful patterns.
python -m self_improving_agent learn-recoveries --verbose
review - Review LearningsReviews all stored learnings.
python -m self_improving_agent review --verbose
export - Export LearningsExports all learnings to a markdown file.
python -m self_improving_agent export
onSessionEnd(session)session - Session objectonError(error)error - Error objectonRecovery()onSessionEndlearnings/sessions.jsononErrorlearnings/errors.jsononRecoverylearnings/recoveries.jsonself-improving-agent/
├── src/
│ ├── hooks.py # Hook manager
│ └── ...
├── hooks/
│ └── error_learning.py # Error learning hook
├── learnings/
│ ├── sessions.json # Session learnings
│ ├── errors.json # Error learnings
│ └── recoveries.json # Recovery learnings
├── main.py
├── README.md
└── SKILL.md
In OpenClaw configuration file:
{
"hooks": {
"internal": {
"enabled": true,
"entries": {
"self-improve": {
"enabled": true
},
"error-learning": {
"enabled": true
}
}
}
}
}
learnings/errors.json[
{
"timestamp": "2026-03-15T12:30:00",
"error_type": "ValueError",
"error_message": "Invalid parameter",
"context": {
"traceback": "..."
}
}
]
learnings/recoveries.json[
{
"timestamp": "2026-03-15T12:35:00",
"recovery_method": "automatic_recovery"
}
]
MIT License
PocketAI for Leo - OpenClaw Community