Draft Agent Loop (HITRL) for Openclaw

A specialized skill for implementing structured Human-in-the-Right-Loop (HITRL) workflows that ensure AI agents obtain human approval before and after executing critical tasks.

toliuweijing
v1.6.0
Apr 21, 2026
1
959
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install draft-agent-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 draft-agent-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 Draft Agent Loop (HITRL)?

This skill enables developers to move beyond blind box agent interactions by enforcing a rigorous, phase-based lifecycle. It leverages the Draft CLI to create a persistent, remote Task Journal that acts as the single source of truth for planning, logging, and verification. By using this entry in the library of Openclaw Skills, users can ensure that high-stakes tasks are executed with precise oversight and clear evidence.

The primary value of integrating this with Openclaw Skills is the ability to manage remote agent environments safely. It mandates a headless execution model, preventing unauthorized local filesystem writes and keeping all project metadata within secure Draft pages. This approach fosters transparency and reliability in autonomous agent operations by requiring explicit human gates at every critical juncture.

Draft Agent Loop (HITRL) Use Cases

  • Requiring a detailed technical approach review before an agent begins a complex coding task.
  • High-stakes deployments where every execution step must be logged and verified by a human supervisor.
  • Collaborative troubleshooting where the agent provides real-time evidence of its actions via a remote dashboard.
  • Maintaining a durable audit trail of agent activities for compliance without polluting local disk space.

How Draft Agent Loop (HITRL) Works

  1. Setup: The agent initializes a connection using the Draft CLI and confirms a healthy headless session status.
  2. Planning: A Task Journal page is created remotely, and the agent submits a detailed implementation plan using a mandatory template for user approval.
  3. Approval Gate: The agent enters a blocking state and waits for a specific approval trigger like APPROVED or LGTM in the chat before moving forward.
  4. Execution and Logging: The agent performs the authorized tasks, appending non-sensitive execution logs to the Task Journal to maintain transparency.
  5. Verification: Final results and artifacts are summarized on the Draft page, and the agent waits for a final sign-off from the user.
  6. Archiving: The workflow is finalized with a summary of outcomes and key decisions stored permanently in the remote Task Journal.

Draft Agent Loop (HITRL) Setup

Ensure you have the draft-cli installed and configured as a prerequisite for these Openclaw Skills.

npm install -g @innosage/draft-cli

To initiate the HITRL lifecycle, the agent must start the daemon and verify the runtime environment:

draft start-server
draft status --json

Configuration can be further customized using the GLOBAL_INVITE_CODE environment variable to manage page publishing permissions.

Draft Agent Loop (HITRL) Data Schema & Taxonomy

The skill organizes its data within remote Draft pages to ensure a zero-footprint local workflow. The schema includes:

Component Description Format
Task Journal The primary container for the workflow, identified by a unique Page ID. Draft Page
Implementation Plan Detailed context, goals, and acceptance criteria. Markdown Header
Execution Log Timestamped actions, status indicators, and non-sensitive evidence. Appended List
Final Summary Outcome description, key decisions, and links to external artifacts. Markdown Summary

Draft Agent Loop (HITRL) Advanced Features

  • Iteration Loop Support: Seamlessly handles feedback by appending new iteration plans to the existing Task Journal without losing context.
  • Headless Runtime Enforcement: Specifically designed for remote Openclaw Skills environments using the v2 runtime to ensure isolation.
  • Non-Sensitive Logging: Automatically filters out credentials and PII from execution logs to maintain security best practices.
  • Blocking Handoff Logic: Prevents the agent from proceeding through the lifecycle until a human provides explicit chat-based authorization.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*