← Blog

Field notes3 min read

Agentic coding is cheap per call, but expensive per hour

A single model call costs little, but four coding agents for an afternoon add up fast. Mirasim keeps a ledger on your machine that shows where the budget went.

Mirasim settings: connecting a model provider and choosing where its key comes fromMirasim settings: connecting a model provider and choosing where its key comes from

Why agent spend stays invisible until it gets large

Per model call
Trivially cheap, so nobody checks
Per hour with several agents
Re-reading files, retrying, long context

Neither the per-call cost nor the hourly spend is hidden; the numbers are just kept in places you rarely check, recorded in units that do not answer the questions you actually ask. "Was this week expensive?" cannot be answered from a raw list of API calls. The model provider's dashboard does not close this gap either, because it only knows what your account spent, not which agent, repository, or session spent it:

Model provider dashboard
Mirasim's local ledger
What it records
Only the total amount your account spent
Tokens, cache hits, and estimated cost for every call
How spend is broken down
Only by account, not by agent, repository, or session
Broken down by agent, model, account, workspace, and session
What the cost figure is
The actual invoice amount you owe the provider
A local cost estimate computed on your own machine
While a provider dashboard only shows your account total, Mirasim's local ledger gives you the breakdown by agent and session you need when a bill runs high.

Mirasim keeps one local ledger on your own machine

  1. An agent makes a model call
  2. Passes through the local proxy

    Every call already passes here and is recorded on the spot

  3. Written to one local ledger

    Usage and cost are decoded and computed only on your machine

  4. Pick a time window to view

    Choose today, 7, 30, or 90 days to see the key numbers

Mirasim's local ledgerRecords tokens, cache hits, and estimated cost per call
  • Headline summary numbersTracks calls, tokens, cache hit rate, and estimated cost
  • Multi-dimensional breakdownBreaks spend down by agent, model, account, workspace, session
  • Split by call routeSplits calls between Mirasim's platform quota and your account
Each headline number is compared against the previous period so "more than usual" is a fact rather than a feeling, while the route split shows which side is paying for what.

What having a local ledger changes in practice

What you get from the ledger is clear cost attribution. Once spend is broken down by model and by session, the expensive habits become visible and specific:

  • An agent gets stuck in a long-context loop and re-reads the same directory tree on every turn.
  • A model's reasoning level is left on high for a task that never needed it.
  • The cache hit rate drops because a prompt now changes on every model call.

The ledger also lets you test a model choice with data instead of guesswork. Each session carries its own model and reasoning level, so switching to a cheaper model takes a single change, and after a week you can check the ledger to see whether the cheaper option actually cost you anything in results.

Keep reading