UsageMeter
UsageMeter(
__namedParameters):ReactElement
Defined in: react/components/agent/usage-meter.tsx:113
A compact token-usage meter for an agent status line: last-turn and
whole-session input/output tokens, prompt-cache hit rate, optional cost, and a
context-window fill bar — colour-coded (green→amber→red as context fills) with
↑/↓ for in/out and 💾/🪟 glyphs. Three tight rows by default, or a
single dense line with variant="compact".
<UsageMeter turn={{ input: 1234, output: 340, cacheRead: 840 }} session={{ input: 45000, output: 12000, cacheRead: 32000 }} contextSize={200_000} contextUsed={78_000} cost={0.12}/>Parameters
Section titled “Parameters”__namedParameters
Section titled “__namedParameters”Returns
Section titled “Returns”ReactElement