360 Secure SkillHub
360 安全技能中心

Skill

面向 AI 智能体的自我改进技能,通过 Python 脚本收集用户反馈(含正面与负面反馈)、提取改进提示,并以 Binary RL 评估、多臂老虎机策略进行校准、策略、价值和上下文学习,把学到的规则注入会话;附带后台学习守护进程与状态查询脚本。

petercheng
petercheng
热度 29.80
最近更新 2026-04-30 13:40:48
分类:知识依赖:代码执行 / 读写文件应用场景:工作流 / 自动化脚本

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add opensourceclaw-claw-rl
Metadata
name
claw-rl
description
Self-Improvement System for AI agents. Use when: (1) collecting user feedback (thumbs up/down, corrections), (2) extracting improvement hints from user messages, (3) learning from mistakes and preferences, (4) injecting learned rules into sessions. Features Binary RL evaluation, OPD hint extraction, Multi-Armed Bandit strategy selection, and continuous background learning.
homepage
https://github.com/opensourceclaw/claw-rl
metadata
{"clawdbot":{"emoji":"🔄","requires":{"bins":["python3"],"packages":["claw-rl"]}}}

claw-rl: Self-Improvement System for AI agents

Self-improvement system for AI agents with reinforcement learning and continuous learning.

Prerequisites

pip install claw-rl

Quick Start

Collect Feedback

python3 {baseDir}/scripts/collect_feedback.py "Great job!" --action file_created
python3 {baseDir}/scripts/collect_feedback.py "Wrong, use Chinese instead" --action response --negative

Get Learned Rules

python3 {baseDir}/scripts/get_rules.py --top-k 10
python3 {baseDir}/scripts/get_rules.py --context "user preference"

Check Learning Status

python3 {baseDir}/scripts/status.py

Start Learning Daemon

python3 {baseDir}/scripts/daemon.py start
python3 {baseDir}/scripts/daemon.py stop
python3 {baseDir}/scripts/daemon.py status

Core Components

Component Purpose Example
Binary RL Judge Evaluate satisfaction from feedback 👍 → positive, 👎 → negative
OPD Extractor Extract improvement hints "Use Chinese" → rule hint
Learning Loop Continuous background learning Process feedback queue
MAB Strategy Strategy selection via bandits Thompson Sampling, ε-greedy

Learning Modes

Mode Description Use Case
calibration Calibration learning User satisfaction calibration
strategy Strategy learning Action selection optimization
value Value preference learning User preference learning
context Context-aware learning Situational rules

Configuration

OpenClaw config (openclaw.config.json):

{
  "plugins": {
    "slots": {
      "context-engine": "claw-rl"
    },
    "claw-rl": {
      "config": {
        "workspaceDir": "~/.openclaw/workspace",
        "autoInject": true,
        "autoLearn": true,
        "topK": 10
      }
    }
  }
}

Performance

Operation Latency
Initialize ~2ms
Collect feedback ~0.03ms
Extract hint ~1ms
Get rules ~0.7ms
Process learning ~0.5ms

Advanced

See references for detailed documentation: