Max-Self-Improvement for Openclaw

An advanced self-evolution and 5-layer memory architecture that enables AI agents to learn from errors, remember user preferences, and optimize performance over time.

ruiyongwang
v1.0.1
Apr 28, 2026
0
743
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install max-self-improvement

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 max-self-improvement 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 Max-Self-Improvement?

Max-Self-Improvement is a sophisticated framework designed to transform standard AI interactions into a continuous learning experience. By implementing a structured 5-layer memory architecture, it allows agents to move beyond simple context windows into a world of long-term retention and metacognitive awareness. This skill ensures that your AI agent doesn't just execute tasks but evolves with every interaction, making it a cornerstone for those building advanced Openclaw Skills.

The system utilizes a dedicated learning repository to categorize errors, feature requests, and best practices. By bridging the gap between working memory and episodic memory, the agent can recall past patterns, adapt to specific user corrections, and proactively avoid repeating previous mistakes. This results in a highly personalized and increasingly efficient developer assistant that understands project-specific nuances and individual workflow preferences.

Max-Self-Improvement Use Cases

  • Persistent Context: Maintaining complex task states across multiple sessions without losing progress.
  • Personalized Optimization: Recording specific user preferences and coding styles to tailor future responses.
  • Error Analysis: Automatically logging CLI or API failures to generate structured lessons and preventative patterns.
  • Knowledge Management: Capturing domain-specific information and project conventions discovered during development.
  • Feature Evolution: Tracking user requests and identified gaps to prioritize future agent capabilities.

How Max-Self-Improvement Works

  1. Sensory Input: The agent receives immediate input and processes it through its L1 Sensory Memory (Context Window).
  2. Memory Retrieval: Before acting, the agent consults L2 Working Memory and L3 Long-Term Memory to gather relevant context and preferences.
  3. Execution and Monitoring: The agent performs tasks while monitoring for triggers like errors, corrections, or successful new patterns.
  4. Structured Logging: If a trigger is detected, the agent generates a unique Entry ID (LRN, ERR, or FEAT) and records the event in the .learnings/ directory.
  5. Memory Promotion: High-value learnings are promoted from temporary logs to permanent files like user_preferences.md or domain_knowledge.md.
  6. Self-Correction: In future sessions, the agent prioritizes explicit instructions and high-confidence long-term memories to refine its reasoning.

Max-Self-Improvement Setup

To integrate Max-Self-Improvement into your Openclaw Skills environment, ensure your workspace includes the necessary directory structure for memory persistence.

# Create the memory and learning directories
mkdir -p memories/evolution .learnings

# Initialize the core tracking files
touch .learnings/LEARNINGS.md .learnings/ERRORS.md .learnings/FEATURE_REQUESTS.md
touch memories/session_notes.md memories/user_preferences.md

Configure your agent's system prompt to prioritize reading these memory files at the start of every session to ensure continuous evolution.

Max-Self-Improvement Data Schema & Taxonomy

The skill organizes data through a hierarchical taxonomy and strict entry templates to ensure machine-readability and human-auditability.

File Path Content Type Purpose
/memories/session_notes.md Working Memory Current task state and immediate goals.
/memories/user_preferences.md Long-Term Memory User-specific behavioral patterns and settings.
/.learnings/LEARNINGS.md Episodic Memory Structured entries for corrections and best practices.
/.learnings/ERRORS.md Metacognitive Logs of failed commands and technical exceptions.

Entry ID Format: [TYPE]-[YYYYMMDD]-[XXX] (e.g., LRN-20260509-A12).

Max-Self-Improvement Advanced Features

  • 5-Layer Memory Stack: Segregates data from sensory context to high-level performance metrics.
  • Pattern-Key Mapping: Labels learnings with keys like simplify.dead_code to allow for programmatic pattern recognition.
  • Automated Conflict Resolution: A built-in priority logic that weighs user instructions over implicit behaviors.
  • Memory Promotion Logic: Automatically moves behavioral insights into long-term storage to prevent information decay.
  • Metacognitive Tracking: Uses metrics.md to evaluate the agent's own improvement and success rates over time.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*