Mirasim Build Fund$100 – $10,000in free credits for builders — nothing to repay.500 seatsApply
← The Mirasim GuideChapter 09

Usage and cost

Every model call in one local ledger — tokens, cache hits, estimated cost — computed on your machine and nowhere else.

7 min read, 4 sections, in Models & cost

The traffic monitor#

Agents are cheap per keystroke and expensive per hour, and the gap between those two facts is where budgets disappear. The traffic monitor is one ledger of every model call, so "what did this week cost, and on what" is a question with an answer.

Pick a window — today, 7, 30 or 90 days — and the page leads with the numbers that matter: calls, total tokens, output tokens, cache hit rate and estimated cost, each against the previous period.

The ledger, open over the workbench
The Mirasim traffic monitor open in Settings, with the quota fallback utilization panel and the title-bar usage indicator highlighted.

The whole ledgerCalls, tokens, cache hit rate and estimated cost for the window you picked, then the breakdown by agent, model, account, workspace and session. — this control is not on the captured screen.

The buttons in this panel work — click them to look around.

It is computed locally, and the page shows you the chain#

Nothing on this page is a cloud analytics product. The page itself states where the data comes from and how many cloud requests were needed to render it.

How a number on this page came to exist
  1. ForwardThe local proxy passes model traffic through verbatim and tees a copy

    127.0.0.1 — no rewriting, no parsing, and it never blocks the live session.

  2. ArchiveRaw payloads land on disk

    Authorization headers are fingerprinted the instant they hit disk.

  3. DecodeRecordings are decoded offline into token, cache and model data

    This is the local usage ledger. It survives after raw payloads are reclaimed.

  4. RenderThis page aggregates and draws the ledger

    Reads local disk only.

Finding where the money went#

The trend chart splits token usage over time by kind, by agent, or by model — and reading it once teaches you the most useful fact about agent cost: cache reads usually dominate, so the interesting line is the one underneath them. Click a legend entry to hide a component and see the rest.

The breakdown table then answers "by what" across five dimensions — agents, models, accounts, workspaces and sessions — with token share, calls, input, output, cache reads, hit rate, estimated cost and last activity. Clicking any row adds it to the page-wide filter, so you can narrow from "this month" to "this session, on this model" in a couple of clicks.

  • Per workspace — which project is actually consuming the budget.
  • Per session — the one long-running conversation that cost more than the rest of the day.
  • Per account — how spend divides across your subscriptions and keys.
  • Per model — whether the expensive model earned its place.

Down to a single call#

The call ledger lists calls newest first — time, agent, model, status, duration, workspace. Select one and the detail drawer gives its provider, duration and size, token breakdown, reasoning tokens, cache hit rate and estimated cost, plus the raw request and response bodies while they are still on disk. Once retention has reclaimed the raw payloads, the drawer says so and the statistics remain complete.

Export the current view to CSV when you need it somewhere else, or reveal the ledger and recordings in Finder to see exactly what is stored.

The same ledger from a script
mirasim ui-cli --port 4970 traffic stats --days 30 --group-by model
mirasim ui-cli --port 4970 traffic calls --hours 24 --limit 50
mirasim ui-cli --port 4970 traffic meta      # footprint + export disclosure

Something wrong or missing on this page? Tell us