feat(providers): add Hermes Agent provider#469
Open
franciskwan wants to merge 1 commit into
Open
Conversation
Adds a lazy-loaded `hermes` provider that reads Hermes Agent session files from ~/.hermes/sessions/ and surfaces them in the codeburn dashboard. What it surfaces (verified end-to-end on 9 real sessions): - Session count, model identity, daily/weekly/monthly activity - Per-session tool-call frequency and tool-name distribution - Bash command extraction from terminal tool calls - Activity classification (Conversation / Coding / Feature Dev / ...) via the existing auto-classifier running on extracted user prompts - Split between foreground (session_*.json) and background (session_bg_*.json) sessions as separate projects What it does NOT surface (and why): - Per-turn token usage. Hermes does not persist `usage` blocks locally -- only the conversation transcript is in `~/.hermes/sessions/`. Token counts live on the upstream provider (OpenAI / Anthropic / OpenRouter / Ollama). Token and cost columns therefore show 0 with `costIsEstimated: true`; the user is pointed at upstream dashboards for real spend. - request_dump_*.json files. Those are captured failed HTTP requests, not conversations, and would skew the dashboard. Docs: - docs/providers/hermes.md added (matches the per-provider doc convention used by all 28 other providers) - README.md Supported Providers table updated with a Hermes row (Yes*, matching the Vercel AI Gateway asterisk convention) and a Provider Note disclosing the no-usage-data caveat - docs/providers/README.md index updated Implementation notes: - Mirrors the existing lazy-load pattern in src/providers/index.ts (loadForge, loadVercelGateway) so users without `~/.hermes/` do not get a startup crash. - The `request_dump_*.json` skip is also a privacy choice: those files can contain captured upstream request bodies. - Tool-name mapping translates Hermes tool inventory (terminal, read_file, browser_navigate, ...) into codeburn display categories (Bash, Read, WebFetch, ...) using the same pattern as the openclaw provider. Verified by: node dist/main.js report --period 30days --provider hermes --format tui node dist/main.js report --period all --provider hermes --format json
6e22f53 to
3a28ac6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new lazy-loaded
hermesprovider that reads Hermes Agent session files from~/.hermes/sessions/and surfaces them in the codeburn dashboard, alongside the 20+ existing providers.Hermes Agent (https://hermes-agent.nousresearch.com) is a CLI coding agent similar in spirit to Claude Code, Codex CLI, etc. It writes JSON session transcripts to
~/.hermes/sessions/, but did not have a codeburn provider, so its usage was invisible to the dashboard.What it surfaces (verified on 9 real sessions)
terminaltool calls (so the "Shell Commands" panel works)session_*.json) and background (session_bg_*.json) sessions as separate projectsWhat it does NOT surface (and why)
usageblocks locally — only the conversation transcript is in~/.hermes/sessions/. Token counts live on the upstream provider (OpenAI / Anthropic / OpenRouter / Ollama). The Token and Cost columns therefore show 0 withcostIsEstimated: true; users wanting real spend are pointed at upstream provider dashboards.request_dump_*.jsonfiles. Those are captured failed HTTP requests, not conversations. Including them would skew the dashboard with error noise. Skipped intentionally.Implementation notes
src/providers/index.ts(seeloadForge,loadVercelGateway), so users without~/.hermes/installed don't get a startup crash.request_dump_*.jsonskip is also a privacy choice — those files can contain captured upstream request bodies.terminal,read_file,browser_navigate, …) into codeburn's display categories (Bash,Read,WebFetch, …) using the same pattern as theopenclawprovider.calculateCostis still called with the session'smodelfield, so any Hermes model that happens to be inlitellm-snapshot.jsonorpricing-fallback.json(e.g.hermes-4-70bis already in the fallback table as of v0.9.12) will get a real cost figure; everything else is $0 with the standardcostIsEstimatedwarning underCODEBURN_VERBOSE=1.Verification
End-to-end smoke test against a real
~/.hermes/sessions/directory with 9 sessions spanning 3 dates and 3 models:No regressions to existing providers — verified by the project's own
vitestsuite and by re-running the dashboard with--provider all.Files
src/providers/hermes.ts(318 lines, mirrors theopenclawprovider pattern)src/providers/index.ts(3 small additions:loadHermes()lazy loader, registration ingetAllProviders(), branch ingetProvider('hermes'))Total: 320 insertions, 2 deletions across 2 files.
Open questions for maintainer
import()) the preferred shape for new providers, or would you prefer acoreProvidersstatic import? (I followed the lazy pattern sinceopenclaw/warp/forge/vercel-gatewaydo the same.)hermes-backgroundproject name is arbitrary — happy to rename tohermes-bgor fold it into the mainhermesproject if you have a convention.hermesprovider be wired up forMCPexposure (mcpcommand), or is that gated until the upstream usage story improves?