# Dashboards

The 4 tools for dashboards. Before an agent first makes one, it reads guide topic dashboards.

## create_dashboard

Make a dashboard or report in a space: tiles on a 12-column grid — headline numbers (with the change vs a period and a trend line), bar, line, area, pie, histogram, box plot, scatter, heatmap, treemap, sunburst and sankey charts, tables, and text in Markdown. You write no code: you fill the tiles, Artifacts draws them. Every number comes from a range in one of the space's spreadsheets and stays live: when the sheet changes, the dashboard shows it. The numbers go in a sheet first (create_sheet, or the space's sheet), laid out as the blocks the tiles read; then point each tile at its range. Tiles go in rows in the order given, each row filled to the 12 columns: headline numbers first, then charts, then tables. People drag and resize the tiles and comment on a tile. Read guide topic "dashboards" first; check it with render_dashboard.

Parameters:
- `space_id` (string, required)
- `title` (string, required)
- `subtitle` (string): One line: what it covers and when it was last true — "Q4 2026 to date, from the Finance model".
- `look` (object): How it looks; people change the same in its Customize panel. Each part given replaces that part; "" sets it back to the default.
- `tiles` (object[], required): In reading order; tiles without x and y are placed left to right where they fit.

## read_dashboard

A dashboard as it is now: subtitle, look, and each tile in order with its id (what update_dashboard and comment take), kind, sheet and ranges, place on the grid (x, y, w, h — people may have moved them), what it shows now from the sheets, and any error or problem.

Parameters:
- `item_id` (string, required)

## update_dashboard

Change a dashboard. Any of: title, subtitle, look (color scheme, heatmap scale, font, trend lines on headline numbers, search bar on tables); add_tiles (in rows under the others, or at x and y); change_tiles (by id: the fields you give replace those fields, "" clears one; give x, y, w, h to move or resize); remove_tiles (ids); order_tiles (every id: lays all tiles out again in that order, in full rows); tidy (true: lays all tiles out again in their reading order, in full rows — after removing or resizing tiles leaves gaps). Applied in that order; read_dashboard first to get the ids.

Parameters:
- `item_id` (string, required)
- `title` (string)
- `subtitle` (string)
- `look` (object): How it looks; people change the same in its Customize panel. Each part given replaces that part; "" sets it back to the default.
- `add_tiles` (object[])
- `change_tiles` (object[])
- `remove_tiles` (string[])
- `order_tiles` (string[])
- `tidy` (boolean)

## render_dashboard

See a dashboard as people do: screenshots from the top at 1280 px, plus checks — tiles showing an error (a range that no longer reads), cells that are not numbers, pies with too many slices, charts with too many series or groups, histograms and box plots with too few values, sankey flows that loop, empty space in the grid — and errors the page hit.

Parameters:
- `item_id` (string, required)
- `from_screen` (integer): First screen to show, default 1.
