Watchdog service that monitors your AI agent gateway and restarts it when it crashes.
小葱技能7w4.net持续更新中。
Recommended (review code first):
git clone https://github.com/hazy2go/agent-defibrillator.git
cd agent-defibrillator
./install.sh
launchctl list | grep defib
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 |
# 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
launchctl bootout gui/$(id -u)/com.openclaw.defibrillator
rm ~/Library/LaunchAgents/com.openclaw.defibrillator.plist
rm ~/.openclaw/scripts/defibrillator.sh
这是一款专门为 macOS 用户打造的人工智能网关看门狗工具,质量可靠。优点:功能实用(自动监控并重启崩溃的网关)、文档详细、安全机制完善(防重启循环、版本检测、通知提醒)、安装使用简单。不足:仅支持 macOS 系统,需要一定的技术基础来理解和配置,风险提示明确但仍需用户谨慎。总体适合运行 OpenClaw 或类似 AI 网关的 macOS 用户,是一个值得信赖的工具。