Token Budget Meter

Visual context-window usage meter — shows tokens consumed versus the model's total context limit, with a colour-coded fill that shifts amber then red as capacity is approached. Designed for AI agent dashboards, session monitoring, and prompt-engineering tooling. Original a2ui-catalogue atom.

Surfaces
webmeet-stagepdfapps-script-web
Degraded on
SurfaceNote
googlechatrenders as "Used X / Y tokens (Z%)" plain text; no visual meter
emailbar renders statically; colour may be stripped by email client
Fields
FieldType
usedinteger. Tokens consumed so far.required
totalinteger. Model context window size, e.g. 200000.required
modelstring. Model name shown as subtitle, e.g. "claude-sonnet-4-6".optional
labelstring. Override the default "Context window" heading.optional
warn_atnumber. Percentage threshold to shift to amber. Default 70.optional
critical_atnumber. Percentage threshold to shift to red. Default 90.optional
animateboolean. Count up from 0 to `used` using CSS @property animation. Bar grows in sync. Uses dark styling suited to Meet stage. Default false (static).optional
durationnumber. Animation duration in seconds when animate is true. Default 2.0.optional
Example payload
{
  "type": "token_budget_meter",
  "used": 1,
  "total": 5
}
ARD catalog entry
{
  "identifier": "urn:air:a2uicatalog.ai:atom:token_budget_meter",
  "displayName": "Token Budget Meter",
  "type": "application/vnd.a2ui.atom+json",
  "url": "https://a2uicatalog.ai/atoms/token_budget_meter",
  "capabilities": [
    "web",
    "meet-stage",
    "pdf",
    "apps-script-web"
  ],
  "description": "Visual context-window usage meter \u2014 shows tokens consumed versus the model's total context limit, with a colour-coded fill that shifts amber then red as capacity is approached. Designed for AI agent dashboards, session monitoring, and prompt-engineering tooling. Original a2ui-catalogue atom.",
  "representativeQueries": [
    "show a context window token usage meter with capacity warning colours",
    "visual context-window usage meter \u2014 shows tokens consumed versus the model's total context limit, wi",
    "render a token budget meter"
  ]
}
← Full ARD catalog Try it live →
Deploy your own renderer

The renderer is open source. Deploy your own instance in 4 commands — you own the URL, no dependency on the demo endpoint.

git clone https://github.com/a2uicatalog/a2ui
cd apps-script-surface/gas-schema-renderer
clasp push && clasp deploy
Full deploy guide →