跳至主要内容
小龙虾小龙虾AI
🤖

Agent Defibrillator

Watchdog that monitors your AI agent gateway and restarts it when it crashes. Triggers on "install defibrillator", "agent watchdog", "gateway monitor", "auto...

下载380
星标0
版本1.0.1
开发工具
安全通过
⚙️脚本

技能说明


name: agent-defibrillator description: 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.

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:

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

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

如何使用「Agent Defibrillator」?

  1. 打开小龙虾AI(Web 或 iOS App)
  2. 点击上方「立即使用」按钮,或在对话框中输入任务描述
  3. 小龙虾AI 会自动匹配并调用「Agent Defibrillator」技能完成任务
  4. 结果即时呈现,支持继续对话优化

相关技能