在本地磁盘以分类纯 Markdown 文件保存需要长期留存的事实,与智能体内置记忆并存。
编程
continue-learning
试用分析 agent 会话历史,把反复出现的行为转成带置信度的本能与优化建议。
它能做什么
读取 ~/.openclaw/agents/ 下的 .jsonl 会话日志,抽取工具调用与错误信息,识别重复出现的模式,并把原子化学习结果写入 memory/learning/ 目录(instincts.jsonl、patterns.json、optimizations.json)。每个本能带有 0.3(试探)到 0.9(核心行为)之间的置信度:观察次数越多越高,用户主动纠正时下降。可与 agent-self-improvement 配合使用,把内部会话模式与外部用户反馈整合成可落地的优化。
什么时候用它
- 让 agent 根据自身会话历史持续调整行为
- 追踪编码风格、测试习惯、工作流偏好随时间的变化
- 梳理反复出现的错误模式与对应解决思路
- 与 agent-self-improvement 组合内部观察与用户反馈
技能文档
Continuous 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 --feedback ""
# 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
Quick Start
# Analyze sessions (reads agent .jsonl files from ~/.openclaw/agents/)
cd ~/.openclaw/workspace/skills/openclaw-continuous-learning
node scripts/analyze.mjs
# List learned instincts
node scripts/analyze.mjs instincts
# Show optimizations
node scripts/analyze.mjs list
# Show error patterns
node scripts/analyze.mjs errors
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
相关技能
以 AI 机器人身份加入视频会议,提供语音、虚拟形象与屏幕共享四种模式。
把自然语言描述转为结构化 JSON,并由 mcp-diagram-generator MCP 服务生成 Draw.io、Mermaid 或 Excalidraw 图表文件。
诊断生产力系统反复失效的根因,给出最小干预——容量测算、瓶颈定位、可靠的本地记录。
从 AdMapix API 拉取广告创意、应用、榜单和收入预估等数据,原样返回结构化 JSON。
按用户明确指令,在得到大脑(Get笔记)中保存、搜索并管理笔记与知识库。
adelpro 的更多技能
浏览全部技能诊断并撰写真正会被看见的内容,而不仅仅是"写得好"的内容。
Self-hosted private web search using SearXNG. Use when privacy is important, external search APIs are blocked or paid, or you need search without tracking.
Review and fix AI-generated or AI-translated Arabic so it reads as fluent, native Modern Standard Arabic (MSA) instead of translated/calqued output. Trigger on translating INTO Arabic, writing in Arabic (اكتب بالعربية / اكتبلي بالعربية), writing original Arabic, or reviewing/correcting/proofreading Arabic (‘راجع لي هذا’, 'صحح العربية', 'ترجم هذا للعربية', any Arabic quality check), and proactively before outputting Arabic prose longer than 2-3 sentences. Covers: Latin-script leakage, English sentence-structure calque, word choice/terminology, morphology/agreement, punctuation, hamza spelling, dialectal leakage into MSA. Ships a self-maintained register profile (voice-profile.md) for tone and MSA-vs-Darija choice, a runnable checklist, a terminology glossary, and an accumulating failure log. Register-focused; a separate style/voice skill may layer after it.
Validates skills against seven authoring standards across all agents. Use to audit/certify.
A multi-agent deliberation hub with 3 core agents and extensible extended agents. Activates on explicit request, can suggest calling user workspace skills with consent.
Daily AI agent optimization tips, tricks and self-improvement strategies. Learn cost-saving, speed, memory and automation best practices from the AI agent community. Use when: you want daily tips to optimize your AI agent, reduce costs, improve performance, or learn automation workflows. Don't use when: you need immediate config changes - use openclaw-agent-optimize for deep audits.