Token导航 LogoToken导航TokenDH.com
研究检索敏感数据clawhub未标认证来源可访问clear审计提醒

hermes-learning-loop爱马仕学习循环

Agent Skill

hermes-learning-loop 用于记录任务执行中的错误、用户纠正、经验和能力缺口,适合在 OpenClaw 中希望让 Agent 持续沉淀问题、修正和最佳实践时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

4,749

周安装

194

GitHub Stars

公开资料未说明

下载量

1,536
OpenClaw

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

MIT-0

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:hermes-learning-loop(爱马仕学习循环)
来源仓库:https://github.com/mystour/hermes-learning-loop
安装命令:
openclaw skills install hermes-learning-loop
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 OpenClaw 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

ClawHubOpenClaw
openclaw skills install hermes-learning-loop

简介

受 Hermes Agent 启发的自我完善学习循环。自动提取成功的工作流程、创建技能并在会话中保留知识。

SKILL.md

name
hermes-learning-loop
description
Self-improving learning loop inspired by Hermes Agent. Automatically extracts successful workflows, creates skills, and persists knowledge across sessions.
tags
learning, self-improvement, memory, skill-creation, automation, hermes
version
1.0.0

Hermes Learning Loop for OpenClaw

Inspired by: NousResearch/hermes-agent (Self-improving AI agent)

Implements Hermes Agent's core learning loop in OpenClaw — automatically extracts successful workflows, creates reusable skills, and persists curated knowledge across sessions.

When to Use

  • After completing complex multi-step tasks
  • When you discover a workflow worth repeating
  • Automatically via heartbeat (periodic nudge)
  • When user says "remember this" or "save this workflow"

Features

  • Periodic Nudge — Auto-reflect every N tasks (default: 5)
  • Skill Extraction — Convert successful workflows to reusable skills
  • 4-Layer Memory — Prompt memory + Session search + Skills + User modeling
  • Curated Memory — Agent decides what's worth keeping (not logging everything)
  • Progressive Disclosure — Only load skill summaries by default, full content on-demand
  • FTS5 Session Search — SQLite-powered historical context retrieval

Quick Start

Install

clawhub install hermes-learning-loop

Manual Trigger

# After completing a task
node learning-loop.js extract --session=<session_id>

# Create skill from workflow
node learning-loop.js create-skill --name="my-skill" --description="What it does"

# Periodic nudge (heartbeat)
node learning-loop.js nudge

Auto-Trigger (Integration)

Add to HEARTBEAT.md:

## Learning Loop - Periodic Nudge

**Frequency:** Every 5 tasks or 30 minutes

**Task:**
1. Run `node learning-loop.js nudge`
2. Review extracted memories
3. Approve/reject skill creations

Architecture

Learning Loop Cycle

┌─────────────────────────────────────────────────────────┐
│  1. Task Execution                                      │
│     - Agent completes task                              │
│     - Track tool calls, decisions, outcomes             │
└──────────────┬──────────────────────────────────────────┘
               │
               ▼
┌─────────────────────────────────────────────────────────┐
│  2. Periodic Nudge (every 5 tasks)                      │
│     - System prompt: "Reflect on recent activity"       │
│     - Agent evaluates: Is this worth persisting?        │
└──────────────┬──────────────────────────────────────────┘
               │
               ▼
┌─────────────────────────────────────────────────────────┐
│  3. Memory Extraction                                   │
│     - If valuable → Write to MEMORY.md / USER.md        │
│     - If workflow → Create skill file                   │
│     - If context → Index in session archive             │
└──────────────┬──────────────────────────────────────────┘
               │
               ▼
┌─────────────────────────────────────────────────────────┐
│  4. Skill Creation                                      │
│     - Extract steps, tool calls, file references        │
│     - Write to ~/.openclaw/skills/<category>/<name>/   │
│     - Follow agentskills.io specification               │
└─────────────────────────────────────────────────────────┘

4-Layer Memory System

LayerPurposeLocationLoad Timing
Prompt MemoryAlways-on contextMEMORY.md, USER.mdEvery session start
SkillsProcedural memory (how-to)~/.openclaw/skills/On-demand (summary → full)
Session ArchiveEpisodic memory (what happened)SQLite + FTS5Deliberate retrieval
User ModelBehavioral patternsOptional (Honcho-like)Continuous passive

Skill Triggers

Automatically create skill when:

  • ✅ 5+ tool calls in sequence
  • ✅ Recovered from error successfully
  • ✅ User corrected → fixed approach
  • ✅ Non-obvious workflow that worked
  • ✅ Repeated pattern detected (3+ times)

Usage Examples

Example 1: Post-Task Skill Extraction

# After completing complex deployment
export SESSION_ID="2026-04-03-deploy"
export TASK_OUTCOME="success"
export TOOL_CALLS="15"

node learning-loop.js extract

Output:

📊 Learning Loop Analysis

✅ Task completed successfully
📈 Tool calls: 15
⚠️  Error recovery: 2 instances
💡  User corrections: 1

🎯 Skill-worthy detected: YES

Proposed skill:
  Name: deploy-to-k8s
  Description: Deploy application to Kubernetes with health checks
  Steps: 7
  Tool calls: 15

📄 Created: ~/.openclaw/skills/devops/deploy-to-k8s/SKILL.md

Example 2: Periodic Nudge

# Heartbeat triggers this
node learning-loop.js nudge

Output:

🔔 Periodic Nudge - Task #5

Looking back at tasks 1-5...

Task 1: ✅ Simple (no extraction needed)
Task 2: ✅ Complex workflow detected
  → Extracted: "github-pr-workflow"
