Self-Improvement Loop for Openclaw

A self-evolving protocol for AI agents to continuously analyze execution traces, mine weaknesses, generate optimal fixes, and validate improvements over multiple sessions.

qqyougitcom
v2.0.0
Jun 19, 2026
0
487
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install mimo-self-improvement-loop

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install mimo-self-improvement-loop using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Self-Improvement Loop?

The Self-Improvement Loop is an advanced cognitive architecture that enables AI agents to autonomously learn and improve from their own execution experiences. Utilizing a sophisticated three-tier agent framework (Meta-Agent, Target Agent, Feedback Agent, and Validator Agent) integrated with the Self-Harness research methodology, this system moves beyond static prompt engineering. It actively analyzes execution traces to discover design flaws, context errors, and tool misuses, and then deploys validated, low-risk patches directly to the agent's skillset.

By integrating this framework with Openclaw Skills, developers can deploy self-correcting agents capable of boosting their own task performance by 33% to 60%. Instead of forgetting past mistakes or entering endless retry loops, the agent logs deep execution traces, updates persistent JSON memory schemas, and implements regression tests to ensure every performance adjustment represents a genuine evolutionary step forward rather than a regression.

Self-Improvement Loop Use Cases

  • Automating Post-Task Audits: Triggering an automatic review of performance metrics and trace analysis immediately after completing critical development milestones.
  • Preventing Repeated Mistakes: Checking against historical failure logs to stop recurring tool selection or context-handling issues before they impact the live environment.
  • Quantifying Skill Upgrades: Verifying if changes to prompt structures, agent logic, or tool execution paths result in actual performance improvements or regressions.
  • Continuous Evolutionary Runs: Running scheduled hourly evaluations to audit agent behaviors, catch trace anomalies, and discover latent optimization targets.

How Self-Improvement Loop Works

  1. Phase 0 - Weakness Mining: The system parses raw execution traces to discover repeating errors, misaligned context parameters, or planning failures, storing found weaknesses in a structured repository.
  2. Phase 1 - Execution Logging: Metadata, specific execution steps, and tool actions are logged into highly structured JSON formats alongside rigorous anti-rationalization checks.
  3. Phase 2 - Feedback Analysis: An dedicated audit agent reviews both execution traces and the weakness database to generate actionable, targeted feedback.
  4. Phase 3 - Proposal Generation: A minimal, testable improvement proposal is designed, outlining clear objectives, testing procedures, and roll-back strategies.
  5. Phase 4 - Risk-Aware Application: Changes are deployed based on risk categories—ranging from direct updates for low-risk changes to explicit user confirmation for high-risk modifications.
  6. Phase 5 - Regression Validation: A verification agent executes targeted task suites to benchmark modifications, promoting changes to the baseline only if performance gains are confirmed.

Self-Improvement Loop Setup

To integrate the self-improvement-loop skill into your agent workspace, configure the file layout and install the required schemas within your Openclaw Skills workspace:

# Navigate to your workspace directory
cd my-ai-agent-workspace

# Create the necessary evolution directories
mkdir -p recent_memory/evolution/proposals recent_memory/evolution/validations

# Initialize the required metrics and weakness files
echo '[]' > recent_memory/evolution/weaknesses.json
echo '[]' > recent_memory/evolution/mistakes.json
echo '[]' > recent_memory/evolution/metrics.json

Add the configuration block into your workspace's master ruleset to enable the evolutionary orchestrator.

Self-Improvement Loop Data Schema & Taxonomy

The framework manages cross-session memory and performance monitoring using a structured, file-based schema layout inside the recent_memory/evolution/ path. Key data schemas include:

File Format Description
weaknesses.json JSON Holds identified weakness patterns, their impact, last occurrence, and suggested fixes.
mistakes.json JSON Tracks historically committed errors to enforce active avoidance checks in active sessions.
metrics.json JSON Stores evolutionary timeseries statistics like pass rates, execution durations, and rollback rates.
proposals/ Folder Contains documented improvement proposals detailing testing suites and fallback rollbacks.
validations/ Folder Empirical results from benchmark evaluations validating proposal effectiveness.

Self-Improvement Loop Advanced Features

  • Self-Harness Optimization Engine: Dynamically identifies, isolates, and self-corrects specific agent performance weaknesses to boost overall target metrics.
  • Multi-Agent Orchestration: Seamlessly coordinates specialized sub-agents (Target, Feedback, Validator) led by a main Meta-Agent to split execution from audit phases.
  • Integrated Anti-Rationalization Guardrails: Counteracts common AI self-justifications and ensures objective evaluation of execution failures.
  • Seamless Integration with Sister Protocols: Interlocks natively with doubt-driven-development, test-driven-development, and subagent-driven-development workflows to enrich weakness discovery data.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*