闲社服务运行正常AI智能体自动化平台
f

反馈学习系统

技能标识:feedback-learning

Zero-LLM feedback learning system for OpenClaw agents. Detects user feedback (emoji reactions, text signals like "переделай"/"круто"), logs events, discovers recurring patterns, auto-promotes rules, and generates weekly reports. Use when setting up agent self-improvement, configuring feedback detection, or building a learning pipeline. Supports Russian and English. No API keys needed — runs entirely on shell scripts and Python.

作者:admin | 来源记录:ClawHub
登记来源
ClawHub
版本
V 1.0.0
检测标记
后台标记通过
免费
免费获取
0
收藏
来源与检测标记为平台登记信息,并不代表已展示可复核的检测报告。使用前请核对版本、依赖和所需权限,建议先在隔离环境中运行。
概述
安装方式
版本历史

反馈学习系统

反馈学习系统

一个完整的智能体从用户反馈中学习的流程,无需消耗代币进行分析。

架构

用户反馈 → detect-feedback.py → log-event.sh → events.jsonl
↓
weekly-report.py ← analyze-patterns.py
↓
patterns.json
↓ (出现≥3次)
genes.json (已提升的规则)

设置

1. 安装文件

将技能内容复制到共享学习目录:

bash
DEST=$HOME/.openclaw/shared/learning
mkdir -p $DEST/reports
cp scripts/* $DEST/
chmod +x $DEST/log-event.sh
touch $DEST/events.jsonl

2. 初始化数据文件

如果文件不存在,创建空的JSON存储:

bash
cat > $DEST/patterns.json << EOF
{version: 2.0, updated: , patterns: []}
EOF

cat > $DEST/genes.json << EOF
{version: 2.0, rules: []}
EOF

cat > $DEST/capsules.json << EOF
{version: 2.0, capsules: []}
EOF

3. 为每个智能体创建LEARNINGS.md

添加到每个智能体的工作区:

markdown

LEARNINGS.md


最后更新: YYYY-MM-DD
总计: 0

🟢 有效的方法(正面反馈)

(暂无)

🔴 无效的方法(负面反馈)

(暂无)

🧠 提取的规则

(暂无)

🔁 重复出现的模式

(暂无)

💡 功能请求

(暂无)

4. 添加到AGENTS.md

将此块添加到每个智能体的AGENTS.md启动序列中:

markdown

反馈学习


  • - 收到正面反馈(👍❤️🔥👏💯或类似круто、топ、зашло等词语):

运行:bash ~/.openclaw/shared/learning/log-event.sh <智能体名称> positive user_emoji <上下文> <信号>
  • - 收到负面反馈(👎🤦😤或类似фигня、переделай等词语):

运行:bash ~/.openclaw/shared/learning/log-event.sh <智能体名称> correction user_nlp <上下文> <信号> <提示>
  • - 执行错误时:

运行:bash ~/.openclaw/shared/learning/log-event.sh <智能体名称> error exec_fail <上下文> <信号> <提示>

5. 设置定时任务

模式分析(每日):

schedule: cron 30 3 * @ <时区>
payload: python3 ~/.openclaw/shared/learning/analyze-patterns.py

周报(周日):

schedule: cron 30 4 0 @ <时区>
payload: python3 ~/.openclaw/shared/learning/weekly-report.py

使用方法

手动记录事件

bash
bash log-event.sh anton error exec_fail 配置更新 JSON中尾随逗号 写入前验证JSON
bash log-event.sh anton positive user_emoji 发送报告 🔥
bash log-event.sh anton correction user_nlp 发送消息 重做,格式不对 发送前确认格式

从文本检测反馈(无需LLM)

bash
echo круто, зашло! | python3 detect-feedback.py

→ {type: positive, source: user_nlp, signal: круто, confidence: 0.8}

python3 detect-feedback.py переделай это

→ {type: correction, source: user_nlp, signal: переделай, confidence: 0.8}

运行模式分析

bash
python3 analyze-patterns.py

输出:模式计数、提升状态。更新patterns.json。当某个模式在30天内出现≥3次时,自动提升到genes.json。

生成周报

bash
python3 weekly-report.py

保存到reports/WEEKLYREPORTYYYY_WNN.md,包含按智能体、来源统计的数据、主要模式和新提升的规则。

数据文件

文件用途
events.jsonl仅追加的事件日志(所有反馈)
patterns.json
分组后的重复模式及其计数 | | genes.json | 已提升的规则(出现≥3次 → 活跃规则) | | capsules.json | 成功的推理路径(避免重复计算) | | reports/ | 每周综合报告 |

事件模式

json
{
ts: 2026-03-20T12:00:00Z,
agent: anton,
type: error|correction|positive|pattern|requery,
source: execfail|usernlp|user_emoji|requery|auto,
context: 智能体正在执行的操作,
signal: 触发文本或表情符号,
hint: 建议的修复或规则,
heat: 1
}

提升流程

  1. 1. 事件累积在events.jsonl中
  2. analyze-patterns.py按信号文本对相似事件进行分组(相似度≥60%)
  3. 30天内出现≥3次的模式被提升到genes.json
  4. 智能体在启动时读取genes.json以应用学到的规则
  5. weekly-report.py综合进展供人工审查

支持的语言

反馈检测支持:

  • - 俄语:20+个负面触发词,19+个正面触发词,修正模式
  • 英语:10个负面触发词,8个正面触发词
  • 表情符号:通用的正面/负面反应

标签

skill ai

通过对话安装

以下为平台配置的接入选项,并非逐项实测通过。能否安装取决于客户端支持、技能来源和运行环境:

OpenClaw WorkBuddy QClaw Kimi Claude

方式一:安装 SkillHub 和技能

帮我安装 SkillHub 和 feedback-learning-1776120062 技能

方式二:设置 SkillHub 为优先技能安装源

设置 SkillHub 为我的优先技能安装源,然后帮我安装 feedback-learning-1776120062 技能

通过命令行安装

skillhub install feedback-learning-1776120062

下载

⬇ 下载 feedback-learning v1.0.0(免费)

文件大小: 9.19 KB | 发布时间: 2026-4-14 12:18

v1.0.0 最新 2026-4-14 12:18
- Initial release of the feedback-learning skill.
- Provides a shell/Python-based feedback learning system for OpenClaw agents—no LLMs or API keys required.
- Detects user feedback (emoji and common Russian/English text signals), logs events, groups recurring patterns, promotes auto-learned rules, and generates weekly reports.
- Includes setup guides for installation, agent workspace integration, and scheduled reporting/analysis.
- Supports both Russian and English feedback, tracks event and pattern data, and exposes structured promotion of recurring user requests to agent rules.
返回顶部