The year/Independent research

Paper 2603.24414

ClawKeeper: Comprehensive Safety Protection for OpenClaw Agents Through Skills, Plugins, and Watchers

Published
Mar 2026
Research lab
Independent
Citations
18
GitHub
1K stars

01 In brief

Summary

ClawKeeper is a comprehensive security framework for OpenClaw, an open-source autonomous agent runtime, addressing critical vulnerabilities such as sensitive data leakage, privilege escalation, and malicious skill execution.

It integrates three complementary protection layers: skill-based protection at the instruction level, plugin-based runtime enforcement, and a novel watcher-based external agent for real-time oversight.

The watcher paradigm decouples safety from task execution, enabling continuous monitoring, human-in-the-loop intervention, and self-evolution.

Evaluations on a benchmark of seven threat categories (140 adversarial instances) show ClawKeeper achieves a Defense Success Rate of 85–90%, outperforming existing baselines by 15–45 percentage points.

The watcher's self-evolving capability improves DSR from ~90% to ~95% after processing 100 cases.

ClawKeeper supports local and cloud deployments and is adaptable to other agent systems via communication interfaces.

The framework is open-sourced at https://github.com/SafeAI-Lab-X/ClawKeeper.

The paper highlights the watcher as a foundational building block for securing next-generation autonomous agents, resolving the safety-utility tradeoff and providing transparency and verifiability absent in existing defenses.

Qualitative case studies demonstrate effective defense against dangerous commands, tool-loop limits, and upstream failures, as well as proactive security auditing and configuration hardening.

ClawKeeper is positioned as the 'antivirus' for agent-based operating systems, offering a unified, adaptive, and generalizable safety solution for the agentic AI ecosystem.

The code is released for community use and further development.

02 From the paper

Abstract

OpenClaw has rapidly established itself as a leading open-source autonomous agent runtime, offering powerful capabilities including tool integration, local file access, and shell command execution. However, these broad operational privileges introduce critical security vulnerabilities, transforming model errors into tangible system-level threats such as sensitive data leakage, privilege escalation, and malicious third-party skill execution. Existing security measures for the OpenClaw ecosystem remain highly fragmented, addressing only isolated stages of the agent lifecycle rather than providing holistic protection. To bridge this gap, we present ClawKeeper, a real-time security framework that integrates multi-dimensional protection mechanisms across three complementary architectural layers. (1) \textbf{Skill-based protection} operates at the instruction level, injecting structured security policies directly into the agent context to enforce environment-specific constraints and cross-platform boundaries. (2) \textbf{Plugin-based protection} serves as an internal runtime enforcer, providing configuration hardening, proactive threat detection, and continuous behavioral monitoring throughout the execution pipeline. (3) \textbf{Watcher-based protection} introduces a novel, decoupled system-level security middleware that continuously verifies agent state evolution. It enables real-time execution intervention without coupling to the agent's internal logic, supporting operations such as halting high-risk actions or enforcing human confirmation. We argue that this Watcher paradigm holds strong potential to serve as a foundational building block for securing next-generation autonomous agent systems. Extensive qualitative and quantitative evaluations demonstrate the effectiveness and robustness of ClawKeeper across diverse threat scenarios. We release our code.