Skip to content

Add Hermes usage collector for the agents panel - #9871

Open
mbot11 wants to merge 1 commit into
omacom:quattrofrom
mbot11:add-hermes-usage-collector
Open

Add Hermes usage collector for the agents panel#9871
mbot11 wants to merge 1 commit into
omacom:quattrofrom
mbot11:add-hermes-usage-collector

Conversation

@mbot11

@mbot11 mbot11 commented Sep 2, 2026

Copy link
Copy Markdown

Add Hermes usage collector for the agents panel

Summary

Adds an agents-panel usage collector for Hermes Agent, following the same record contract as the packaged claude/codex/fireworks collectors (schemaVersion: 1), so Hermes sessions show up in the agents panel alongside the built-in agents.

Why

omarchy-agent-usage-update discovers bin/omarchy-agent-usage-* collectors, and Hermes currently has none — users who work in Hermes get no usage tracking in the panel even though Hermes sessions are first-class coding-agent sessions. This fills that gap the same way every packaged collector is wired; no other changes are needed for the panel to pick it up.

Changes

  1. bin/omarchy-agent-usage-hermes — new collector:
    • reads local session stats from Hermes' state store (~/.hermes/state.db: sessions, messages, per-model token usage)
    • emits the standard display-ready JSON record (today/recent-day prompt counts, active days, per-model token breakdown, ready/status fields)
    • --write mode updates the record file atomically so a user timer (or this script being adopted into omarchy-agent-usage-update) can keep the panel fresh
    • chat sessions that arrived over messaging gateways count too — Hermes treats them as first-class sessions

Notes for review

  • The collector only reads metadata (counts, model names, token totals) — no message content, credentials, or provider keys are read or written.
  • Read-only SQLite access (mode=ro), so it never contends with a running Hermes gateway.

Testing

  • python3 -m py_compile clean
  • Verified against a live Hermes install: record matches the panel contract, per-day counts and model token totals agree with the underlying database, atomic --write lands hermes.json in ~/.local/state/omarchy/agents/usage/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant