Stat

A KPI tile: one metric with its label, current value, and optionally its change, direction and judgment.

rendered, live
the wire — click a line to scrub
the contract — Stat in catalog.json
{
  "type": "object",
  "description": "A KPI tile: one metric with its label, current value, and optionally its change, direction and judgment.",
  "properties": {
    "component": {
      "const": "Stat"
    },
    "label": {
      "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString",
      "description": "Short name of the metric, e.g. 'Error rate'. Required — it is also the tile's accessible name."
    },
    "value": {
      "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicValue",
      "description": "The current reading, raw and unformatted (a number like 12400, or a short string like 'Healthy'). Bind with {\"path\": ...} when it will update."
    },
    "unit": {
      "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString",
      "description": "Unit rendered beside the value: 'ms', '%', 'req/s', or an ISO 4217 currency code like 'USD' (currencies are formatted in the user's locale). Omit for unitless values."
    },
    "delta": {
      "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicNumber",
      "description": "Signed change versus the comparison period, as a raw number (e.g. -38). The renderer formats the sign."
    },
    "caption": {
      "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DynamicString",
      "description": "One small line of context under the value, e.g. 'vs previous hour'."
    },
    "trend": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "up",
            "down",
            "flat"
          ]
        },
        {
          "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DataBinding"
        },
        {
          "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/FunctionCall"
        }
      ],
      "description": "Direction of movement: 'up', 'down' or 'flat'. Describes, never judges — pair with intent for the judgment."
    },
    "intent": {
      "oneOf": [
        {
          "type": "string",
          "enum": [
            "good",
            "bad",
            "warning",
            "info",
            "neutral"
          ]
        },
        {
          "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/DataBinding"
        },
        {
          "$ref": "https://a2ui.org/specification/v1_0/common_types.json#/$defs/FunctionCall"
        }
      ],
      "description": "Judgment of the current reading on the shared scale. Default: 'neutral'.",
      "default": "neutral"
    }
  },
  "required": [
    "component",
    "label",
    "value"
  ]
}
the prompt-pack — paste into your agent
### Stat — a KPI tile

One metric: label, current value, and optionally its change, direction and judgment.

| prop      | type                       | required | notes                                                     |
| --------- | -------------------------- | -------- | --------------------------------------------------------- |
| `label`   | string                     | yes      | short metric name, e.g. `"Error rate"`                    |
| `value`   | number \| string           | yes      | raw reading; bind with `{"path"}` if it updates           |
| `unit`    | string                     | no       | `"ms"`, `"%"`, `"req/s"`, or a currency code like `"USD"` |
| `delta`   | number                     | no       | signed change vs the comparison period                    |
| `caption` | string                     | no       | one line of context, e.g. `"vs previous hour"`            |
| `trend`   | `"up" \| "down" \| "flat"` | no       | direction only — never a judgment                         |
| `intent`  | intent scale               | no       | judgment of the reading; default `"neutral"`              |

```
{"id":"latency","component":"Stat","label":"Checkout p95","value":{"path":"/p95"},"unit":"ms","delta":{"path":"/p95Delta"},"trend":"down","intent":"good","caption":"vs previous hour"}
```