# Hermes Agent Cost Tracking: Token Spend and Cache Rate From acp-hermes report

Hermes Agent already prices each call. The acp-hermes plugin keeps a local record of it and gives you a report command: spend by model, cache hit rate, what fills your context, and per-tool output. No proxy, no account.

<div class="acp-shot-frame">
<img src="/assets/img/screenshots/hermes-report-hero.svg" alt="acp-hermes report output: MODEL SPEND showing gemini-pro-latest at 164 calls, 827K input tokens, 5.2K output tokens, and an 83% cache hit rate; CACHE hit rate 83% across 5.0M prompt tokens; CONTEXT COMPOSITION with tool results at 96% of prompt characters against 1% assistant and 3% user; and TOOLS ranked by calls, led by terminal at 160 calls, 0 errors, and 492KB of output" style="width:100%;height:auto;border:1px solid var(--line-2);border-radius:10px;box-shadow:0 20px 50px -24px rgba(0,0,0,0.9);margin:8px 0;" />
</div>

<div style="margin:8px 0 28px;padding:20px 22px;border:1px solid var(--line-2);border-radius:12px;background:var(--color-accent-light,#f0effe);">
  <p style="margin:0 0 12px;font-size:15px;line-height:1.6;color:var(--acp-text);"><strong>Just want the answer?</strong> Hermes already prices your calls. This plugin keeps the record and gives you a command to read it:</p>
  <pre data-track="HermesCost: Hero Config Copy" style="margin:0 0 12px;background:var(--color-surface,#faf9ff);border:1px solid var(--line-2);border-radius:8px;padding:12px 14px;overflow-x:auto;"><code>pip install acp-hermes && hermes plugins enable acp
# next session, then:
acp-hermes report</code></pre>
  <p style="margin:0;font-size:13px;color:var(--acp-text-dim);"><a href="/integrations/hermes" data-track="HermesCost: Integration Guide" style="font-weight:600;">Full Hermes install guide →</a> &nbsp;·&nbsp; <a href="https://cloud.agenticcontrolplane.com" data-track="HermesCost: Console Signup">get a workspace key →</a> &nbsp;·&nbsp; local metering needs no account at all</p>
</div>

Hermes Agent shows you what a call costs. It doesn't keep a running record. You can't ask it for last week's cache hit rate, or which tool's output is filling your context. `acp-hermes` fills that gap. It listens to the same request Hermes already prices and writes it to a file you can query.

This page covers what it records, what `acp-hermes report` prints, and what it leaves blank.

## Where the numbers come from

The plugin registers four Hermes hooks. Two of them do the cost work.

| Hook | What it records |
|---|---|
| `post_api_request` | Each model request: the model, token counts (input, output, cache read, cache write, reasoning), and latency. Priced with Hermes's own pricing engine. |
| `post_llm_call` | Where the prompt text came from on each turn: system, user, assistant, tool results. |

Both run inside Hermes, in the process that is already making the call. Nothing sits in front of the model API. That's different from how cost tracking works for [Claude Code](/blog/claude-code-cost-tracking-reference) and [Codex CLI](/blog/codex-cli-cost-tracking), which read usage numbers from the model traffic or the session transcript.

The other two hooks, `pre_tool_call` and `post_tool_call`, handle tool-call checks and audit. The tool table in the report also comes from `post_tool_call`.

Rows go to `~/.acp/hermes-local.db`, a SQLite file on your machine. The metering side uploads nothing.

## What the report shows

After a session, `acp-hermes report` prints the last 7 days:

```
ACP local report — last 7 days (this machine, ~/.acp/hermes-local.db)

MODEL SPEND
  model                    calls   in-tok  out-tok  cache
  gemini-pro-latest          164     827K     5.2K    83%

CACHE  hit rate 83% (4.1M of 5.0M prompt tokens read from cache)

CONTEXT COMPOSITION (share of prompt chars, all turns)
  tool results 96% · system 0% · assistant 1% · user 3%
  Tool results dominate your context — truncating or summarizing large
  tool outputs is usually the cheapest big win.

TOOLS (top by calls)
  tool             calls  errors  avg ms   output
  terminal           160       0    1201    492KB
```

That sample comes from the agent that runs ACP's own ops backlog. Each section answers one question.

- **Model spend** shows calls, input and output tokens, and cache share per model. When Hermes can price the route, the report also totals the dollars.
- **Cache** is the overall hit rate. At 83%, most of what the model reads each turn is billed at the cache rate. If the number drops from one session to the next, look into it before it shows up in the total.
- **Context composition** shows where the prompt text comes from. In a coding or research agent it's usually tool results. Truncating or summarizing what a tool returns often saves more than switching to a smaller model.
- **Tools** shows calls, errors, average latency and output size per tool. A tool with big outputs is the next candidate for the same fix.

`--days 30` widens the window. `--json` prints the same figures as data, so you can feed them back to the agent.

## Unpriced routes stay unpriced

Hermes's pricing engine knows its usual routes, including OpenRouter and Bedrock. If a call goes through a route it can't price, the report marks it unpriced and says how many calls that was. It doesn't make up a number. Token counts stay exact. For a local report that matters, because it's often the only place the figure exists.

## Turning it off or moving it

```bash
export ACP_LOCAL_METERING=off      # turn local metering off
export ACP_LOCAL_DB=/path/to.db    # move the database (default ~/.acp/hermes-local.db)
```

If `acp-hermes report` says there's no metered activity, the plugin probably isn't enabled. Run `hermes plugins list`. A session that started before you ran `hermes plugins enable acp` won't pick the hooks up. Also check that `ACP_LOCAL_METERING` isn't set to `off`.

## What the cloud side adds

`acp-hermes login` is a separate, optional step. It connects the plugin to a workspace, so each tool call is checked against allow, ask and deny rules and logged across your machines. The report works the same with or without it, because pricing happens on your machine either way. Decide on login for the rules and the log, not for cost.

If ACP can't be reached, the plugin lets the tool call go ahead and writes a warning. The call shows up in the console as having run ungoverned.

## Budget limits

The report is a number after the fact. It doesn't stop anything. ACP does have a spending budget in the console (Settings → Limits) that can halt tool calls at a cap, but it only counts model spend ACP can see. The Hermes metering stays on your machine, so this report doesn't feed that cap. If a hard limit matters more than visibility, don't count on this plugin for it.

## Frequently asked questions



## Where to read more

- [Claude Code cost tracking reference](/blog/claude-code-cost-tracking-reference): how cost tracking works for Claude Code, for comparison
- [Codex CLI cost tracking](/blog/codex-cli-cost-tracking): the same for Codex
- [Hermes Agent install guide](/integrations/hermes): the full plugin setup, including rules and audit
- [Setting up an autonomous Hermes agent safely](/blog/setup-hermes-autonomous-agent-safely): the rules side of the same plugin, for unattended runs
