AI Agents That Learn From Experience
OpenClaw Lightning Edition combines the power of OpenClaw with Agent Lightning (Microsoft Research) to create self-improving AI agents.
- π§ Self-Learning - Your agent learns from every task
- π Continuously Improving - Gets better over time automatically
- π― Prompt Optimization - A/B tests and deploys optimal prompts
- π Performance Analytics - Track improvements in real-time
- π Fully Private - All learning happens locally
- β‘ Zero Overhead - <3Β΅s per operation (imperceptible)
In testing, Agent Lightning improved task performance by 34%:
- "Money-making machine" persona: 100% success β
- Generic "helpful assistant": 60% success
- +40% improvement in task completion
# Install
npm install -g openclaw-lightning
# Setup (includes Lightning)
openclaw setup
# Start
openclaw startThat's it! Your agent starts learning immediately.
- Multi-channel support (Telegram, Discord, Slack, etc.)
- Tool execution (web search, file ops, code execution)
- Agent sessions and memory
- Cron jobs and automation
- Reinforcement learning framework
- Automatic prompt optimization (APO)
- Performance tracking and analytics
- Self-improvement over time
βββββββββββββββββββββββββββββββββββββββββββββββ
β Your OpenClaw Agent β
β β
β Every task β Tracked β Learned From β
β β
β ββββββββββββ ββββββββββββββββββββ β
β β OpenClaw ββββββΆβ Lightning Bridge β β
β ββββββββββββ ββββββββββββββββββββ β
β β β β
β β βΌ β
β β βββββββββββββββββββ β
β β β Agent Lightning β β
β β β (RL Learning) β β
β β βββββββββββββββββββ β
β βΌ β
β Better prompts deployed automatically β
β β
βββββββββββββββββββββββββββββββββββββββββββββββ
Learning is enabled by default. To disable:
# Stop Lightning service
npm run lightning:stop
# Or disable in config
openclaw config set agent_lightning.enabled false# View statistics
npm run lightning:stats
# Check service status
npm run lightning:status# Analyze collected data
openclaw lightning analyze
# Run prompt optimization
openclaw lightning optimize
# View improvements
openclaw lightning report- Overhead: ~2Β΅s per operation (imperceptible)
- Memory: +200MB for Lightning service
- Disk: +500MB for Python dependencies
- CPU: Minimal (< 1% during normal operation)
- All data stays local - No external API calls
- No message content stored - Only metadata (tool calls, timing)
- Opt-out anytime - Disable with one command
- Open source - Audit the code yourself
Edit ~/.openclaw/lightning/config.json:
{
"rewards": {
"success": 1.0,
"failure": -0.5,
"efficiency_bonus": 0.1,
"speed_bonus": 0.1
}
}{
"training": {
"enabled": true,
"frequency": "weekly",
"min_data_points": 100
}
}We welcome contributions! See CONTRIBUTING.md for guidelines.
Areas we need help:
- Testing on different platforms
- Documentation improvements
- New training algorithms
- Performance optimizations
- Bug fixes
# Check Python version
python3 --version # Should be 3.10+
# Check logs
journalctl --user -u openclaw-lightning.service -n 50
# Reinstall
npm run lightning:setup# Check service status
npm run lightning:status
# Test manually
curl http://localhost:8765/health
# Restart service
systemctl --user restart openclaw-lightning.service- OpenClaw: [OpenClaw License]
- Agent Lightning: MIT License (Microsoft)
- Integration Code: MIT License
See LICENSE for details.
- OpenClaw - Original AI agent framework
- Agent Lightning - Microsoft Research RL framework
- Contributors - Everyone who helped make this possible
- Multi-agent learning
- Distributed training
- Cloud sync (optional)
- Advanced analytics dashboard
- Custom algorithm plugins
Made with π¦ by the OpenClaw community