← 返回
未分类 中文

Procedural Memory

Inspired by Hermes Agent's procedural memory system. When a workflow works, save it as a reusable skill. Triggered when: (1) user says 'remember this workflo...
受Hermes Agent程序记忆系统启发。当工作流成功时,将其保存为可复用技能。触发条件:①用户说“记住此工作流”。
chenjin113
未分类 clawhub v1.4.0 1 版本 100000 Key: 无需
★ 0
Stars
📥 411
下载
💾 0
安装
1
版本
#latest

概述

Procedural Memory — Automatic Workflow Memory

> _"When a workflow works, save it as a reusable skill."_

Inspired by Hermes Agent's core feature: an agent that learns from experience by saving successful workflows as reusable skills.


Directory Prerequisites

mkdir -p ~/self-improving
mkdir -p ~/.openclaw/workspace/skills

The log file ~/self-improving/procedural-memory-log.md will be created automatically if missing.


Trigger Conditions (Priority Order)

🔴 High Priority — Explicit User Request

  • "记住这个workflow" / "remember this workflow"
  • "以后遇到类似就这样做" / "do this next time"
  • "这个方法很好,以后也这样用" / "this works, use it again"
  • "这个技巧值得记住" / "this is worth remembering"

🟡 Medium Priority — Proactive Review

  • End of day (or user says "review")
  • After a complex task completes successfully

🟢 Low Priority — Pattern Recognition

  • Same workflow applied successfully 2+ times
  • Recurring solutions discovered

Workflow

Step 1 — Evaluate Worthiness

Must meet ALL:

  • ✅ Takes 3+ steps to complete
  • ✅ Likely applicable to future conversations
  • ✅ Not one-time / context-specific
  • ✅ User would benefit

Auto-trigger: If the same workflow succeeds 3+ times, auto-create skill WITHOUT asking (记录到日志即可)。

Otherwise: ask user "我可以把这个 workflow 存为 skill 吗?"

If user confirms → continue. Otherwise → silent skip.

Step 2 — Check for Conflicts

ls ~/.openclaw/workspace/skills/ | grep <keyword>
  • Same name exists → log "already exists, skip"
  • Similar function exists → consider merge or append

Step 3 — Extract Pattern

Record:

**Skill Name**: [verb]-[problem] (kebab-case)
**Trigger**: [when this would be used]
**Problem Solved**: [what issue this solves]
**Steps**: [numbered list]
**Key Insight**: [why this works]
**Limitations**: [when NOT to use]

Step 4 — Create Skill File

Create ~/.openclaw/workspace/skills/[skill-name]/SKILL.md:

---
name: [skill-name]
description: "[one-line description of when to use]
---
# [Skill Name]

## What This Solves
[trigger conditions and problem]

## When to Use
- [specific scenario 1]
- [specific scenario 2]

## How To Execute
[Step 1]
[Step 2]
[Step 3...]

## Key Insight
[why this is effective]

## Limitations
[when this won't work]

Step 5 — Validate

ls ~/.openclaw/workspace/skills/[skill-name]/SKILL.md
head -20 ~/.openclaw/workspace/skills/[skill-name]/SKILL.md

Recreate if corrupted.

Step 6 — Log

Append to ~/self-improving/procedural-memory-log.md:

## YYYY-MM-DD

### [skill-name]
- **Trigger**: [what triggered this]
- **Problem solved**: [what was solved]
- **Key insight**: [the key learning]
- **Skill file**: `~/.openclaw/workspace/skills/[skill-name]/SKILL.md`

Step 7 — Notify User

Tell user the skill was created and ask if they want to enable auto-execution:

> "已记住这个 workflow,存为 skill/[skill-name]。是否需要我下次遇到类似情况时自动执行?"

Default behavior: Do NOT auto-execute without user confirmation.


Skill Loading

When new conversation context matches a saved skill's trigger:

  1. Load the skill's SKILL.md
  2. Ask user: "我之前学过这个,要我用这个方法吗?"
  3. Only execute AFTER user confirms
  4. Never auto-execute without explicit user approval

Privacy Consideration

  • This skill scans conversation history to identify worth-saving workflows
  • Derived content is persisted to disk (~/.openclaw/workspace/skills/ and ~/self-improving/)
  • Sensitive conversation data may be captured — user is responsible for what they share in conversations
  • Log files contain pattern summaries, not raw conversation, but could still contain sensitive references
  • Users should be aware of what they discuss with the agent

End-of-Day Review Prompt

When user says "复盘" or at end of day:

> "今天有什么 workflow 值得我记住吗?"

Scan today's conversation for:

  • Complex but successful tasks
  • Repeatedly used techniques
  • Reusable solutions

References

  • Skill Creator Guide: ../skill-creator/SKILL.md
  • Self-Improving Memory: ~/self-improving/memory.md
  • Procedural Memory Log: ~/self-improving/procedural-memory-log.md

版本历史

共 1 个版本

  • v1.4.0 当前
    2026-05-03 08:41 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

developer-tools

Github

steipete
使用 `gh` CLI 与 GitHub 交互,通过 `gh issue`、`gh pr`、`gh run` 和 `gh api` 管理议题、PR、CI 运行及高级查询。
★ 672 📥 324,539
ai-intelligence

Self-Improving + Proactive Agent

ivangdavila
自我反思+自我批评+自我学习+自组织记忆。智能体评估自身工作、发现错误并持续改进。
★ 1,363 📥 319,063
security-compliance

Skill Vetter

spclaudehome
AI智能体技能安全预审工具。安装ClawdHub、GitHub等来源技能前,检查风险信号、权限范围及可疑模式。
★ 1,219 📥 266,879