nujovich

hermes-telemetry

Budget enforcement and observability plugin for Hermes Agent that stops runaway costs before they happen.

23 stars4 forks20 open issuesPythonMITv0.8.0

Repository last updated Jul 23, 2026

Overview

hermes-telemetry is a runtime-integrated plugin for Hermes Agent that tracks token usage and costs in real time. It enforces budget limits by blocking subsequent operations if a budget breach is detected. Unlike post-hoc log analyzers, this plugin hooks into the Hermes runtime and can prevent overspending before the next LLM call is made.

The plugin captures real usage data from each API call, including tokens, latency, model, provider, and platform. It stores everything in a SQLite database with WAL mode for concurrent access. A standalone HTML dashboard provides visual insights, and slash commands like /stats and /budget offer quick access to analytics and budget status.

Designed for unattended runs, cron jobs, and multi-session workflows, hermes-telemetry is ideal for developers who need to cap AI spending without manual oversight. It complements Hermes Agent's built-in telemetry by adding proactive budget enforcement.

Highlights

  • Enforces budget limits mid-session to prevent overspending
  • Logs telemetry data to SQLite with WAL mode for reliability
  • Provides a standalone HTML dashboard for visual analytics
  • Supports slash commands /stats and /budget for quick insights
  • Automatically syncs OpenRouter pricing via auto-refresh

Features

Real-Time Token and Cost Tracking

Captures tokens in/out, cache tokens, reasoning tokens, API latency, and tool call metrics from every LLM request.

Budget Enforcement

Sets daily, weekly, or monthly caps; hard breaches block subsequent operations before they incur cost.

Standalone HTML Dashboard

A locally served web UI that reads directly from the telemetry SQLite database, offering tabs for overview, breakdown, requests, tools, and errors.

Hermes Dashboard Plugin

Auto-discovers and integrates as a dedicated Telemetry tab with widgets in the Hermes web dashboard.

Pricing Auto-Refresh

Automatically syncs OpenRouter pricing to keep cost estimates accurate, with support for free-tier models and estimated-price flags.

Slash Commands

Use /stats for session analytics and /budget for current spending vs. limits, directly in your Hermes session.

Installation

Commands are reproduced exactly as published by the project maintainers. Always check the upstream repository for the current instructions.

hermes plugins install nujovich/hermes-telemetry
hermes plugins enable hermes-telemetry
chmod +x ~/.hermes/plugins/hermes-telemetry/hermes-telemetry
ln -s ~/.hermes/plugins/hermes-telemetry/hermes-telemetry ~/.local/bin/hermes-telemetry
git clone https://github.com/nujovich/hermes-telemetry ~/.hermes/plugins/hermes-telemetry
hermes plugins enable hermes-telemetry
chmod +x ~/.hermes/plugins/hermes-telemetry/hermes-telemetry
ln -s ~/.hermes/plugins/hermes-telemetry/hermes-telemetry ~/.local/bin/hermes-telemetry

Requirements

  • Hermes Agent installed and running
  • Python 3.8+
  • Hermes gateway restart after enabling plugin

How it's built

hermes-telemetry is written in Python and integrates as a Hermes Agent plugin. It hooks into the runtime via post_api_request, post_tool_call, on_session_start, and subagent_stop events. Data is stored in a SQLite database with WAL mode enabled for concurrent reads and writes. The plugin also maintains a local pricing table in pricing.yaml and a budget configuration in budget.yaml.

The repository layout includes a dashboard/ directory containing the standalone web UI (HTML, JavaScript, and a Chart.js vendor bundle) and a dashboard/plugin_api.py for Hermes dashboard integration. The CLI entry point is _cli_entrypoint.py, and core modules include db.py, budget.py, and core_pricing.py. Tests are located in conftest.py and other test files.

Installation is done via hermes plugins install nujovich/hermes-telemetry followed by enabling the plugin and restarting the gateway. The plugin requires Python and the Hermes Agent runtime.

Source

This summary was written for Neura Market from the project's own repository. Install commands, identifiers and licence details are reproduced unchanged. The nujovich/hermes-telemetry repository is the authoritative source and the place to file issues or contribute.

Category: Observability & Telemetry · Licensed under MIT

Related Hermes plugins