✓ Verified 💻 Development ✓ Enhanced Data

Agent Defibrillator

Watchdog that monitors your AI agent gateway and restarts it when it crashes.

Rating
4.9 (354 reviews)
Downloads
1,850 downloads
Version
1.0.0

Overview

Watchdog that monitors your AI agent gateway and restarts it when it crashes.

Key Features

1

Checks gateway health every 10 minutes

2

Detects crashes and stale processes

3

Auto-restarts with cooldown protection

4

Optional Discord notifications on restart

5

Detects version mismatches after updates

Complete Documentation

View Source →

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):

bash
git clone https://github.com/hazy2go/agent-defibrillator.git
cd agent-defibrillator
./install.sh

Verify

bash
launchctl list | grep defib

Configure

Edit ~/.openclaw/scripts/defibrillator.sh:

VariableDefaultDescription
DEFIB_GATEWAY_LABELai.openclaw.gatewaylaunchd service label
DEFIB_RETRY_DELAY10Seconds between retries
DEFIB_MAX_RETRIES3Retries before restart
DEFIB_COOLDOWN300Seconds between restarts
DISCORD_CHANNEL(empty)Your channel ID for notifications

Commands

bash
# 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

bash
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.)

Installation

Terminal bash

openclaw install agent-defibrillator
    
Copied!

💻Code Examples

**Recommended (review code first):**

recommended-review-code-first.sh
git clone https://github.com/hazy2go/agent-defibrillator.git
cd agent-defibrillator
./install.sh

launchctl list | grep defib

launchctl-list--grep-defib.txt
## 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
example.sh
# 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
example.sh
launchctl bootout gui/$(id -u)/com.openclaw.defibrillator
rm ~/Library/LaunchAgents/com.openclaw.defibrillator.plist
rm ~/.openclaw/scripts/defibrillator.sh

Tags

#ios_and-macos-development

Quick Info

Category Development
Model Claude 3.5
Complexity Multi-Agent
Author hazy2go
Last Updated 3/10/2026
🚀
Optimized for
Claude 3.5
🧠

Ready to Install?

Get started with this skill in seconds

openclaw install agent-defibrillator