Operations

Cost Control

Designing workflows so expensive model calls happen only when useful.

Cost Control

What it is

Designing workflows so expensive model calls happen only when useful.

In plain terms

It works like a toll bridge that only charges when you actually cross it, instead of a flat monthly pass you pay whether you drive that day or not. Cost control is Hermes’s habit of only spending on a model call - and only on an expensive model - when the situation actually calls for it.

Why it matters

Schedules, wake conditions, no-model jobs, and provider choice all aim at one design habit rather than a single setting: making sure an expensive model call only happens when the answer would actually change based on new information. A monitoring job calling a large model every 15 minutes to check if anything changed is a cost-control failure even when it works correctly. This is treated as its own workflow pattern precisely because it cuts across so many other concepts instead of living in one place.

How it works

Beyond deciding when a model call happens at all, Hermes also warns you before committing to how expensive a given call will be. Selecting a model runs a pricing check against the models.dev catalog, and if the input cost exceeds $20 per million tokens or the output cost exceeds $100 per million, Hermes surfaces an explicit confirmation naming the model, provider, and known per-token rates rather than letting the pick pass silently (hermes_cli/model_cost_guard.py). The guard only fires when pricing data is actually known for that model - an intentional tradeoff, since warning on unknown pricing either way would be a guess. This complements the scheduling-side habits covered elsewhere: keeping the choice of model itself in view, not only how often it gets asked to run.

A concrete example

You’re browsing the model picker and select a frontier model with premium pricing for what was meant to be a quick one-off task.

  1. Hermes looks up that model’s per-token cost in its pricing catalog.
  2. It finds the output cost crosses the $100-per-million-token threshold.
  3. Instead of letting the pick go through unremarked, it shows you the exact rate and asks you to confirm before your next message actually gets sent at that price.

How it connects

This note belongs to the Operations family. Its closest neighboring concepts are: Provider Switching, Project Isolation, Agent Runtime, Personal OS.

Source evidence

  • vendor/hermes-agent/run_agent.py:1892-1902#AIAgent._flush_messages_to_session_db — Verified Source Map evidence for AIAgent. AIAgent uses thin forwarding methods to delegate system-prompt construction to agent.system_prompt.build_system_prompt, API kwargs construction to the chat-completion helper, and streaming requests to interruptible_streaming_api_call.

Workflows

  • Cost-Aware Automation
  • No article currently mentions this concept by name/alias often enough to qualify (see mention-mining policy).