Scheduled Change Notifications
Checks for changes on a schedule and sends a notification when new data appears. The example tracks a GitHub repository's star count and sends updates to Telegram.
Requirements
- Cron with built-in
--scriptsupport. - A checker script located in
~/.hermes/scripts/. - Any configured messaging delivery target.
How to use
- Create a checker script and place it in
~/.hermes/scripts/.
# ~/.hermes/scripts/watch-stars.py
import json, os, urllib.request
REPO = "NousResearch/hermes-agent"
STATE = os.path.expanduser("~/.hermes/scripts/.stars-state.json")
def get_stars():
req = urllib.request.Request(
f"https://api.github.com/repos/{REPO}",
headers={"User-Agent": "hermes-watcher"},
)
return json.loads(urllib.request.urlopen(req).read())["stargazers_count"]
prev = json.load(open(STATE))["count"] if os.path.exists(STATE) else None
curr = get_stars()
json.dump({"count": curr}, open(STATE, "w"))
if prev is None:
print("INITIAL", curr)
elif curr == prev:
print("NO_CHANGE")
else:
print(f"CHANGE {prev} -> {curr}")
- Create a job that checks the star count every 15 minutes and sends a change notification to Telegram.
hermes cron create "*/15 * * * *" \
"If the script output starts with CHANGE, summarize in one line what
changed and deliver. If it starts with NO_CHANGE or INITIAL, respond
with only [SILENT]." \
--script ~/.hermes/scripts/watch-stars.py \
--name "Star watcher" \
--deliver telegram
In this example, [SILENT] suppresses the message when nothing changes, but does not skip the model call. It is not a zero-token mode. See the Hermes documentation.
Source: aliaihub/awesome-hermes-usecases and its contributors. License: CC-BY-4.0. Source license notice.
Translation and editorial adaptation by ClawCases.
>Resources
>Related Use Cases
Agent Merge-Conflict Arbiter
Resolve a git merge conflict between two agents' branches as an impartial third party: a neutral arbiter that takes both diffs and their stated intents and produces a merged result without overwriting either side.
AI-Powered Earnings Tracker
Stay on top of earnings season across dozens of tech companies without manually checking multiple sources and remembering report dates for every AI/tech earnings report.
Summarize URLs, videos, podcasts, PDFs, and local files
Summarize is a fast CLI that summarizes URLs, local files, and YouTube links, and can transcribe YouTube videos.