← 返回
未分类 中文

Skill Experience Layer

Skill Experience Layer - A failure-driven learning mechanism for OpenClaw agents that automatically accumulates lessons and best practices to avoid repeating...
技能经验层——一种失败驱动的学习机制,OpenClaw代理自动累积经验教训和最佳实践,避免重复...
jilanfang jilanfang 来源
未分类 clawhub v1.0.2 1 版本 100000 Key: 无需
★ 0
Stars
📥 514
下载
💾 0
安装
1
版本
#latest

概述

Skill Experience Layer for OpenClaw

A failure-driven learning mechanism that systematically accumulates experience from tool calls, mistakes, and successes. Each tool/skill category has its own experience file with:

  • Lessons learned from failures
  • Common mistakes pattern matching
  • Preventive best practices
  • Statistics tracking (total executions, success/failure counts)

Core Philosophy

> "The man who repeats the same mistake and expects different results is a fool." - This mechanism eliminates that.

Every failure is a one-time tuition payment for permanent knowledge.

How It Works

1. Pre-execution Experience Loading

Before any tool call, the agent must:

  1. Identify the experience category
  2. Read the compact experience file
  3. Apply learned best practices
  4. Avoid known mistakes

2. Post-execution Experience Update

If the tool call fails:

  1. Stop immediately and analyze root cause
  2. Add/Update the experience entry
  3. Record the mistake and prevention
  4. Continue only after updating

If the tool call succeeds:

  1. Optionally add high-value best practices
  2. Keep experience lean and actionable

3. Weekly/Monthly Maintenance

  • Weekly: Remove outdated experiences
  • Monthly: Clean up duplicates, consolidate patterns

Experience Category Structure

{
  "type": "skill",
  "name": "tool-name",
  "lastUpdated": "ISO timestamp",
  "totalExecutions": N,
  "successCount": N,
  "failureCount": N,
  "experiences": [
    {
      "mistake": "Description of what went wrong",
      "when": "Context/scenario where it happens",
      "avoidance": "How to avoid this mistake",
      "count": 1
    }
  ],
  "patterns": {
    "commonMistakes": [
      "List of frequent mistakes"
    ],
    "bestPractices": [
      "List of proven best practices"
    ]
  }
}

Built-in Categories

CategoryDescription
-----------------------
readFile reading, web fetching
writeFile writing, editing
editExact text replacement in files
execShell command execution
browserBrowser automation
messageMessage sending, media upload
searchWeb search tools
feishuAll Feishu/Lark API tools
feishu-*Fine-grained Feishu sub-skill experiences
memoryMemory search and retrieval
skillSkill management operations
cronCron job scheduling and delivery modes
video-framesVideo frame extraction with ffmpeg

Installation

clawhub install experience-layer

Or manually:

mkdir -p ~/.openclaw/workspace/memory/experiences
# Copy the empty category template to start
cp templates/empty-category.json ~/.openclaw/workspace/memory/experiences/your-category.json
# Edit the JSON and add your first experience

What's Included

  • SKILL.md - Complete documentation
  • templates/empty-category.json - Starter template for new categories
  • templates/example.json - Real-world example from production usage
  • examples/ - Full production-ready experience files:
  • examples/edit.json - Experience for file editing
  • examples/exec.json - Experience for shell command execution
  • examples/feishu.json - Experience for Feishu/Lark API
  • examples/message.json - Experience for message sending
  • examples/cron.json - Experience for cron job scheduling

Usage in OpenClaw Workflow

  1. Before calling a tool:
  2. read memory/experiences/{category}.json
    apply the best practices and avoid the common mistakes
    
  1. After failure:
  2. analyze root cause
    update the corresponding experience file
    record the lesson learned
    then retry
    

Benefits

  • No repeated mistakes - Same mistake only pays tuition once
  • Progressive improvement - System gets better over time
  • Compact and searchable - JSON format for easy semantic search
  • Low overhead - Small files, quick to load
  • Open extension - Add new categories as needed

Changelog

1.0.2 (2026-03-18)

  • Add examples/ directory with full production experience files
  • Include 5 complete real-world experience JSON: edit, exec, feishu, message, cron
  • Users can drop these directly into their memory/experiences/ to start

1.0.1 (2026-03-18)

  • Add template directory with empty category template
  • Add complete example JSON from production
  • Improve installation documentation

1.0.0 (2026-03-18)

  • Initial public release
  • 25+ experience categories with real-world lessons from production usage
  • Complete JSON schema
  • Documentation

Author

jilanfang

License

MIT

版本历史

共 1 个版本

  • v1.0.2 当前
    2026-05-02 07:54 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

ai-agent

Agent Browser

rez0
用于 AI 代理的浏览器自动化 CLI。当用户需要与网站交互(包括浏览页面、填写表单、点击按钮、截图等)时使用。
★ 857 📥 336,604
ai-agent

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,429 📥 326,992
ai-agent

self-improving agent

pskoett
记录自身发现以实现自我改进的技能
★ 4,144 📥 918,233