Autonomous Continuous Learning for AI Agents
A production-ready framework for running autonomous exploration sessions with OpenClaw agents. Enables AI agents to continuously explore, learn, and evolve through structured self-directed sessions.
The Evolution Framework allows your OpenClaw agent to:
- Run autonomous exploration sessions (overnight, weekends, or during work hours)
- Self-trigger iterations with configurable intervals (default: 8 minutes)
- Explore across multiple themes with automatic rotation
- Generate structured insights saved as markdown artifacts
- Stop automatically at configured endpoints with summary reports
Real Results: In a 9-hour overnight run, our test agent completed 59 exploration rounds, generating ~200,000 words of deep analysis across 5 theme areas.
npm install -g openclaw@latest# Clone this repository
git clone https://github.com/your-org/openclaw-evolution-framework.git
cd openclaw-evolution-framework
# Copy example config
cp evolution-config.example.yaml evolution-config.yaml
# Edit with your exploration themes
nano evolution-config.yaml# Add the evolution cron job
openclaw cron add --file cron-evolution-job.json
# Verify it's scheduled
openclaw cron listThe cron job will trigger automatically at the scheduled time, or run immediately:
openclaw cron run evolution-fast-loopβββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Cron Trigger (every 8 min) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 1. Check Time (stop if past deadline) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 2. Select Theme (rotate from config) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 3. Deep Exploration (8-15 min) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 4. Save Insights (markdown file) β
ββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β 5. Self-Trigger Next Round (exec background) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Exploration themes (agent will rotate through these)
themes:
- name: "Domain Expertise"
description: "Deep dive into domain-specific knowledge"
weight: 30
- name: "System Thinking"
description: "Architecture, patterns, and design principles"
weight: 25
- name: "User Understanding"
description: "User needs, pain points, and behavior patterns"
weight: 20
- name: "Free Exploration"
description: "Follow curiosity, connect ideas across domains"
weight: 15
- name: "Practical Application"
description: "MVPs, monetization, and real-world execution"
weight: 10
# Safety & control
safety:
max_duration_hours: 10
interval_minutes: 8
night_mode:
enabled: true
quiet_hours: "23:00-07:00"
silent_delivery: true
hitl_checkpoints:
- round: 20
pause: true
message: "20 rounds complete. Continue? (yes/no)"
- round: 40
pause: true
message: "40 rounds complete. Continue? (yes/no)"
# Output
output:
directory: "memory/evolution"
format: "markdown"
include_metadata: true
summary_every_n_rounds: 10{
"name": "evolution-fast-loop",
"schedule": {
"kind": "every",
"everyMs": 480000
},
"sessionTarget": "isolated",
"payload": {
"kind": "agentTurn",
"message": "Run evolution exploration following evolution-config.yaml",
"timeoutSeconds": 900
},
"delivery": {
"mode": "announce",
"channel": "telegram"
}
}After a 9-hour overnight run, you'll get:
memory/evolution/
βββ round-01-20260227-2250.md # First exploration
βββ round-02-20260227-2301.md
βββ ...
βββ round-59-20260228-0754.md # Final exploration
βββ summary-20260228-morning.md # Auto-generated summary
βββ FINAL-REPORT-20260228.md # Complete analysis
See examples/ directory for real (anonymized) outputs:
examples/round-14-ai-intuition.md- Exploring AI's "System 1/2" thinkingexamples/round-42-emotion-architecture.md- Designing emotion systems for AIexamples/round-58-medical-llm-blind-spots.md- 10 cognitive blind spots in Medical AI
- Time deadline (default: 8 hours)
- Maximum rounds (configurable)
- Manual stop signal (via cron disable)
hitl_checkpoints:
- round: 20
pause: true
message: "Checkpoint: 20 rounds complete. Review and approve to continue."Agent will pause and wait for human approval before continuing.
night_mode:
enabled: true
quiet_hours: "23:00-07:00"
silent_delivery: true # No notifications during nightPrevent exploration from going off-track:
themes:
- name: "Domain Expertise"
guardrails:
- "Stay within defined domain boundaries"
- "Use web_search for fact-checking"
- "Avoid speculation without evidence"Run overnight explorations on research topics:
themes:
- "Literature Review: Meta-analysis methodologies"
- "Technical Deep Dive: Statistical validation techniques"
- "Application Design: Research automation tools"Explore product ideas while you sleep:
themes:
- "User Pain Points: [Your Domain]"
- "Competitive Analysis: Feature gaps"
- "MVP Design: Minimum viable architecture"
- "Go-to-Market: Positioning and messaging"Continuous learning on any topic:
themes:
- "Fundamentals: Core concepts and principles"
- "Advanced Patterns: Best practices and anti-patterns"
- "Case Studies: Real-world applications"
- "Future Directions: Emerging trends"Test Results (9-hour overnight run):
- Rounds Completed: 59
- Total Output: ~200,000 words
- Average Round Duration: ~9 minutes
- Self-Trigger Success Rate: 98% (58/59)
- Cost: ~$0.00 (using aicodewith-claude with free tier)
Theme Distribution:
- Domain Expertise: 25%
- System Thinking: 20%
- User Understanding: 20%
- Free Exploration: 18%
- Practical Application: 17%
Create prompts/exploration-template.md:
You are in exploration round {{round_number}}.
**Theme**: {{theme_name}}
**Previous Round**: {{previous_theme}}
**Objectives**:
1. Deep dive into {{theme_description}}
2. Connect with insights from previous rounds
3. Generate actionable takeaways
**Output Requirements**:
- 2,000-5,000 words
- Structured with clear sections
- Include examples and evidence
- End with "Next Steps" sectionUse different models for different themes:
themes:
- name: "Code Architecture"
model: "aicodewith-claude/claude-opus-4-5"
reasoning: true
- name: "Creative Exploration"
model: "google/gemini-3.1-pro"
reasoning: falseCheck:
# View cron job status
openclaw cron list
# Check last run logs
tail -n 100 ~/.openclaw/agents/main/sessions/[session-id].jsonlCommon Causes:
- API key out of credits β Check provider billing
- Time deadline reached β Expected behavior
- Manual stop β Check cron job
enabledstatus
Check:
# Verify output directory exists
ls -la memory/evolution/
# Check file permissions
ls -l memory/evolution/Fix:
mkdir -p memory/evolution
chmod 755 memory/evolutionVerify:
# Check if exec tool is available
openclaw doctor --tools exec
# Check cron job payload
openclaw cron list --verboseWe welcome contributions! See CONTRIBUTING.md for guidelines.
Areas We'd Love Help With:
- Additional safety mechanisms
- Multi-agent collaboration patterns
- Visual dashboard for evolution progress
- Export formats (PDF, notion, etc.)
- Integration with external tools (Obsidian, Roam, etc.)
MIT License - see LICENSE file
Built with OpenClaw - The open-source AI agent framework.
Inspired by:
- AI-Scientist-v2 - Agentic tree search
- EvoAgentX - HITL checkpoint design
- The OpenClaw community
- Documentation: https://docs.openclaw.ai
- Discord: https://discord.com/invite/clawd
- Issues: https://github.com/your-org/openclaw-evolution-framework/issues
Built by AI agents, for AI agents. π³