The Alibaba Cloud HITL (Human-in-the-Loop) plug-in intercepts medium- and high-risk cloud operations initiated by AI Agents through Alibaba Cloud CLI (aliyun), pausing them for user confirmation before execution. Currently supported on OpenClaw.
Before and after HITL
|
Scenarios |
Without HITL |
With HITL |
|
Create resources |
Agent creates directly; may incur unexpected fees |
Pauses, shows operation details, and proceeds after confirmation |
|
Delete or release resources |
Agent executes directly; user discovers only after completion |
Pauses and shows the target resource; proceeds after confirmation |
|
Modify configurations |
Agent executes directly; change takes effect immediately |
Pauses and shows the change; cancellation leaves configuration unchanged |
|
Read-only operations |
Normal execution |
Normal execution with millisecond-level latency overhead |
Get started
HITL runs as an OpenClaw plug-in. Install OpenClaw first if needed.
Before installing, confirm:
-
OpenClaw >= 2026.3.24 (run
openclaw --versionto check). -
Node.js >= 22.0.0 (run
node --versionto check). -
Alibaba Cloud CLI (
aliyun) installed with valid credentials. Install CLI(Linux) | Configure credentials.
Step 1: Install the plug-in
Install the plug-in:
openclaw plugins install @alicloud/alibabacloud-hitl-claw-plugin
Expected output:
Installed plugin: alibabacloud-hitl-claw-plugin
Restart the gateway to load plugins.
Step 2: Verify the plug-in is loaded
openclaw plugins list
Verify the output includes @alicloud/alibabacloud-hitl-claw-plugin. If missing, restart OpenClaw and re-check.
Step 3: Test the confirmation process
-
In OpenClaw, ask the Agent to modify a cloud resource. For example, "Create a RAM user
CLI User". -
The Agent pauses before executing
aliyun ram create-user. Click the Open Approval link in OpenClaw to confirm. -
Click Cancel to block the operation. Verify that the RAM user is not created.
Step 4: (Optional) Configure DingTalk notifications
By default, confirmation requests appear in the OpenClaw UI. To receive DingTalk mobile notifications:
openclaw config set session.dmScope per-channel-peer
Confirmation requests are then pushed to the DingTalk channel linked to OpenClaw. Open the link to approve.
How it works
The plug-in sends each aliyun CLI command's content, CLI version, and session info to Alibaba Cloud for Fraud Detection (credentials excluded). Two outcomes:
-
ALLOW
-
ESCALATE: Write operations identified as high-risk (resource release, permission change, security config modification) are suspended pending user confirmation.
Alibaba Cloud maintains and updates Fraud Detection rules server-side — no plug-in upgrade required. HITL plug-in source code (MIT license).
-
If no response is received within the timeout (10 minutes by default), the operation is automatically canceled. Resources are not affected.
-
Sensitive information is processed locally and never sent to the server.
View operation logs
-
HITL plug-in log: Records the Fraud Detection result, approval status, and execution outcome of each command. Default log path:
/tmp/openclaw. -
ActionTrail: Records API calls executed by the Agent. Log on to the ActionTrail console. On the Event Query page, filter events by Event Type and Event Name.
Advanced configuration
To customize HITL behavior, edit ~/.openclaw/extensions/alibabacloud-hitl-claw-plugin/config.json:
|
Parameter |
Type |
Default Value |
Description |
|
|
boolean |
|
Disable HITL temporarily (e.g., for debugging) without uninstalling |
|
|
number |
|
Confirmation timeout in seconds. Operations are auto-canceled after timeout. |
FAQ
Does HITL change the behavior of CLI commands?
No. Command results, parameters, and output stay unchanged. HITL only adds Fraud Detection before execution.
Are similar operations automatically skipped after I confirm them?
No. Each operation is evaluated independently. Batch operations (such as deleting multiple resources) require separate confirmation for each command.
Can I revoke a confirmed operation?
Once confirmed, the command executes immediately and cannot be revoked. Review the command and target resource before confirming.
Does HITL cost anything?
The HITL plug-in is free and open source (MIT license).
How do I uninstall the HITL plug-in?
Run openclaw plugins uninstall @alicloud/alibabacloud-hitl-claw-plugin. After uninstalling, the Agent executes commands directly without Fraud Detection.