continue-learning
Instinct-based learning system for OpenClaw. Analyzes sessions, detects patterns, creates atomic learnings with confidence scoring, and suggests optimizations for self-evolution. W…
adelpro
@adelpro
Install
$ openclaw skills install @adelpro/continue-learningContinuous Learning for AI Agents
An instinct-based learning system that helps AI agents improve themselves through observation and pattern detection.
What This Skill Does
- Analyzes session history - Reviews agent interactions and outputs
- Detects patterns - Identifies recurring behaviors, preferences, workflows
- Creates instincts - Atomic learnings with confidence scores
- Suggests optimizations - Based on observed behavior patterns
- Enables self-evolution - Converts insights into improvements
When to Use
Use when:
- Building self-improving AI agents
- Want agent to learn from interactions
- Discovering optimization opportunities
- Creating adaptive automation
- Tracking behavioral patterns
Skip when:
- Static, unchanging behavior preferred
- No session history available
- Simple, deterministic workflows only
Architecture
~/.openclaw/agents/ (session .jsonl files)
│
▼
┌───────────────────────────────────────────┐
│ analyze.mjs │
│ • Reads session history │
│ • Extracts tool calls & errors │
│ • Detects patterns │
└───────────────────────────────────────────┘
│
▼
┌───────────────────────────────────────────┐
│ memory/learning/ │
│ • instincts.jsonl (atomic learnings) │
│ • patterns.json (aggregated) │
│ • optimizations.json (suggestions) │
└───────────────────────────────────────────┘
External Feedback (Sub-Skill)
This skill works with agent-self-improvement (ClawHub) for external user feedback capture:
- Internal Learning: Session analysis (this skill)
- External Learning: User feedback via
SKILL:agent-self-improvement
Combined Usage
# Nightly: Internal analysis
SKILL:openclaw-continuous-learning --analyze
# After any output: Capture feedback
SKILL:agent-self-improvement --job <task> --feedback "<user response>"
# Daily: Generate combined improvements
SKILL:agent-self-improvement --improve all
Feedback Flow
User Response → agent-self-improvement → Directive Hints
↓
Session Analysis → openclaw-continuous-learning → Internal Patterns
↓
Combined Insights → Agent Optimization
Both skills store learnings in memory/learning/ and can reference each other's data.
Confidence Scoring
| Score | Meaning | Behavior |
|---|---|---|
| 0.3 | Tentative | Suggested but not enforced |
| 0.5 | Moderate | Applied when relevant |
| 0.7 | Strong | Auto-approved |
| 0.9 | Core behavior | Always apply |
Confidence increases when:
- Pattern observed repeatedly
- User doesn't correct behavior
- Multiple observations agree
Confidence decreases when:
- User explicitly corrects
- Pattern not observed recently
- Contradicting evidence appears
Key Concepts
Instincts
An instinct is a small learned behavior:
id: prefer-simplicity
trigger: "when solving problems"
confidence: 0.7
domain: problem_solving
---
# Prefer Simple Solutions
## Action
Always choose the simplest solution that meets requirements.
## Evidence
- Observed preference for minimal code
- User corrected over-engineered approaches
Patterns
Aggregated observations grouped by category:
- code_style
- testing
- git
- debugging
- workflow
- communication
Optimizations
Actionable improvements derived from patterns.
Use Cases
1. Agent Self-Improvement
Agent observes its own sessions:
- What works consistently?
- What gets corrected?
- What patterns emerge?
Creates instincts → Applies high-confidence patterns
2. User Preference Learning
Learn user preferences from interactions:
- Coding style preferences
- Communication preferences
- Workflow preferences
Adapt behavior accordingly
3. Performance Optimization
Detect performance patterns:
- Slow operations
- Bottlenecks
- Optimization opportunities
Suggest improvements
4. Error Pattern Detection
Track error patterns:
- Common failures
- Resolution strategies
- Prevention approaches
Build error-handling instincts
Security & Privacy
- Scoped analysis (opt-in).
analyze.mjsdoes not silently scan every agent. It analyses only sessions of an agent you explicitly name with--agent <name>, or all agents only when you pass--all. Running it with no scope refuses. - Redaction. Any session-derived text stored (error snippets, evidence) is secret-redacted
and control/Unicode-stripped before persistence. Tokens, API keys, private-key blocks, long
hex, and URI credentials become
[REDACTED]. - Retention caps. Learning is bounded: instincts capped at the most recent 200, evidence capped at 10 per instinct, patterns capped at the last 50 analysis runs. Nothing is retained unbounded.
- Deletion control. Run
node scripts/analyze.mjs pruneto delete all stored instincts, patterns, and optimizations at any time. - No raw transcripts. Full session text is never persisted. Only aggregated counts and redacted snippets are stored. Suggestions require your approval to apply — nothing auto-modifies your agent.
Quick Start
# Analyze sessions for ONE explicit agent (opt-in scoping)
cd ~/.openclaw/workspace/skills/continue-learning
node scripts/analyze.mjs --agent <agent-name>
# Explicitly analyze all agents
node scripts/analyze.mjs --all
# List learned instincts / optimizations / patterns (no scope needed)
node scripts/analyze.mjs instincts
node scripts/analyze.mjs list
node scripts/analyze.mjs patterns
# Show redacted error patterns (scoped)
node scripts/analyze.mjs errors --agent <agent-name>
# Delete all stored learning data
node scripts/analyze.mjs prune
Setup
1. Create storage directory
mkdir -p ~/.openclaw/workspace/memory/learning
2. Schedule analysis
Add to cron for periodic analysis:
{
"id": "continuous-learning",
"schedule": "0 22 * * *"
}
3. Integrate with daily tips
Connect to daily summary for optimization delivery.
File Structure
~/.openclaw/workspace/
└── memory/
└── learning/
├── instincts.jsonl # Atomic learnings
├── patterns.json # Aggregated patterns
└── optimizations.json # Suggestions
Example Output
🧠 Learning Report
Patterns Detected:
- prefer-simplicity (0.7) ↑2
- test-first (0.5) ↑1
- commit-often (0.3) new
Confidence Changes:
- minimal-code: 0.5 → 0.7
Suggested:
1. Prioritize simple solutions
2. Add pre-commit hooks
3. Enable stricter typing
Best Practices
- Start simple - Few patterns, low confidence
- Validate often - Check if patterns still hold
- Review suggestions - Don't auto-apply everything
- Track confidence - Update based on results
- Export/share - Build library of common patterns
FAQ
How is this different from memory? Memory stores facts. This learns behavioral patterns and preferences.
How long to see results? Depends on session volume. Typically 1-2 weeks for meaningful patterns.
Is it safe to auto-apply? Only high-confidence (0.7+) patterns. Always review suggestions first.
Related Skills
- skill-engineer - Quality-gated skill development
- compound-engineering - Session review and learning
- memory-setup - Memory configuration
- openclaw-daily-tips - Daily optimization tips
Version: 1.1.0
Inspired by: Anthropic's continuous learning patterns, Claude Code homunculus
Top skills in this category
Self-Improving + Proactive Agent
@ivangdavilaSelf-reflection + Self-criticism + Self-learning + Self-organizing memory. Agent evaluates its own work, catches mistakes, and improves permanently. Use when...
Self Improving Agent
@xiuchengSelf-improving agent system that analyzes conversation quality, identifies improvement opportunities, and continuously optimizes response strategies.
Proactive Agent Lite
@bestrockyTransform AI agents from task-followers into proactive partners with memory architecture, reverse prompting, and self-healing patterns. Lightweight version f...
Marketing Skills
@jchopard69Access 23 marketing modules offering checklists, frameworks, and ready-to-use deliverables for CRO, SEO, copywriting, analytics, launches, ads, and social me...
得到大脑(原 Get 笔记)
@iswalle通过官方 getnote CLI 连接得到大脑,完成浏览器授权、连接诊断、CLI 升级,以及保存、查询、搜索、整理和管理用户的真实笔记。用户明确要求登录、诊断或升级,或要保存链接/图片、查找和查看笔记、整理知识库/文件夹、订阅博主、管理标签时使用;不会自行安装或更新 Skill。