Task 3: ✅ Error recovery pattern
  → Extracted: "debug-python-import"
Task 4: ✅ Simple
Task 5: ✅ User correction applied
  → Updated: "github-pr-workflow" (v1.0.1)

📊 Summary:
  - New skills: 2
  - Updated skills: 1
  - Memory entries: 3

Example 3: Memory Curation

# Review what's worth keeping
node learning-loop.js curate --session="2026-04-03"

Decision Framework:

┌──────────────────────────────────────────────────────┐
│ Should this be persisted?                            │
├──────────────────────────────────────────────────────┤
│ ❌ Chat pleasantries → Discard                       │
│ ❌ Failed attempts → Discard (keep only success)     │
│ ✅ Successful workflows → Extract as skill           │
│ ✅ User preferences → Add to USER.md                 │
│ ✅ Project context → Add to MEMORY.md (project/)     │
│ ✅ Corrections/feedback → Add to MEMORY.md (feedback/)│
└──────────────────────────────────────────────────────┘

Configuration

Environment Variables

VariableDescriptionDefault
LEARNING_NUDGE_INTERVALTasks between nudges5
LEARNING_MIN_TOOL_CALLSMin tool calls for skill5
LEARNING_AUTO_CREATEAuto-create skills (vs approve)false
LEARNING_SKILLS_DIRSkills directory~/.openclaw/skills/
LEARNING_MEMORY_DIRMemory directory~/.openclaw/memory/

Config File

# ~/.openclaw/learning-loop.yaml
learning:
  nudge:
    enabled: true
    interval: 5  # tasks
    
  skill_creation:
    auto_approve: false  # Review before creating
    min_tool_calls: 5
    categories:
      - devops
      - research
      - productivity
      
  memory:
    max_prompt_chars: 3575  # Hermes-style tight limit
    archive_enabled: true
    fts5_enabled: true

Skill File Format

Follows agentskills.io specification:

---
name: deploy-to-k8s
description: Deploy application to Kubernetes with health checks
version: 1.0.0
platforms: [linux, macos]
metadata:
  tags: [kubernetes, devops, deployment]
  category: devops
  created_from: session-2026-04-03
---

# deploy-to-k8s

## Overview

Deploy any application to Kubernetes cluster with automated health checks and rollback.

## Prerequisites

- kubectl configured
- Kubernetes cluster access
- Docker image ready

## Steps

1. **Validate cluster connection**

kubectl cluster-info


2. **Apply deployment manifest**

kubectl apply -f deployment.yaml


3. **Wait for rollout**

kubectl rollout status deployment/app


4. **Health check**

kubectl get pods -l app=myapp


5. **Verify service**

kubectl get svc app-service


## Tool Calls Used

- `exec`: kubectl commands
- `read`: deployment.yaml
- `web_search`: Kubernetes docs (if errors)

## Related Skills

- `docker-build-optimization`
- `k8s-troubleshooting`

Integration with OpenClaw

Heartbeat Integration

## HEARTBEAT.md Update

### Learning Loop - Periodic Nudge

**Frequency:** Every 5 tasks

**Steps:**
1. Check task counter
2. If counter % 5 == 0 → Run nudge
3. Review proposed skills/memories
4. Approve/reject
5. Reset counter

PUA Integration

# Task PUA can trigger learning loop
if task.failed && task.recovered:
  node learning-loop.js extract --reason="error-recovery"
  
if task.pua_level >= "L2":
  # Complex task → likely skill-worthy
  node learning-loop.js nudge

Memory PUA Integration

# Memory health check includes learning loop status
node memory-pua.js audit

# Output includes:
# - Skills created this week
# - Memories curated
# - Nudge effectiveness

Comparison: Hermes vs This Implementation

FeatureHermes AgentThis Skill
Periodic Nudge✅ Built-in✅ Via heartbeat
Skill Auto-Creation✅ Full auto⚠️ Opt-in approval
4-Layer Memory✅ SQLite + FTS5⚠️ Markdown + optional SQLite
Progressive Disclosure✅ Summary → Full✅ Same pattern
User Modeling (Honcho)✅ Optional❌ Not implemented
Gateway Integration✅ Multi-platform⚠️ OpenClaw channels only
Context Compression✅ Lineage-aware⚠️ Basic summarization

Benefits

  • Curated not dumped — Agent decides what's worth keeping
  • Token-efficient — Progressive disclosure keeps context small
  • Portable skills — Follows agentskills.io standard
  • Self-improving — Gets better the more you use it
  • OpenClaw native — Works with existing memory system

Related Skills

  • claude-memory-optimizer: Memory structure and migration
  • task-pua: Task persistence and quality
  • memory-pua: Memory health maintenance

References

  • Hermes Agent: https://github.com/NousResearch/hermes-agent
  • Hermes Docs: https://hermes-agent.nousresearch.com/
  • agentskills.io: https://agentskills.io/specification
  • FTS5 Docs: https://www.sqlite.org/fts5.html

License

MIT-0


*Version 1.0.0: Initial implementation inspired by Hermes Agent learning loop*

适合场景

01

OpenClaw 用户查找和安装 Skill 时

02

用户想查找某类 Agent Skill 时

03

需要根据任务场景推荐可安装能力包时

04

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

补充不同宿主或平台的使用分布数据

能力 5

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

OpenClaw

77.87%
按下载量换算1,196

安全审计

VirusTotal

通过

ClawScan

可疑

Static analysis

可疑

权限和风险

敏感数据

该 Skill 可能接触密钥、Token、环境变量或敏感配置,应进入高风险复核队列,默认不自动发布。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills