Usage and cost
Every model call in one local ledger — tokens, cache hits, estimated cost — computed on your machine and nowhere else.
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 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.
- 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.
- ArchiveRaw payloads land on disk
Authorization headers are fingerprinted the instant they hit disk.
- DecodeRecordings are decoded offline into token, cache and model data
This is the local usage ledger. It survives after raw payloads are reclaimed.
- 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.
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 disclosureSomething wrong or missing on this page? Tell us