Memory-Driven Execution Loop for Openclaw

A deterministic execution framework that forces AI agents to operate exclusively through external memory state files for maximum reliability.

kdylan1010-alt
v1.0.1
Mar 24, 2026
0
849
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install memory-driven-execution-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 memory-driven-execution-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 Memory-Driven Execution Loop?

The Memory-Driven Execution Loop is a high-precision protocol designed for Openclaw Skills to ensure AI agents remain grounded and deterministic. By offloading internal state to a series of markdown-based memory files, this skill eliminates hallucination and drift, forcing the agent to validate its environment and goals before every single action. It is particularly effective for complex, multi-step engineering tasks where auditability and strict adherence to rules are paramount.

This approach shifts the agent from a reactive model to a proactive, state-aware system. By utilizing a specific set of memory files—including rules, goals, and lessons—the agent maintains a persistent context that survives session restarts and provides a clear trail of reasoning for every execution step taken.

Memory-Driven Execution Loop Use Cases

  • Managing complex software refactoring tasks that require multi-step state tracking.
  • Executing timed research or development sessions with strict wall-clock requirements.
  • Building self-correcting agent loops that convert execution failures into structured, cross-domain lessons.
  • Standardizing AI behavior across different Openclaw Skills through a shared memory protocol.

How Memory-Driven Execution Loop Works

  1. The agent initializes by reading the rules.md file to establish the operational constraints.
  2. All secondary memory files (goal, plan, progress, notes, and lessons) are ingested to build a complete situational awareness.
  3. The system performs a preflight check to validate exactly one clear next action based on the current plan.
  4. Reasoning for the intended action is documented in notes.md before execution occurs.
  5. The agent executes exactly one step of the plan to prevent cascading errors.
  6. Real-time updates are written to progress.md and notes.md to reflect the new state.
  7. If an error occurs, it is processed through a strict Lesson Quality Gate and recorded in lessons.md.

Memory-Driven Execution Loop Setup

To implement this within your environment, ensure the following markdown files exist in your working directory:

touch rules.md goal.md plan.md progress.md notes.md lessons.md

Configure your agent system prompt to recognize these files as the primary source of truth for all Openclaw Skills execution loops.

Memory-Driven Execution Loop Data Schema & Taxonomy

File Purpose Key Metadata Requirements
rules.md Constraints Global operational boundaries and logic gates.
goal.md Objective The high-level desired end-state.
plan.md Strategy Sequential steps required to reach the goal.
progress.md Tracking Current status, completed steps, and time logs.
notes.md Reasoning Thinking process and justification for each step.
lessons.md Optimization Failed attempts, triggers, and boundary conditions.

Memory-Driven Execution Loop Advanced Features

  • Strict Timed Task Rule: Forces adherence to wall-clock duration with mandatory start/end/elapsed proof for time-boxed activities.
  • Universal Lesson Quality Gate: Ensures every lesson includes a trigger, action, metric, and at least two cross-field examples to ensure maximum utility.
  • Deterministic One-Step Execution: Prevents the agent from over-reaching or skipping validation steps during complex workflows.
  • Externalized State Management: Makes the agent's internal logic fully transparent and editable by human collaborators.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*