Implementation:42 evey Hermes plugins daily digest
| Knowledge Sources | |
|---|---|
| Domains | Digest, Cost_Monitoring, System_Health |
| Last Updated | 2026-10-29 00:00 GMT |
Overview
Concrete tool for aggregating overnight activity — API costs, cron health, bridge tasks, goals, and alerts — into a single morning digest summary.
Description
The daily_digest handler is the core tool in the evey-digest plugin. It calls five internal aggregation functions and combines their outputs into a human-readable digest:
- _get_costs() — queries the Langfuse traces API for the last 24h, computing total cost, top model by cost, and trace count. Uses Basic auth via
_langfuse_auth_header(). - _get_cron() — reads
~/.hermes/cron/jobs.jsonto count total/healthy/erroring jobs. - _get_bridge() — counts files in the bridge inbox/outbox directories.
- _get_goals() — parses
~/.hermes/goals.mdsections (Active/Completed) for goal counts. - _get_alerts() — polls the ntfy JSON streaming endpoint for alerts from the last 24h.
All functions fail-safe: they return zero/empty dicts on error rather than raising. The handler combines results into a digest dict with human-readable strings for each category.
Usage
Call this tool with no parameters to generate a morning digest. Registered as daily_digest on the evey_digest toolset.
Code Reference
Source Location
- Repository: hermes-plugins
- File: evey-digest/__init__.py
- Lines: L33-212 (_http_get L33-40, _langfuse_auth_header L43-47, _get_costs L50-81, _get_cron L84-100, _get_bridge L103-115, _get_goals L118-141, _get_alerts L144-162, handler L165-203)
Signature
def handler(args: dict, **kwargs) -> str:
"""No parameters needed. Returns JSON digest dict."""
def _get_costs() -> dict:
"""Query Langfuse for last 24h cost data. Returns {total, top_model, trace_count}."""
def _get_cron() -> dict:
"""Read cron job status. Returns {total, healthy, errors}."""
def _get_bridge() -> dict:
"""Check bridge inbox/outbox. Returns {inbox, outbox}."""
def _get_goals() -> dict:
"""Count goals from goals.md. Returns {active, completed}."""
def _get_alerts() -> dict:
"""Check ntfy for alerts in last 24h. Returns {count, latest: list[str]}."""
def _http_get(url: str, headers: dict = None) -> dict | None:
"""GET request with timeout. Returns parsed JSON or None."""
def _langfuse_auth_header() -> dict:
"""Build Basic auth header for Langfuse."""
Import
from evey_digest import handler
# Or accessed via Hermes tool call: daily_digest
I/O Contract
Inputs
| Name | Type | Required | Description |
|---|---|---|---|
| (env) | various | — | LANGFUSE_HOST, LANGFUSE_PUBLIC_KEY, LANGFUSE_SECRET_KEY, NTFY_URL |
| (filesystem) | various | — | cron/jobs.json, claude-bridge/inbox, claude-bridge/outbox, goals.md |
Outputs
| Name | Type | Description |
|---|---|---|
| overnight | str | Summary: trace count, cron jobs, alert count |
| costs | str | Dollar amount spent and top model |
| cron | str | Healthy/total jobs and error count |
| bridge | str | Pending task count |
| goals | str | Active and completed goal counts |
| alerts | str | Alert count with latest message |
Usage Examples
Morning Digest
result = tool_call("daily_digest", {})
# {"overnight":"42 API calls, 8 cron jobs ran, 2 alerts",
# "costs":"$0.45 spent, top model: claude-sonnet-4-20250514",
# "cron":"7/8 jobs healthy, 1 errors",
# "bridge":"3 pending tasks",
# "goals":"5 active, 12 completed",
# "alerts":"2 alerts in 24h — latest: Service degraded"}