2.6k
GitHub Stars
5
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill openclaw/skills --skill agent-defibrillator- _meta.json291 B
- defibrillator.sh7.2 KB
- install.sh4.0 KB
- README.md5.4 KB
- SKILL.md1.8 KB
Overview
This skill is a macOS watchdog that monitors an AI agent gateway and automatically restarts it when it crashes. It runs as a launchd service, detects stale processes and version mismatches, and can send optional Discord notifications on restart. The design focuses on minimal disruption with cooldown protection and retry limits. It is intended for agents managed by launchd such as OpenClaw.
How this skill works
The watchdog script runs on a regular interval (default every 10 minutes) and checks the gateway process health, responsiveness, and version consistency. It tracks transient failures with a retry counter, applies a configurable cooldown between restarts, and issues a controlled restart when thresholds are exceeded. Optional Discord integration posts notifications to a channel when a restart occurs. Configuration is done by editing the script variables in the user scripts folder.
When to use it
- You run an AI agent gateway under launchd on macOS and need automatic recovery.
- You want a lightweight supervisor to detect stale or crashed agent processes.
- You need automatic restarts with cooldowns and retry limits to avoid restart loops.
- You want optional alerting (Discord) when restarts or version mismatches occur.
- You prefer a simple, script-based watchdog instead of a full process manager.
Best practices
- Review the script before installation and adapt variable defaults to your environment.
- Set conservative retry and cooldown values to avoid frequent restarts during transient issues.
- Point Discord notifications to a dedicated channel or webhook to avoid noisy alerts.
- Run the agent under launchd so the watchdog can manage it reliably on macOS.
- Keep logs accessible (~/.openclaw/logs/defibrillator.log) for post-incident debugging.
Example use cases
- Keep an OpenClaw or similar agent gateway running continuously on a personal macOS server.
- Automatically recover from crashes after a package update that introduces a transient failure.
- Detect and restart stale agent processes that stop responding without exiting.
- Notify an ops channel on Discord when an agent was restarted for visibility.
FAQ
This watchdog is built for macOS and uses launchd; it is not intended for Linux or Windows.
How do I enable Discord notifications?
Set the DISCORD_CHANNEL variable in the script to your channel ID or webhook and ensure outbound network access.