Event Watcher for Openclaw

A lightweight event-driven trigger system that wakes Openclaw agents only when specific Redis or Webhook events occur to minimize token spend.

solitaire2015
v1.0.1
Feb 7, 2026
1
2.8k
0

Install & Download

1. ClawHub CLI

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

npx clawhub@latest install event-watcher

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 event-watcher 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 Event Watcher?

The Event Watcher is a robust utility designed to bring event-driven architecture to the Openclaw Skills ecosystem. Instead of agents polling for updates or running continuously, this skill listens to external data sources—specifically Redis Streams and webhook JSONL files—to wake agents only when matching criteria are met. This approach significantly reduces operational costs by ensuring no tokens are spent when no relevant events are occurring.

As a core component for developers building reactive systems, it provides a bridge between high-frequency data streams and intelligent agent responses. By integrating this into your Openclaw Skills toolkit, you can build autonomous systems that react to real-time system logs, user interactions, or external API triggers with precision and safety.

Event Watcher Use Cases

  • Monitoring system health via Redis Streams to trigger diagnostic agents when errors appear.
  • Automated response to external webhooks from platforms like GitHub, Stripe, or custom applications.
  • Token-efficient Slack bot interactions that only wake the agent when specific keywords or events are detected.
  • Scaling complex multi-agent workflows by routing specific data events to dedicated session handlers.

How Event Watcher Works

  1. The watcher establishes a subscription to Redis Streams or monitors a JSONL file for new webhook entries.
  2. Incoming event payloads are normalized and evaluated against user-defined JSON filtering rules, including regex support.
  3. A deduplication layer checks the event against a TTL-based cache to prevent redundant agent activations.
  4. Upon a successful match, the skill routes the event to the appropriate session using sessions_send or agent_gate logic.
  5. The agent is activated with a structured message containing the event data and a safety preamble to ensure secure processing.

Event Watcher Setup

To integrate this functionality into your Openclaw Skills environment, first install the required Python dependencies:

pip install redis pyyaml

Configure your event sources in the YAML configuration file located in the references directory. Once configured, you can run the watcher as a background task:

nohup python scripts/watcher.py &

For webhook integration, use the bridge script to append incoming payloads to your local JSONL log:

python scripts/webhook_bridge.py

Event Watcher Data Schema & Taxonomy

The Event Watcher organizes its operations through a structured data model to ensure delivery persistence and accurate routing:

Component Type Purpose
Config (YAML) Schema Defines filtering rules, retry logic, and session routing targets.
JSONL Logs Storage Persistent storage for webhook payloads before processing.
Redis Streams Transport High-performance message queue for real-time event ingestion.
Event Metadata JSON Contains source info, timestamps, and deduplication hashes.
Delivery Logs Structured Tracks match rates, successful deliveries, and failed retry attempts.

Event Watcher Advanced Features

  • Intelligent session routing that automatically resolves the most recent session for a specific Slack channel or user ID.
  • Configurable prompt safety headers that prefix untrusted event data with instructions to prevent prompt injection.
  • Support for complex filtering logic using AND/OR operators combined with regular expressions.
  • Consumer group management for Redis Streams, allowing for cursor persistence and reliable message delivery even after restarts.
  • Built-in retry mechanism to ensure event delivery to agents even during transient network or API failures.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Requires
Github Stars: 0
forks: 0

Featured*