← 返回 Skills 市场
Agent Memory Loop
作者
Don Zurbrick
· GitHub ↗
· v2.1.1
· MIT-0
368
总下载
0
收藏
5
当前安装
3
版本数
在 OpenClaw 中安装
/install agent-memory-loop
功能描述
Lightweight self-improvement loop for AI agents. Capture errors, corrections, and discoveries in a fast one-line format, dedup them, queue recurring or criti...
使用说明 (SKILL.md)
Agent Memory Loop
Lightweight learning for agents that reset between sessions.
Use this when
- you want a low-friction way to log mistakes, corrections, and discoveries
- you need recurring lessons without bloating core instructions
- you want human-reviewed promotion instead of auto-writing to instruction files
- you want a quick pre-task scan for known failure patterns
Do not use it for
- autonomous self-modification
- external content promotion
- heavy multi-section incident writeups by default
- dashboards, registries, or process ceremony
Core workflow
error / correction / discovery
↓
log one line in .learnings/
↓
dedup by id, then keyword
↓
count:3+ or severity:critical → promotion-queue
↓
human reviews promotion
↓
check relevant learnings before major work
↓
increment prevented:N when a learning actually changed behavior
Install
bash scripts/install.sh
Creates:
.learnings/
errors.md
learnings.md
wishes.md
promotion-queue.md
details/
archive/
Minimal instruction snippet
Add this to your agent instructions:
## Self-Improvement
Before major tasks: grep .learnings/*.md for relevant past issues.
After errors or corrections: log a one-line entry using agent-memory-loop.
Never auto-write to SOUL.md, AGENTS.md, TOOLS.md, or similar instruction files.
Stage candidate rule changes in .learnings/promotion-queue.md for human review.
The format, in short
One incident or discovery per line. Extra fields are optional.
[YYYY-MM-DD] id:ERR-YYYYMMDD-NNN | COMMAND | what failed | fix | count:N | prevented:N | severity:medium | source:agent
[YYYY-MM-DD] id:LRN-YYYYMMDD-NNN | CATEGORY | what | action | count:N | prevented:N | severity:medium | source:agent
[YYYY-MM-DD] CAPABILITY | what was wanted | workaround | requested:N
[YYYY-MM-DD] id:LRN-YYYYMMDD-NNN | proposed rule text | target: AGENTS.md | source:agent | evidence: count:N prevented:N | status: pending
Key fields:
count:Ntracks recurrenceprevented:Ntracks loop closureseverity:criticalforces review even at count 1source:externalis never promotable
Operating rules
- Log fast; prefer a one-line entry over a perfect writeup
- Dedup before appending
- Queue recurring or critical lessons for review
- Humans approve promotions; agents do not
- Before major work, scan for relevant prior failures
- If a learning prevented a repeat mistake, record that with
prevented:N
References
references/logging-format.md— canonical line formats, fields, examples, source labelsreferences/operating-rules.md— dedup, review queue, pre-task review, trimming rulesreferences/promotion-queue-format.md— queue entry structure and status lifecyclereferences/detail-template.md— optional detail-file template for complex failuresreferences/design-tradeoffs.md— why this stays lean instead of turning into a system
Assets and scripts
assets/errors.mdassets/learnings.mdassets/wishes.mdassets/promotion-queue.mdscripts/install.shscripts/setup.shscripts/review.sh
Success condition
The loop is working if agents actually use it:
- learnings are cheap to log
- duplicates stay low
- recurring lessons reach the queue
- promotions stay human-approved
prevented:Nstarts climbing on real work
安全使用建议
This skill appears coherent and local-only: it sets up a .learnings folder, provides grep/date-based review tooling, and explicitly avoids auto-writing instruction files. Before installing: (1) inspect scripts (they are short and local) and run them in a safe workspace (not system root) to avoid accidental file changes; (2) ensure your agent/human reviewers follow the source labeling convention (mislabeling an external finding as source:agent could bypass the intended review protection); (3) run review.sh periodically to surface pending promotions and stale items; and (4) if you rely on date features, test review.sh on your platform (the script tries BSD/GNU date variants). If you need stricter guarantees, add automation that enforces source labels or restricts who can change promotion-queue.md.
功能分析
Type: OpenClaw Skill
Name: agent-memory-loop
Version: 2.1.1
The agent-memory-loop skill is a well-documented utility designed to help AI agents track errors and learnings across sessions. The scripts (install.sh, review.sh) use standard POSIX tools for local file management and reporting without any network activity or suspicious execution. Notably, the skill includes explicit defenses against prompt injection by implementing source labeling (e.g., source:external) and requiring human approval before any learnings are promoted to core instruction files.
能力评估
Purpose & Capability
Name/description match behavior: the skill provides local one-line learnings, dedup, and a promotion queue. Required binaries (grep, date) and included scripts are appropriate and proportional to the stated purpose.
Instruction Scope
SKILL.md limits actions to creating and scanning .learnings/*.md, queuing candidates, and asking humans to approve promotions. Instructions do not reference external endpoints, unrelated config paths, or secret environment variables. The workflow relies on conventions (source:agent/user/external) which must be followed to be effective.
Install Mechanism
No external install spec; included install/setup scripts only create a local .learnings directory and copy bundled assets. No downloads from arbitrary URLs or archive extraction are present.
Credentials
No environment variables or credentials are required. The skill reads and writes only to a workspace-local .learnings directory, which is appropriate for its purpose.
Persistence & Privilege
always:false and normal agent invocation are used. The skill does not modify other skills or system-wide agent settings. It intentionally advises against auto-writing instruction files (promotions require human approval).
如何使用
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install agent-memory-loop - 安装完成后,直接呼叫该 Skill 的名称或使用
/agent-memory-loop触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v2.1.1
Tightened the runtime entrypoint, split logging and operating rules into focused references, and updated README messaging and links.
v2.0.0
v2.0.0: Council-reviewed rewrite. Critical fixes: auto-promotion killed (review queue), injection defense (source labels), severity-aware triggers, prevention tracking with evidence notes, structured IDs, optional detail files, expiry dates.
v1.0.0
Lightweight self-improvement system for AI agents. One-line log format, auto-dedup, auto-promote at count:3+, pre-task review. 233 lines vs 647 — designed by an agent that actually uses it. Includes setup script, review script, and starter templates.
元数据
常见问题
Agent Memory Loop 是什么?
Lightweight self-improvement loop for AI agents. Capture errors, corrections, and discoveries in a fast one-line format, dedup them, queue recurring or criti... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 368 次。
如何安装 Agent Memory Loop?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install agent-memory-loop」即可一键安装,无需额外配置。
Agent Memory Loop 是免费的吗?
是的,Agent Memory Loop 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
Agent Memory Loop 支持哪些平台?
Agent Memory Loop 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 Agent Memory Loop?
由 Don Zurbrick(@zurbrick)开发并维护,当前版本 v2.1.1。
推荐 Skills