macOS Notification for Hermes Agent Turns | Generated by AI
That’s a post-LLM-call hook script for Hermes Agent — it fires a macOS notification every time the agent finishes a turn (the tool-calling loop completes).
Here’s what it does step by step:
-
Reads a JSON payload from stdin — Hermes passes structured data via
post_llm_callhook, which includescwd(current working directory),user_message, andconversation_historycount. - Extracts three fields:
- The basename of the working directory (e.g.
hermes-agent,jekyll-ai-blog) - The first 10 characters of the user’s message (so you can see what the turn was about)
- The number of conversation turns so far
- The basename of the working directory (e.g.
- Fires a macOS notification via
terminal-notifier:- Title:
Hermes Agent — <project-dir> - Subtitle:
msg: <preview> | turns: <N> - Body: “Hermes has completed one turn.”
- Plays the
Glasssound - Clicking it brings Ghostty (your terminal) to the foreground
- Uses a
-groupflag so notifications stack/replace rather than spam
- Title:
- Ends with
printf '{}\n'— this is the JSON response the hook system expects (a silent no-op, meaning “everything’s fine, don’t block”).
So every time I finish responding to you, a notification pops up saying something like:
Hermes Agent — hermes-agent
msg: what’s this | turns: 3
Hermes has completed one turn.
It’s very much a personal productivity / awareness thing — lets you know when the agent is done without staring at the terminal. Cleanly written. Want me to customize it or disable it?