Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

15.4 Core: Self-Evolving Skills Loop

☤ "Hermes' sharpest knife: let the Agent write its own skills and iterate them itself."


The Problem

Traditional Agent skills are hand-written (OpenClaw / Claude Code's SKILL.md). Two ceilings: incomplete coverage (humans can't pre-write everything) and no adaptation (skills don't follow a user's workflow change).

Hermes' answer is Self-Evolving Skills — after a task, the Agent itself distills the trajectory into a skill, then improves it in use.

Self-evolving loop


The 5-Stage Loop

task done → ① evaluate → ② extract → ③ save draft → ④ iterate in use → ⑤ prune/reinforce

① Evaluate (should I extract?)

SignalThresholdMeaning
Task steps≥ 5complex enough to persist
Repetitionsame task ≥ 2 timesrepetitive = automate
Explicit feedback"remember this flow"strong signal
Successtask succeededdon't distill failures

② Extract (SKILL.md)

Feed the trajectory to an LLM to produce structured SKILL.md (frontmatter + trigger + flow + constraints).

③ Save as Draft

~/.hermes/skills/summarize-inbox/
├── SKILL.md      # frontmatter status: draft
└── meta.json     # source trajectory, created time, confidence

Drafts are not immediately active — user approves first.

④ Iterate in Use (offline self-improve)

Each invocation records results; offline, DSPy/GEPA-style tuning reinforces successful steps and weakens failing ones.

⑤ Prune / Reinforce

Weekly review classifies skills: healthy (keep) / needs-improvement (self-improve) / dying (prompt user).


A Concrete Example

User: "organize my inbox, categorize by topic, and summarize."

  1. Execute: Agent does it in 8 steps;
  2. Evaluate: 8 ≥ 5 → worth distilling;
  3. Extract: generates summarize-inbox skill (read→categorize→summarize→report);
  4. Save draft;
  5. Next time: "organize email" triggers the skill instead of re-planning;
  6. Iterate: a mis-categorization is recorded and the rule corrected.

📌 A normal Agent re-plans from scratch on the 6th run; Hermes' 6th run uses its own skill, refined through 5 iterations.


vs a Human-Maintained Skill Library

DimensionHand-written (OpenClaw)Self-evolving (Hermes)
Sourcehumanhuman + Agent
Iterationhuman releasesAgent offline auto
Coveragehuman imaginationactual task trajectories
Personalizationgenericuser-specific
Auditeasyneeds draft + audit

Safety Boundary (Why It's Not "Out of Control")

  1. Draft mechanism — new skills are status: draft until approved;
  2. Security audit — distilled SKILL.md passes permission checks (tools/permissions);
  3. Rollback — skills keep versions;
  4. User veto — hermes skills disable <name> anytime.
hermes skills list              # active/draft/disabled with versions
hermes skills approve summarize-inbox
hermes skills rollback summarize-inbox v2

Section Summary

TopicKey point
5 stagesevaluate → extract → save draft → iterate → prune
Signalssteps / repetition / feedback / success
IterationDSPy/GEPA offline
Safetydraft + audit + rollback + veto
Essencefrom "human writes skills" to "Agent writes + iterates"

Next section: 15.5 Three-Layer Memory