agentuse:chart. The serve web UI renders the block as an
inline SVG chart in the session log; every other surface (CLI, plain text,
push) sees the raw JSON block, so sessions stay portable and greppable.
The block carries data, not presentation. Layout, colors, and theming are
owned by the renderer, so old sessions keep improving as the renderer does.
Format
Fields
Constraints and fallback
- Max 6 series and 60 categories; labels are capped at 120 characters. More series than that should be folded into an “Other” series by the agent.
- Values must be finite JSON numbers. Negative values are supported (bars extend below the zero line).
- Unknown fields are ignored. Anything that fails validation, including malformed JSON, renders as a plain code block instead of a chart: the content is never lost, it just isn’t drawn.
- Pick
barfor magnitude comparisons and funnels,linefor change-over-time. One chart, one y-scale: for two measures of different scale, emit two chart blocks.
Rendering guarantees
- Chart colors follow the app theme (light and dark) from a fixed, colorblind-validated palette. Series are colored by position, so keep the most important series first.
- Every chart includes hover tooltips per mark, a legend when there are two or more series, and a collapsible Data table for accessibility and copy-paste.