Setup & Installation
Or with the ClawHub CLI, for registry-managed skill folders outside a full OpenClaw workspace:
Version History
Security fixes: removed hardcoded Discord channel, recommend git clone over curl|bash
What This Skill Does
Watchdog service for macOS that monitors an AI agent gateway running under launchd and automatically restarts it when it crashes or becomes stale. Checks gateway health every 10 minutes with configurable retry and cooldown logic. Optionally sends Discord notifications when a restart occurs.
Uses native macOS launchd instead of cron or external process managers, so the watchdog itself survives reboots and user sessions without extra setup.
When to use it
- Keep an AI agent gateway running overnight without manual intervention
- Get notified on Discord when your local agent crashes and recovers
- Prevent restart storms with cooldown protection after repeated failures
- Detect and respond to version mismatches after updating the gateway
- Monitor agent uptime on a development machine without third-party tools
Example Workflow
Here's how your AI assistant might use this skill in practice.
User asks: install the defibrillator watchdog
- 1Clones the agent-defibrillator repository
- 2Runs install.sh to register the launchd plist and deploy the script to ~/.openclaw/scripts/
- 3Verifies the service appears in launchctl list
- 4Optionally sets DISCORD_CHANNEL in defibrillator.sh for restart notifications
- 5Confirms the watchdog is active and begins polling the gateway every 10 minutes
Watchdog service running under launchd, auto-restarting the AI agent gateway on crash with optional Discord alerts
Requirements
Accounts, API keys, or tools you or your AI assistant may need to set up while using this skill.