Kanshō/Token budget meter

Token budget meter

Live spend against a token cap. Stacks token and dollar progress with an optional segmented breakdown so the operator sees where the spend went, not just how much remains.

Included in the single kansho full pack. Components are not offered as separate installs.

Mission-scoped budget with breakdown

Token budget

· mission M-2014will hit cap in ~6m at current rate
Tokens412k / 500k
Cost$9.84 / $12.00USD
Breakdown412k segmented
  • plan142k
  • tools188k
  • memory52k
  • reflect30k

Comfortable headroom

Token budget

· agent · audit-writer
Tokens88k / 400k
Cost$1.32 / $6.00USD
Breakdown88k segmented
  • plan24k
  • write56k
  • review8.0k

Without segmentation

Token budget

· run R-1039
Tokens5.4k / 6.0k
Cost$0.18 / $0.20USD

Component documentation

Token Budget Meter

components/control-plane/token-budget-meter.tsx

Purpose

Shows token and optional cost consumption against a scoped budget, including segments and forecast.

Appropriate use

Use for run, mission, agent, or time-window budget awareness when usage totals are already known.

Example

components/control-plane/token-budget-meter.tsx has a representative live example in the "Mission-scoped budget with breakdown" section on /components/token-budget-meter.

States

Threshold presentation derives from used/max; cost, costMax, scope, forecast, and named spending segments are optional.

API and props

TokenBudgetMeter accepts used, max, cost, costMax, segments, scope, forecast, and className; each segment supplies id, label, tokens, optional cost, and optional tone.

Dependencies

Direct imports are React, ProgressMeter, number formatting, and cn.

Accessibility

Used and maximum tokens, percentage, optional cost, segment labels, and warning/forecast copy are visible text; colour is supplemental.

Limitations

It does not enforce limits, project usage, validate totals, clamp invalid values before all calculations, choose pricing, or render the accepted per-segment cost value.

Source

Source: components/control-plane/token-budget-meter.tsx.

Full pack

components/control-plane/token-budget-meter.tsx is documented at /components/token-budget-meter and installs only through the single Kansho full pack; no individual component install is offered.