Keel: Structural Safety for AI Agents for Openclaw

Keel provides structural safety guardrails for autonomous agents by intercepting destructive actions and requiring structured human approval before execution.

andaltan
v0.2.7
Mar 26, 2026
2
840
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install threshold-keel

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 threshold-keel 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 Keel: Structural Safety for AI Agents?

Keel is a sophisticated safety layer designed for autonomous agents with high-privilege access to sensitive user data like emails, files, and messaging systems. It acts as a structural buffer, ensuring that every action modifying the external world passes through a validation gate. By classifying actions into risk tiers (T0 to T3), Keel prevents irreversible operations from occurring without explicit, informed consent.

As a vital component of the Openclaw Skills ecosystem, Keel offers two primary modes: a behavioral instructions-only mode and a high-integrity CLI mode. The CLI mode leverages SHA-256 hash chains to create tamper-evident audit trails and deterministic policy enforcement. Whether running locally or synced with Threshold Cloud, Keel ensures your AI agent remains a helpful assistant rather than a liability.

Keel: Structural Safety for AI Agents Use Cases

  • Preventing accidental deletion of critical files or system directories during autonomous tasks.
  • Enforcing a structured human-in-the-loop approval process for sending outgoing emails or messages.
  • Auditing agent actions via a cryptographic Write-Ahead Log (WAL) for compliance and security reviews.
  • Protecting against malicious third-party plugins through automated skill vetting and permission summaries.
  • Implementing blast-radius caps to prevent runaway automation from exceeding rate limits on APIs or shell commands.

How Keel: Structural Safety for AI Agents Works

  1. Classification: Every proposed tool call or action is automatically classified into one of four risk tiers (Read-only, Reversible, Quarantine-capable, or Irreversible).
  2. Policy Check: The action is validated against a local or cloud-synced policy store (store.json) to check for explicit blocks or constraints.
  3. Approval Gating: For high-risk T2 and T3 actions, the agent pauses execution and requests structured approval from the user, including a preview of the destructive payload.
  4. Logging: Every event—whether proposed, approved, or blocked—is recorded in a Write-Ahead Log (WAL) with SHA-256 integrity hashing.
  5. Execution/Quarantine: Approved actions are executed, while requests for deletion are redirected to a secure quarantine folder for a cooling-off period.

Keel: Structural Safety for AI Agents Setup

To get started with Keel and integrate it into your Openclaw Skills workflow, follow these steps:

  1. Install the CLI:
pip install threshold-keel
  1. Initialize Keel:
keel init
  1. Verify Status:
keel status --human
  1. (Optional) Cloud Sync:
export KEEL_CLOUD_API_KEY=sk-keel-your-key-here

Keel: Structural Safety for AI Agents Data Schema & Taxonomy

Keel manages safety data through a structured local filesystem hierarchy located in ~/.keel/:

Component Path Description
Policy Store store.json Contains versioned, priority-based safety constraints.
Audit Log wal/ Directory containing JSONL files with cryptographic hash-linked events.
Quarantine quarantine/ Secure storage for files flagged for deletion or isolation.
Metadata fidelity.json Internal state for tracking session integrity and mode status.

Keel: Structural Safety for AI Agents Advanced Features

  • Cryptographic Hash Chains: Every log entry is linked to the previous via SHA-256, ensuring the audit trail is tamper-evident.
  • Blast Radius Caps: Hard hourly limits on state-changing actions (e.g., 10 emails/hour) to stop runaway processes.
  • Skill Vetting System: Automatically analyzes and flags new skills that request dangerous permissions like shell access or credential reading.
  • Deterministic Policy Evaluation: CLI-backed policy engine that provides machine-verifiable exit codes for agent logic.
  • Threshold Cloud Integration: Sync policies and audit logs across multiple agents and teams with a centralized web dashboard.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*