All plugins

costguard

A brake pedal for model spend. Meters every API call per session and per day from the provider's own usage block; dollar figures are estimates computed only for models in its price table and are never invented for unknown models. When a provider reports no usage (common with streaming OpenAI-compatible endpoints), it falls back to request-size estimates and flags those calls as estimated in every total, never pricing them. Warns the agent at a configurable ratio of any configured budget and blocks tool calls once a session or daily token/cost budget is exceeded, stopping the tool loops where runaway spend happens; with no budget configured it only meters and reports. Disclosure: observes API request/response metadata (token usage, model, session id) and tool call names in profiles where it is enabled; stores only aggregate counters locally under $HERMES_HOME/costguard/; makes no network calls; the brake cannot cancel the reply already being generated when a budget trips, it stops the tool work that reply tries next.

Whydiriki700Toolsv0.1.0Updated 2 hours ago

About

A brake pedal for model spend. Meters every API call per session and per day from the provider's own usage block; dollar figures are estimates computed only for models in its price table and are never invented for unknown models. When a provider reports no usage (common with streaming OpenAI-compatible endpoints), it falls back to request-size estimates and flags those calls as estimated in every total, never pricing them. Warns the agent at a configurable ratio of any configured budget and blocks tool calls once a session or daily token/cost budget is exceeded, stopping the tool loops where runaway spend happens; with no budget configured it only meters and reports. Disclosure: observes API request/response metadata (token usage, model, session id) and tool call names in profiles where it is enabled; stores only aggregate counters locally under $HERMES_HOME/costguard/; makes no network calls; the brake cannot cancel the reply already being generated when a budget trips, it stops the tool work that reply tries next.

CostGuard

A brake pedal for model spend.

Dashboards show what an agent already spent. CostGuard enforces a budget
while there is still time for it to matter.

What it does

  • Metering. post_api_request records every API call from the
    provider's own usage block: exact input/output tokens, accumulated per
    session and per day, under <HERMES_HOME>/costguard/usage.json.
    Dollar figures are estimates computed only for models in the price
    table (built-in reference list prices, overridable in settings);
    unknown models are metered in tokens with cost honestly left unknown.
  • Estimated fallback, labelled. Some OpenAI-compatible endpoints
    report no usage block when streaming. For those calls CostGuard falls
    back to Hermes' own request-size approximation (pre_api_request)
    plus a chars/4 output estimate, and the call is flagged
    estimated_calls in every total, never silently presented as exact,
    and never priced.
  • Warning. pre_llm_call tells the agent when it crosses the
    warning ratio (default 80%) of any configured budget, and states
    plainly when a budget is already exhausted.
  • The brake. pre_tool_call: once any configured budget is
    exceeded, tool calls are blocked with a budget message (CostGuard's
    own status tool stays available). Runaway spend in practice is tool
    loops, each iteration another API call, and the brake stops the loop.

One honest limit: the brake cannot cancel the reply already being
generated when a budget trips; it stops the work that reply tries to
do next. With no budget configured, CostGuard only meters and reports;
it never blocks.

Configuration

plugins:
  entries:
    costguard:
      settings:
        session_token_budget: 200000      # 0 or absent = off
        daily_token_budget: 1000000
        session_cost_budget_usd: 2.00
        daily_cost_budget_usd: 10.00
        warn_ratio: 0.8
        prices:                            # USD per 1M tokens, overrides
          my-model: { input: 1.0, output: 2.0 }

Inspect with /cost, the costguard_status tool, or
hermes costguard usage. Budget breaches are also appended to
<HERMES_HOME>/costguard/events.jsonl.

Disclosure

CostGuard observes API request/response metadata (token usage, model,
session id) and tool call names in sessions of profiles where it is
enabled. It stores only aggregate counters locally, makes no network
calls, and starts no processes. Metering errors never break the agent
loop. Declared capabilities in plugin.yaml match the registered hooks
and tool exactly.

Verification

  • hermes plugins validate: passed, security scan safe.
  • hermes plugins doctor: OK, 1 tool and 4 hooks registered under the
    real runtime contracts.
  • Unit tests cover exact metering math, price lookup (exact, prefix,
    override, unknown), the estimated fallback, warning thresholds, and
    the brake (blocks over budget, allows under budget, exempts its own
    status tool, never blocks with no budget configured).
  • Live session test: with a small session token budget configured
    against an endpoint that reports no streamed usage, the estimated
    metering accumulated across calls and the brake blocked further tool
    calls once the budget was exceeded.

README from the reviewed commit 967e2b7; it updates when the author re-pins.

More by Whydiriki700

4 plugins by Whydiriki700 in the catalog.

Whydiriki700proofgateNo proof, no done. Verifies an agent's completion claims (file created, message sent, command ran, tests passed, figures quoted) against the tool evidence recorded in the same session, before the final reply is delivered. Unproven claims are flagged as unverified or withheld, fail closed, and every verdict is written to an append-only ledger stored locally in $HERMES_HOME/proofgate/. Disclosure — observes every tool call and final reply in profiles where it is enabled and stores tool arguments (sensitive-named keys redacted) and the first 800 characters of every tool result, unredacted, in append-only files under $HERMES_HOME/proofgate/ with no rotation; makes no network calls; in the default enforce mode it holds reply streaming and may append warnings to or entirely withhold a reply judged by keyword heuristics to contain unproven claims.Communitytools1Whydiriki700money-magnetFinance tracker and money magnet for Hermes Agent: record income and expenses, set a monthly budget and watch it fill, value a crypto portfolio against live prices, and scan for price gaps between exchanges. Transactions and budget live in local JSON under $HERMES_HOME/money-magnet/. Disclosure: the portfolio and arbitrage tools query the public CoinGecko and Binance price APIs (no account or API key; only coin symbols are sent). The tracker tools work fully offline.CommunitytoolsWhydiriki700token-dashboardToken cost and usage dashboard for Hermes Desktop: a right pane with the focused session's live input and output tokens, session cost (backend-reported cost_usd when available, otherwise a labelled estimate from a built-in per-model price table), API calls and context usage bar, plus a recent-sessions overview with message counts and a status bar cost chip. Desktop-only (desktop/plugin.js inside the plugin SDK surface); no agent tools, hooks, middleware, or env vars. Disclosure: reads the focused session usage state and the session list through the Desktop host API and renders them locally; no network calls, no storage.CommunityDesktop app