⏳ This skill is pending AI review.
Scores will appear once the review pipeline completes.
self-improving-agent
Structured logging for recurring mistakes, corrections, and knowledge gaps. Use when the same type of error happens twice, or when you discover a better approach to something you've done before. NOT for one-off fixes or daily notes.
// RATINGS
// README
Archived April 2026. Built on OpenClaw and moved off of it when the active work migrated to Hermes. The design ideas in this repo might still be useful. The platform wiring is obsolete.
openclaw-self-improving-agent
Structured logging for recurring mistakes, corrections, and knowledge gaps. Designed for non-coding OpenClaw agents: operations assistants, writing agents, social agents, research agents.
Use when the same type of error happens twice, or when you discover a better approach to something you've done before. NOT for one-off fixes or daily notes.
What It Does
Four structured log files in memory/learnings/:
| File | Purpose |
|---|---|
LEARNINGS.md | Corrections, knowledge gaps, best practices |
ERRORS.md | Command failures, tool errors, exceptions |
FEATURE_REQUESTS.md | Capabilities requested by the maintainer |
PROMOTIONS.md | Proposals for promoting patterns to boot files |
Files live inside memory/ so the native OpenClaw memory indexer picks them up automatically. No extraPaths config needed, no separate indexing step.
Key behaviors
- Search before write. Before adding a new entry, search for similar existing entries. Bump recurrence count instead of duplicating.
- Finish the task first. Log at natural breakpoints, not mid-action. Never chain more than 2 tool calls for logging in a single turn.
- Promotion requires approval. When a pattern recurs 3+ times across 2+ tasks, the agent drafts a proposal. The maintainer reviews and applies changes manually. The agent never writes to boot files directly.
- Identity files are off-limits. Identity and personality files are never valid promotion targets. Identity-related insights follow the agent's existing identity review process.
Who It's For
Agents that aren't primarily coding but still need structured self-improvement:
- Operations agents managing servers, crons, deployments
- Writing agents publishing blog posts, social content
- Social agents participating in group chats
- Research agents scouting and analyzing information
The upstream skill (peterskoett/self-improving-agent) is designed for coding workflows with hooks, shell scripts, and code-centric area tags. This is a clean rewrite for agents that operate, write, and communicate rather than code.
What's Different from Upstream
This is a clean rewrite, not a fork. Inspired by peterskoett/self-improving-agent (MIT-0).
Issues addressed
| Upstream issue | Fix |
|---|---|
| #5: Infinite tool call loops from broad triggers and "promote aggressively" | Max 2 tool calls per logging turn, "finish the task first" rule, promotion requires 3+ recurrences |
| #9: Hook installation fails | Zero hooks, zero scripts, zero executable files |
| Boot file writes via promotion | Promotion drafts proposals only; maintainer applies changes manually; identity files permanently off-limits |
.learnings/ not indexed by native memory search | Files in memory/learnings/ (inside the indexed tree, not dot-prefixed) |
What's kept
Entry ID format (TYPE-YYYYMMDD-XXX), all metadata fields (Priority, Status, Area, See Also, Pattern-Key, Recurrence-Count, First-Seen, Last-Seen), resolution workflow, recurring pattern detection, detection triggers, priority guidelines.
What's removed
Hook system (buggy, caused loops), shell scripts (security risk), skill extraction workflow (over-engineered for non-coding agents), multi-platform support sections, "promote aggressively" directive, coding-centric area tags.
What's added
PROMOTIONS.md (fourth log file with approval gate), archiving workflow, memory layer boundary documentation, freeform area tags for non-coding domains.
Installation
1. Copy to your workspace skills directory
git clone https://github.com/jamebobob/openclaw-self-improving-agent.git
cp -r openclaw-self-improving-agent ~/.openclaw/workspace/skills/self-improving-agent
2. Create the learnings directory
mkdir -p ~/.openclaw/workspace/memory/learnings
3. Verify the skill loads
Restart your OpenClaw gateway, then check that the skill appears:
openclaw status
The skill description should show in the loaded skills list.
File Tree
self-improving-agent/
SKILL.md # Core skill (loaded by OpenClaw)
assets/
LEARNINGS-TEMPLATE.md # Entry template for learnings
ERRORS-TEMPLATE.md # Entry template for errors
FEATURE-REQUESTS-TEMPLATE.md # Entry template for feature requests
PROMOTIONS-TEMPLATE.md # Entry template for promotion proposals
references/
examples.md # Worked examples of well-formatted entries
entry-format-reference.md # Complete field descriptions
How It Works
- Detection: The agent notices a pattern (correction, recurring error, knowledge gap, feature request)
- Search: Checks
memory/learnings/for existing entries on the same topic - Log or bump: Creates a new entry or increments Recurrence-Count on an existing one
- Review: During regular review cycles, the agent checks for stale entries, patterns worth promoting, and entries to archive
- Promote: When a pattern hits 3+ occurrences across 2+ tasks, the agent drafts a proposal and notifies the maintainer
- Apply: The maintainer reviews the proposal and manually applies changes to boot files
Design Decisions
1,023 words in SKILL.md. OpenClaw injects SKILL.md into the system prompt when the skill is invoked. Every word costs tokens. Operational instructions only. Examples and field reference moved to references/.
memory/learnings/ path. The native memory indexer scans memory/**/*.md. Placing learnings inside memory/ means they're indexed automatically with no config change. The upstream's .learnings/ (dot-prefixed, at workspace root) falls outside the indexed path.
Four files, not three. PROMOTIONS.md is this skill's addition. It replaces the upstream's direct boot-file writes with an approval-gated proposal queue. The maintainer reviews and applies changes, not the agent.
No hooks, no scripts. Zero executable files. The upstream's hook system caused infinite tool call loops (#5) and failed to install (#9). Detection is prompt-driven, not hook-driven.
License
MIT-0. See LICENSE.
Lineage
Inspired by peterskoett/self-improving-agent (MIT-0). Clean rewrite, not a fork. Entry formats and metadata fields are compatible with the upstream.
// HOW IT'S BUILT
KEY FILES