ClawKit Logo
ClawKitReliability Toolkit
Back to Registry
Official Verified system Safety 3/5

agent-defibrillator

Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto-restart agent", or "keep agent alive". macOS launchd service with optional Discord notifications.

Why use this skill?

Ensure your OpenClaw AI agent stays online with the Agent Defibrillator. Automatically monitor, detect crashes, and restart your macOS gateway service with Discord alerts.

skill-install — Terminal

Install via CLI (Recommended)

clawhub install openclaw/skills/skills/hazy2go/agent-defibrillator
Or

What This Skill Does

The Agent Defibrillator is a mission-critical watchdog utility designed for OpenClaw users who require high availability for their AI agent gateways on macOS. Operating as a native launchd service, it acts as a heartbeat monitor, ensuring that your background AI processes remain operational 24/7. It periodically polls your gateway status, detects unresponsive processes or crashes, and triggers an automated recovery sequence. Beyond simple restarts, the skill includes configurable cooldown protections to prevent infinite restart loops, version mismatch detection, and optional webhook-based notifications to keep you informed via Discord if a failure occurs.

Installation

Installation is streamlined for OpenClaw users via the CLI. Run 'clawhub install openclaw/skills/skills/hazy2go/agent-defibrillator' to pull the assets. Once installed, navigate to the local script directory at ~/.openclaw/scripts/defibrillator.sh to configure environment variables. You must ensure your gateway service label matches the 'DEFIB_GATEWAY_LABEL' in the config file. Finally, the service is managed via standard macOS launchctl commands, which provide a robust, OS-level integration for background process maintenance.

Use Cases

  • Maintaining continuous uptime for autonomous AI agents that perform long-running tasks.
  • Automatically recovering from memory leaks or intermittent segmentation faults in local agent gateways.
  • Monitoring background AI infrastructure without manual intervention.
  • Getting real-time alerts on production agent crashes via Discord.

Example Prompts

  • "Install defibrillator to make sure my agent gateway stays up permanently."
  • "Keep agent alive by setting up the watchdog monitor."
  • "Auto-restart agent if it crashes, and send me a notification if it does."

Tips & Limitations

This skill is specifically designed for macOS environments and relies on launchd. It will not work on Linux or Windows systems. Ensure you review the bash source code before executing the install script, as it modifies system-level launch agents. Adjust the 'DEFIB_COOLDOWN' setting if you notice your agent frequently failing during boot-up to prevent resource exhaustion. Always verify the status of the watchdog using 'launchctl list' after installation to confirm it is successfully running in the background.

Metadata

Author@hazy2go
Stars2387
Views1
Updated2026-03-09
View Author Profile
AI Skill Finder

Not sure this is the right skill?

Describe what you want to build — we'll match you to the best skill from 16,000+ options.

Find the right skill
Add to Configuration

Paste this into your clawhub.json to enable this plugin.

{
  "plugins": {
    "official-hazy2go-agent-defibrillator": {
      "enabled": true,
      "auto_update": true
    }
  }
}

Tags(AI)

#watchdog#macos#automation#gateway#reliability
Safety Score: 3/5

Flags: file-write, file-read, code-execution