Skip to content

Hermes Agent Data Source (Experimental)

Hermes Agent support is experimental. Expect changes while both ccusage and Hermes Agent continue to evolve.

ccusage can read Hermes Agent session usage from its local SQLite state database. The adapter uses the same focused and unified report shape as the other local coding CLI data sources.

Focused Views

bash
bunx ccusage hermes --help
bash
npx ccusage@latest hermes --help
bash
pnpm dlx ccusage hermes --help

Data Source

The CLI reads Hermes Agent session rows from $HERMES_HOME/state.db. When HERMES_HOME is not set, ccusage checks ~/.hermes/state.db.

bash
HERMES_HOME="$HOME/.hermes" ccusage hermes daily
text
~/.hermes/
└── state.db

Report Views

Focused viewDescriptionSee also
ccusage hermes dailyAggregate usage by dateDaily Usage
ccusage hermes monthlyAggregate usage by monthMonthly Usage
ccusage hermes sessionGroup usage by Hermes session IDSession Usage

These views support --json, --compact, --offline, --since, --until, and --timezone.

What Gets Calculated

  • Token usage - Reads input, output, cache read, cache write, and reasoning token totals from Hermes session rows.
  • Total tokens - Includes reasoning tokens in the total token count.
  • Costs - Prefers recorded actual cost, then recorded estimated cost, then calculates from LiteLLM pricing when token data is available.
  • Message count - Preserves Hermes message_count in JSON metadata.

Environment Variables

VariableDescription
HERMES_HOMEOverride the directory containing state.db; comma-separated roots are supported
LOG_LEVELAdjust verbosity (0 silent ... 5 trace)

Troubleshooting

No Hermes Agent usage data found

Ensure the database exists at $HERMES_HOME/state.db or ~/.hermes/state.db. If your database lives elsewhere, set HERMES_HOME to the directory that contains state.db.

Costs showing as $0.00

If Hermes has no recorded cost and a model is not in LiteLLM or ccusage's bundled fallback pricing, the calculated cost will be $0.00.

Released under the MIT License.