Skip to main content
Usage page in light theme
The Usage page at /usage answers “what have my AI tools actually cost?” across every machine you manage. Each visit shows durable usage history immediately, fans a fresh collection job out to your online agents, runs ccusage --json on each of them, and aggregates the reports into one view broken down by day, model, and agent.
This page reports what the AI tools themselves recorded on disk, covering all local usage including work you did outside this control plane. The per-run figures on a Plan or Session come from the run’s own token counts instead — the two answer different questions.

How collection works

The request fans out

Opening the page starts a collection against every enrolled agent. Agents that are offline, or whose control-agent build does not advertise the ccusage capability, are excluded from the eligible set and named in the status banner.

Each agent runs ccusage

A job runs ccusage --json locally, with a 120-second timeout and a 16 MB cap on output. Results stream back as each agent finishes.

Reports are merged

Daily entries from every agent are merged by date, then by model, then by agent. Successful reports are stored as they arrive, including partial collections. The whole collection has a 150-second deadline.

The page updates live

Progress arrives over a subscription and is reconciled every two seconds until the collection completes. Stored totals remain visible while the current agents load. Refresh usage starts a fresh collection without blanking the history already on screen.
The status banner above the results always shows n of N compatible agents reported, and lists offline agents, agents needing a control-agent update, and any that failed with their error text.

Reading the results

Each agent row inside the table also names the sources ccusage attributed that usage to, so you can see which tool on that machine spent the tokens.
A day can carry an Unattributed tokens row. That is usage ccusage recorded without a model attached — it counts toward totals but cannot be charted against a specific model.

Filters

  • RangeAll data, 7 days, or 30 days.
  • Agent — derives its choices from the displayed aggregate, so an offline agent with stored usage remains selectable. The web control appears once more than one agent is available; iOS shows its picker whenever the aggregate contains an agent. It narrows every chart, tile, and usage row without recollecting.
  • Model — set by selecting a model in the chart legend. The summary tiles say so explicitly when they cover one model rather than the whole range.
Selecting a model and then narrowing the range past the point where that model appears drops the model filter rather than showing a row of zeros.

History controls

Usage history is enabled each time you open the page. AIDE stores the last cumulative report from each agent plus the usage archived from earlier local histories. If an agent’s counters decrease, disappear, or later reappear because local tool history was cleared, AIDE treats the new counters as a new epoch and adds them to the preserved total.
  • History on / Live only changes only what the page displays. Collection and durable recording continue in either mode, and the choice resets to History on on the next visit.
  • Clear history asks for confirmation, then removes stored history for every agent and date. The current live collection remains visible. Reports completed before the clear cannot silently restore the deleted history; the next new collection establishes a fresh baseline.
The five-minute sidebar usage collection also updates this history. Its temporary collection jobs can be cleaned up without removing the durable totals.

Empty states

The page distinguishes several kinds of “nothing here”, so the fix is never a guess:

Notes

  • Every load still runs a fresh collection, but successful cumulative reports are stored so clearing usage from an agent does not erase previously observed totals. Use Live only when you need to compare against what agents currently report from disk.
  • ccusage must be installed on the agent. A machine that cannot run it reports a failure rather than silently contributing zero.
  • The agent does not rely on PATH alone. A service started by brew services inherits a bare PATH that hides Homebrew, npm, and bun installs, so the agent also searches ~/.local/bin, ~/.bun/bin, ~/.npm-global/bin, the directory holding its own node binary, and /opt/homebrew/bin and /usr/local/bin on macOS. Set CONTROL_AGENT_CCUSAGE_EXECUTABLE to a full path to pin an install the search misses.

Costs

The model price catalog used to estimate run costs.

Agents

The agents each collection fans out to.

Sessions

Per-run token counts and cost.

Job details

The durable job each collection runs as.