hermes-watchdog

Monitor Hermes gateway /health endpoint and restart it via launchd after failures.

2|2|Updated Apr 16, 2026
One-click install
npx skills add https://github.com/huidge/hermes-skills --skill hermes-watchdog
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hermes-watchdog
Source: https://github.com/huidge/hermes-skills/tree/main/devops/hermes-watchdog
Command: npx skills add https://github.com/huidge/hermes-skills --skill hermes-watchdog

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Launchd alone restarts Hermes on process exit, but it cannot detect a hung or unresponsive gateway. This watchdog adds a heartbeat-based check that monitors the /health endpoint to keep Hermes responsive.

Core Features & Use Cases

  • Heartbeat monitoring: polls the gateway health endpoint every 2 minutes.
  • Auto-restart: restarts Hermes via launchctl after 3 consecutive health check failures.
  • High availability: uses a KeepAlive launchd plist to keep the watchdog running continuously.
  • Mac sleep/wake resilience: handles sleep/wake cycles to recover from transient states.
  • Simple setup: provides scripts and plist templates for quick deployment.

Quick Start

Create the watchdog script, configure the launchd plist, and load the service.

Frequently Asked Questions about hermes-watchdog

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I monitor a gateway heartbeat and restart it when unresponsive on macOS?

You can monitor a gateway heartbeat on macOS by polling the /health endpoint every 2 minutes and triggering an automatic restart via launchctl after 3 consecutive failures to restore responsiveness.

Why does launchd not keep my Hermes gateway responsive during process hangs?

Launchd only restarts a process upon exit and cannot detect a hung or unresponsive gateway. A heartbeat-based watchdog is required to poll the /health endpoint and actively restart the service when it becomes unresponsive.

How do I maintain 24/7 uptime for a gateway across Mac sleep/wake cycles?

Maintain 24/7 uptime across Mac sleep/wake cycles by deploying a KeepAlive launchd plist that keeps the watchdog running continuously, ensuring the gateway recovers from transient sleep states and unresponsive hangs.

Do I need a KeepAlive plist to keep the watchdog itself running on macOS?

Yes, a KeepAlive launchd plist is required to keep the watchdog itself running continuously on macOS, ensuring the heartbeat monitor survives system events and actively checks the gateway /health endpoint.

What is the best way to auto-restart a hung Hermes gateway without manual intervention?

The best way to auto-restart a hung Hermes gateway is using a heartbeat watchdog that polls /health every 2 minutes and executes a launchctl restart after 3 consecutive failures, bypassing standard process exit detection.