Skip to content

Agent Run Pivot

A pivot explorer for agent runs. Drag fields into Filters, Columns, Rows and Values, watch the table change while you drag, and read subtotals, totals and hot cells. Everything works from the keyboard, and you can ask for a pivot in words.

On this page

Examples

Drag Model into Columns, or press Enter on a field. Click a cell for Filter to this and Open runs.

Controlled layout

Ask to pivot

Installation

Installation is part of Pro

Pro components install from a licensed registry. The live preview stays open to everyone.

Props

recordsrequired
Record<string, string | number>[]
One object per run. Dimension fields are read as text, measures as numbers. About 5,000 records compute in a few milliseconds; the table is memoised on the records and the layout.
fieldsrequired
PivotField[]
{ id, label, kind: "dimension" | "measure" }. A dimension may have order (display order of its values), aliases and valueAliases (words that mean it in a question). A measure may have source (the record key), aggs (the aggregations it offers, first is the default; sum, avg, min, max, count, p95; a measure that can be summed also gets % of total) and format (number, compact, currency, percent, ms).
layout
PivotLayout
Defaultuncontrolled
{ filters: { field, include }[], columns: string[], rows: string[], values: { field, agg, heat? }[] }. Pass it with onLayoutChange to control the pivot. An unknown field or a misplaced one is dropped.
defaultLayout
PivotLayout
Defaultempty
The starting layout when you do not control it.
onLayoutChange
(layout) => void
Runs after every move, aggregation change, filter, Swap, Clear and Ask result.
interpret
(text, fields, signal) => Promise<Partial<PivotLayout>>
Turns a question into a layout (your model). Without it the Ask row is hidden. The row shows thinking with Stop, an error with Try again, and the result with Undo. It runs only on Ask, never while typing. fields carry each dimension's values as options.
interpretKeywords
(text, fields, options) => PivotLayout | null
The small deterministic reader the demo uses: measures it names, by for rows, per or across for columns, only or where for filters (values and their aliases), and aggregation words. Use it as a fallback or a starting point.
suggestions
string[]
Example questions under the input. Clicking one fills the input and does not run.
onCellAction
(action: CellAction) => void
A cell's menu has Filter to this (applied for you, then reported) and Open runs (reported with the matching records, the row and column path and the current filters, so you can open a run list or Agent Monitor). Without it Open runs is hidden.
fileName
string
Defaultagent-run-pivot
The name of the CSV that Export CSV saves, without the extension.
title / description
string
The heading and a line under it.
heat
boolean
Defaulttrue
Low to High shading on the deepest rows.
maxHeight
number
Default420
The table height in pixels before it scrolls.
Wide layout
rules
When the block is 768px wide or more, the fields become a list on the left, each tagged with where it is used, and the table fills the rest like a sheet. Narrower, they are chips above the wells. Expand opens the same pivot full screen (Escape closes it).
Wells
rules
Dimensions go in Filters, Columns and Rows; measures in Values. A dimension is in Rows or Columns, not both; it can also be a filter. A measure is in Values once; its chip menu has Summarize by (Sum, Average, Count, % of total, P95), a Heat shading switch and Remove.
Table
rules
Nested row groups collapse. A group row shows its subtotal, the last row is the grand total and, with more than one column group, the last columns are the total. Cells shade from Low to High among the deepest rows. The header and first column stay in place and the table scrolls inside its card.
Keyboard
fields and wells
Enter on a field opens Add to, with the wells that can take it. In a well the arrow keys reorder the chip, Delete removes it and Enter opens its options (aggregation, move, or the values a filter keeps). Dragging opens a slot where the chip will land and shows the table as it would be; Escape cancels and dropping outside the wells removes a chip.
a11y
table
A real table with scope on every header and a caption. Moves, previews and Ask results are announced in a polite status line. Focus follows a chip you reorder. With reduced motion the chevron and fades stop.

When to use

When to use

  • Letting people slice a table of agent runs themselves: cost by model, p95 latency by tool, error rate by week.
  • A report page where the question changes every time, so a fixed chart would not do. Totals, subtotals and hot cells show where to look.

When not to use

Using with AI

Use Copy page for AI above to give your assistant this page, Copy prompt under the install command to have it installed and wired to your data, or connect the Knowns UI MCP server and just ask:

  • Add the Knowns UI Agent Run Pivot to my app and wire it to my own data.
  • I need letting people slice a table of agent runs themselves: cost by model, p95 latency by tool, error rate by week. Set that up with the Knowns UI Agent Run Pivot.
  • Which Agent Run Pivot props do I need for a minimal setup? Show me a short example.

With the server connected, your assistant calls get_component({ name: "agent-run-pivot" }) and search_docs({ query: "agent run pivot" }). Pro props, full examples and source come back once your license key is in the MCP config.

Need help?

Stuck on Agent Run Pivot, or found something off? We read every message.