/install agent-defibrillator
Agent Defibrillator
Watchdog service that monitors your AI agent gateway and restarts it when it crashes.
What It Does
- Checks gateway health every 10 minutes
- Detects crashes and stale processes
- Auto-restarts with cooldown protection
- Optional Discord notifications on restart
- Detects version mismatches after updates
Install
Recommended (review code first):
git clone https://github.com/hazy2go/agent-defibrillator.git
cd agent-defibrillator
./install.sh
Verify
launchctl list | grep defib
Configure
Edit ~/.openclaw/scripts/defibrillator.sh:
| Variable | Default | Description |
|---|---|---|
DEFIB_GATEWAY_LABEL |
ai.openclaw.gateway |
launchd service label |
DEFIB_RETRY_DELAY |
10 |
Seconds between retries |
DEFIB_MAX_RETRIES |
3 |
Retries before restart |
DEFIB_COOLDOWN |
300 |
Seconds between restarts |
DISCORD_CHANNEL |
(empty) | Your channel ID for notifications |
Commands
# View logs
tail -f ~/.openclaw/logs/defibrillator.log
# Manual check
~/.openclaw/scripts/defibrillator.sh
# Stop watchdog
launchctl bootout gui/$(id -u)/com.openclaw.defibrillator
# Restart watchdog
launchctl kickstart -k gui/$(id -u)/com.openclaw.defibrillator
Uninstall
launchctl bootout gui/$(id -u)/com.openclaw.defibrillator
rm ~/Library/LaunchAgents/com.openclaw.defibrillator.plist
rm ~/.openclaw/scripts/defibrillator.sh
Requirements
- macOS (uses launchd)
- AI agent running via launchd (OpenClaw, etc.)
- Make sure OpenClaw is installed (local or Docker)
- Run the install command in chat:
/install agent-defibrillator - After installation, invoke the skill by name or use
/agent-defibrillator - Provide required inputs per the skill's parameter spec and get structured output
What is Agent Defibrillator?
Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto... It is an AI Agent Skill for Claude Code / OpenClaw, with 900 downloads so far.
How do I install Agent Defibrillator?
Run "/install agent-defibrillator" in the OpenClaw or Claude Code chat to install it in one step — no extra setup required.
Is Agent Defibrillator free?
Yes, Agent Defibrillator is completely free (open-source). You can download, install and use it at no cost.
Which platforms does Agent Defibrillator support?
Agent Defibrillator is cross-platform and runs anywhere OpenClaw / Claude Code is available (cross-platform).
Who created Agent Defibrillator?
It is built and maintained by Hazy (@hazy2go); the current version is v1.0.1.