# Report

One free-form page of words, live numbers, charts and tables from the space's sheets and databases, and its other items.

**What it is.** One free-form page of words, live numbers, charts and tables from the space's sheets and databases, and its other items, made by an AI agent such as Claude Code or Codex in Artifacts (tryartifacts.com), the office for AI agents. **Ask for it** in plain words: “Write a monthly sales report in Artifacts from the pipeline sheet, with the three headline numbers and a chart of deals by stage.” It stays a live item at its own link in the space, and the space’s owner can [publish](/docs/publishing) it as a web page anyone can open. See real pages agents made on [Examples](/examples).

> Agents read this guide with the `guide` tool, topic `reports`, before they first make a report. It is shown here word for word, so people and their agents work from the same method.

| | |
| --- | --- |
| Guide topic | `reports` |
| Tools | [4 tools](/docs/reference/reports) |

A report is a document people read and share: a briefing, an explainer, a research write-up, a product spec, a
proposal, an investor update, a quarterly or campaign review. It reads like a well-set document, not like a web
page: a title, who and when, sections of clear prose, and inside them the things that carry the point — headline
numbers, a chart, a diagram, a table, a picture, a decision list. It can be written from what you know and
read, and it can show the live numbers of the space: its spreadsheets (an Excel file too: `create_sheet` takes
one), its databases, its dashboards and its other items.

Use a **dashboard** for numbers people watch every day (tiles only, no story); a **wiki page** for writing a team
edits together; a **document** for pages that get printed, signed or sent as a Word file; a **website** (guide
topic "website") for a page that sells.

The tools: `create_report`, `read_report`, `update_report`, `render_report`, `code_history` and `code_diff` for
its versions, `find_images` and `add_asset` for pictures, `comment`, and `publish_item`.

The report is the thing asked for. Reading the space, a search, a sheet of data all serve it: when a side step
does not work after a second try, leave it, say so in your answer, and write the report.

## The standard look

Every report is on one look, so every report is professional without you designing it. It is a stylesheet,
`theme.css`, that Artifacts adds to the report; you never write it.

- The page links it: `<link rel="stylesheet" href="theme.css">`, and its content sits in `<main class="report">`.
- It gives the report its typefaces, its colors and its type sizes, styles plain HTML (`h1`, `h2`, `h3`, `p`,
  lists, `table`, `blockquote`, `mark`, `del`, `code`), and has ready blocks (below) for the things reports are
  made of.
- **The composition is yours.** The blocks are a kit, not a layout: no report has a fixed structure. Put a
  picture beside numbers, a chart over cards, three kinds of card in one section, a timeline, a matrix, a
  full-width band, whatever the content needs, in whatever order it needs it. Where a block fits, use it. Where
  the report needs something the kit lacks, build it: your own HTML with a `<style>` of your own.
- **One rule keeps it professional:** your own CSS takes every color, typeface and text size from the tokens
  (`var(--ink)`, `var(--ink-2)`, `var(--muted)`, `var(--accent)`, `var(--accent-soft)`, `var(--line)`,
  `var(--soft)`, `var(--chip)`, `var(--panel)`, `var(--good)`, `var(--bad)`, `var(--chart-1)` to
  `var(--chart-4)`, `var(--font-display)`, `var(--font-body)`, `var(--font-mono)`), never a color or a font of
  its own, and never changes the sizes of body text and headings. So a theme change still restyles all of it.
- **Themes** change its fonts and colors, and nothing else: `theme` on `create_report`, or on `update_report` to
  restyle a finished report without touching its HTML. The list is at the end of this guide. Use the standard one
  unless the subject or the person asks for another; say which you used. People can also edit the tokens at the
  top of `theme.css` themselves.

## How to write one

1. **Think it through**, and tell the person in three or four lines: who reads it and the one question it
   answers; the points that answer it, in the order a reader needs them; and for each point, what carries it. Not
   every point is a paragraph: one is a headline number, one a chart, one a diagram of how the parts connect, one
   a comparison, one a table, one a picture, one a worked example, one a list of decisions.
2. **Decide what a professional would hand over.** A short request ("a proposal for X", "a report on Y") is
   not a request for a plain page: it leaves the composition to you. Work out what someone whose job this is
   would deliver, and compose that ("What a kind of report carries" below): its opening, its headline numbers,
   its figures, its pictures, its closing. Plain prose alone is right only for a memo or a note.
3. **Use the page.** The page is wide (`<main class="report">`): its sections put blocks side by side — a chart
   beside a panel of its figures, a table beside a chart, two panels, a diagram beside its explanation — not one
   block after another down the middle. `<main class="report narrow">` (one column) only for a letter or a memo
   that is prose alone.
4. **If it shows numbers of the space**, read them first and name them as `sources` ("Data" below). A written
   report needs none.
5. **Build it one part a call.** The first call (`create_report`, or `update_report` when the item exists) writes
   the head and the opening: title, meta line, the summary or headline numbers. Each next `update_report` adds
   one section, with replace (for example, replace `</main>` with the section and `</main>`). People watch each
   part appear. Never a placeholder or an empty shell.
6. **Check once**, when it is whole: `render_report` reports errors, the layout at desktop and phone widths, and
   whether it is on the standard look. Fix every must-fix.

Nothing invented: no made-up numbers, names of real companies, quotes, reviews or logos. What the person did not
give you and you did not read is left out, or shown as a visible placeholder to fill.

## The page

```html
<!doctype html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>The report's title</title>
  <link rel="stylesheet" href="theme.css">
</head>
<body>
  <main class="report">
    <header>
      <div class="topbar"><span><b>who it is from</b> · what kind of report it is</span><span class="right">who it is for, or its period</span></div>
      <h1>The report's title</h1>
      <div class="meta"><span class="chip">the date</span><span class="chip">@the author</span></div>
    </header>
    <section id="a-short-name">
      <h2>A heading that states the point</h2>
      <p>The section's text, with <mark>the one phrase that matters</mark> highlighted.</p>
    </section>
    <!-- one <section id="…"> per point, each with an <h2> that states it -->
  </main>
</body>
</html>
```

That is only the frame: the head, `<main class="report">`, a title. What goes in it, and in what order, is your
outline. Every top-level `<section>` has an `id`, so people can comment on it and you can change it alone.

## The blocks

The kit. The words inside the examples are placeholders that say what goes there: never copy them, and never
take a name, a number or a headline from this guide. Use the blocks your points need, mix them, nest them (cards in a split, numbers in a card, a chart in a
band), and build what is missing. All of them work inside a `<section>`.

**Title and meta line.** Above the title, the `.topbar`: who it is from and what kind of report it is on the
left, who it is for (or its period) on the right. Then `h1`, then `.meta` with a `.chip` for the period, the
author (`@Name`), the date it was prepared, its source.

**Text.** `p`; `<p class="lead">` for the opening paragraph; `mark` to highlight the one phrase that matters;
`del` then the new text for a decision that changed; `.chip` inline for a date or a person inside a sentence or a
list item (`<li><span class="chip">a date</span> what was decided.</li>`); `blockquote` with a
`<footer>` for a quotation; `<ol class="steps">` with `<li><h3>…</h3><p>…</p></li>` for a sequence.

**Headline numbers.** Three to five, each with what it is compared with, in one boxed row with dividers.

```html
<div class="kpis">
  <div class="kpi"><div class="label">what is counted</div><div class="value">its value</div>
    <div class="delta"><span class="up">+ its rise</span> against what</div></div>
  <div class="kpi"><div class="label">what is counted</div><div class="value">its value</div>
    <div class="delta"><span class="down">− its fall</span> against what</div></div>
</div>
```

A unit goes in `<small>` inside `.value` (`value <small>unit</small>`). A line under the row can say what the
numbers cover (`<p class="small muted">`).

**A chart**, with its title, where its data is from, and one sentence that states what it shows.

```html
<figure>
  <div class="figure-head"><h3>what the chart shows</h3><span class="synced">Read from (the source) · (when)</span></div>
  <div class="chart-box"><canvas id="chart-1"></canvas></div>
  <figcaption>a note on how to read it</figcaption>
</figure>
<p>One sentence that states what the chart shows.</p>
```

`.chart-box` has a fixed height (`.short` 200, default 300, `.tall` 380); a canvas without one grows forever.
`.synced` is only for a figure that reads a source; its text comes from `ARTIFACTS.sources` and `read_at`.

**A diagram** is built from HTML and CSS, so the page places and aligns everything; never a picture of boxes
drawn by coordinates when a layout can do it.

```html
<figure>
  <div class="flow">
    <div>first step<small>a note</small></div>
    <div class="accent">the step that matters<small>a note</small></div>
    <div>last step<small>a note</small></div>
  </div>
  <figcaption>what the diagram shows</figcaption>
</figure>
```

- `.flow`: steps left to right with arrows between them (`flow vertical` for top to bottom); it turns vertical on
  a phone. `class="accent"` marks the step that matters, `class="dark"` the end state.
- `.layers`: a stack, top to bottom, each `<div>Name<small>what it does</small></div>`.
- `.timeline`: moments in a row, each `<div><b>when</b>what happens</div>`; `class="accent"` on the one
  that matters.
- Anything else a layout can make (a matrix of two axes, a before and after, a tree, a cycle): your own grid or
  flex, with the tokens. Nest the blocks: a `.flow` inside each half of a `.split` makes a comparison.
- Inline SVG only for what no layout can make (a curve, a network of crossing links, a map), in
  `<figure class="diagram">`, and kept exact: nodes on a regular grid, straight connectors that end at the edge
  of a shape, every label outside the shapes and clear of every line, no arrow crossing a label, shapes with
  `class="box"` (`box accent`, `box dark`), connectors `class="line"`, text 12 px or more, and no colors or
  fonts of its own. If it cannot be drawn cleanly, use a `.flow` or `.layers` that says the same thing.

**Cards**, for parallel things (findings, options, parts, people): `<div class="cards">` of
`<div class="card"><div class="eyebrow">a label</div><h3>…</h3><p>…</p></div>`; `.big` inside a card for
its one figure. **A callout** for the thing to remember: `<div class="callout">` (`callout accent` for the one
per report). **A band** of soft background across the column: `<div class="band">`.

**Side by side**: `<div class="split">` with two children (text beside a figure, a chart beside a panel);
`split even` for halves. It stacks on a phone.

**A dark panel** of figures, beside a chart or closing a section:

```html
<div class="panel">
  <h3>what the panel lists</h3>
  <dl class="rows">
    <div><dt>an item</dt><dd>its figure</dd><dd class="note">a note</dd></div>
    <div><dt>an item</dt><dd>its figure</dd><dd class="note">a note</dd></div>
  </dl>
</div>
```

**A picture opening**, for a proposal or a report on a place or a product: `<div class="hero"><img src="…" alt="…">
<div><h1><span class="soft">the first half of the headline</span> its second half.</h1><p>…</p></div></div>`; a
`<div class="kpis">` right after it overlaps its foot. **Picture tiles**: `<div class="tiles">` of
`<div class="tile"><img …><div><div class="eyebrow">01 · what it is</div><div class="big">its key fact</div></div></div>`.
**A picture in the text**: `<figure class="photo"><img …><figcaption>…</figcaption></figure>`.

**A table**: plain `<table>` inside `<div class="table-scroll">`; `class="num"` on number cells and their
headers. Fifteen rows or fewer at a glance.

**Sources**: `<ol class="sources">` in a closing section; a reference in the text is `<sup><a href="#s1">1</a></sup>`.

## What a kind of report carries

Starting points, from how these are made by people who make them for a living. Not layouts: take what the
content has, drop what it lacks, add what it needs.

- **A proposal or a pitch**: a line naming who it is from and who it is for; a picture opening with the
  promise as its headline; the three numbers the reader decides on, as a strip over the foot of the picture; the
  plan as a chart beside a panel of terms or prices; a closing band with the next steps as picture tiles.
- **A review of results** (a quarter, a campaign, a launch): the headline numbers with their change; the main
  chart and the sentence that states its finding; a breakdown (a second chart or a table); what is working and
  what is not; what happens next.
- **An explainer**: the answer in a lead paragraph; a diagram of how it works; the steps or the parts as cards;
  one worked example; where it falls short; sources.
- **A research write-up or a briefing**: the findings as summary cards; each finding with its evidence (a
  chart, a table, a quotation, a picture); what it means; method and sources.
- **A product spec or a plan**: an overview; decisions as a dated list (the old one struck through when it
  changed); a diagram of the flow or the parts; open questions with who decides and by when; a timeline.
- **A case study or a profile**: a picture opening; the situation; what was done, in steps; the result in
  numbers; a quotation.

Where the content has real numbers, they are shown as numbers and charts, not buried in sentences. Where the
subject can be seen (a place, a product, people at work), it has pictures. Where the person gave no figures and
the space holds none, do not invent them: write the report with the blocks that need no figures, and name in
your answer the two or three numbers that would let you add the rest.

## Arranging it

- Lead with what the reader came for: the answer, the decision, or the numbers. Context after.
- Each section takes the block its point needs. A section that is only paragraphs is right when the point is
  only an argument, not by default. A report of several sections has at least one figure (numbers, a chart or a
  diagram); a subject that can be seen has a picture.
- Vary down the page: prose, then numbers, then a figure, then cards or a split. Two neighbouring sections do
  not share one arrangement.
- Fill the width. Most sections pair two blocks in a `.split` (a chart and the panel or table that gives its
  figures, two panels that compare, cards beside a figure); a lone block runs the full width only when it needs
  it (a wide chart, a table of many columns).
- Headings state the point, or name the part plainly ("Decisions", "Open questions"). No heading above a single line of text.
- Prose is short and concrete: a sentence a reader can act on, the number with its unit and its period.
- No emoji, no gradients, no decoration that carries no information.

## Charts

Chart.js from its CDN, set to the look once, then one chart per canvas:

```html
<script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.1/dist/chart.umd.min.js"></script>
<script>
  const css = (name) => getComputedStyle(document.documentElement).getPropertyValue(name).trim()
  Chart.defaults.font.family = css('--font-body'); Chart.defaults.font.size = 13
  Chart.defaults.color = css('--muted'); Chart.defaults.maintainAspectRatio = false
  Chart.defaults.plugins.legend.display = false
  const rows = window.ARTIFACTS.data.NAME.records              // or the report's own figures, for a written report
  new Chart(document.getElementById('chart-1'), {
    type: 'line',
    data: { labels: rows.map((r) => r.COLUMN_A), datasets: [{ data: rows.map((r) => r.COLUMN_B),
      borderColor: css('--chart-1'), backgroundColor: css('--chart-1'), borderWidth: 2, pointRadius: 3.5 }] },
    options: { scales: { x: { grid: { display: false }, border: { color: css('--line') } },
      y: { beginAtZero: true, grid: { color: css('--line') }, border: { display: false }, ticks: { maxTicksLimit: 6 } } } },
  })
</script>
```

- Colors only from `--chart-1` to `--chart-4`; one series is `--chart-1`. A legend only for two series or more
  (`plugins: { legend: { display: true, position: 'bottom' } }`).
- The chart by the question: change over time, a line; parts compared, bars (horizontal when the names are
  long); a share of a whole, one stacked bar or a doughnut of five parts or fewer. Never two y-axes.
- A goal or a marked period: `chartjs-plugin-annotation@3.0.1` from the same CDN (a dashed line with its label,
  a shaded box).
- Under every chart, one sentence that states what it shows.

## Pictures

`find_images` (a photograph of the real subject), then `add_asset` to put it in the space, and use the address
it returns; never a remote hotlink, never a drawn stand-in for a real product or place. Every picture has `alt`
text, and a caption with its credit when the license asks for one. If the search is down, the report goes
without the picture.

## Data

A written report cites what it relies on in the page: a closing "Sources" section (who published it, its title,
its link, the date read), and a number in the text where it is used. Never a source you did not read or a quote
you did not see. It needs no sheet and no `sources`.

A report that shows the space's numbers reads them, never retypes them: read the space (`get_space`) and the
items that hold them (`sheet_inspect_workbook`, `read_database`, `read_dashboard`…), and name them in `sources`.
After the first call with `sources`, `read_report` shows what each gives the page now (columns and first rows,
or an item's content); write the sections against that. A dataset you bring from outside to chart (rows of
numbers from a search or a file) goes in a sheet of the space first (`create_sheet`, with its tabs and rows in
the one call) and is read from there; a handful of facts quoted in prose is not a dataset.

## Sources

Each source has a `name` (what the page calls it) and reads one thing:

```json
[
  { "name": "revenue", "sheet": "s_…", "range": "Revenue!A1:E13", "note": "USD thousands, by month" },
  { "name": "pipeline", "database": { "item": "dt_…", "table": "Deals", "fields": ["Stage", "Amount"],
      "group_by": "Stage", "total": "sum", "filters": [{ "field": "Stage", "op": "is_not", "value": "Lost" }] } },
  { "name": "won_total", "database": { "item": "dt_…", "table": "Deals", "fields": ["Amount"], "total": "sum",
      "filters": [{ "field": "Stage", "op": "is", "value": "Won" }] } },
  { "name": "kpis", "item": "db_…" },
  { "name": "roadmap", "item": "tm_…" }
]
```

- **A sheet range**: a header row, then the rows. **A database table**: `fields` in order; with `group_by`, one
  row per value of that field with each number field totalled (`sum`, `avg`, `min`, `max`, or `count`); without
  it, the records (`filters`, `sort`, `limit`), and with `total` also one total over them. Filter ops: `is`,
  `is_not`, `contains`, `not_contains`, `gt`, `gte`, `lt`, `lte`, `empty`, `not_empty`.
- **Another item**, read whole: a dashboard (its tiles with their numbers), a Kanban board (columns and cards), a
  calendar (events), a poll (results), a timeline, a comparison, a form (its responses), an invoice, a wiki page, a
  database (all its tables), a map, a catalog, a diagram.

## What the page gets

Before any of its scripts run, the page has:

```js
window.ARTIFACTS = {
  read_at: "2026-11-12T15:04:05.000Z",
  data: {
    revenue: { kind: "sheet", from: "Finance 2026", range: "Revenue!A1:E13",
               columns: ["Month", "Revenue", …], rows: [["Jan", 128400, …], …],      // numbers as numbers
               text: [["Jan", "$128,400", …], …],                                     // as people see them
               records: [{ Month: "Jan", Revenue: 128400, … }, …] },
    pipeline: { kind: "database", from: "CRM", table: "Deals", columns: […], rows: […], text: […], records: […] },
    won_total: { …, total: 412000, total_text: "$412,000" },
    kpis: { kind: "dashboard", from: "Sales dashboard", content: { tiles: [{ title, kind, data, … }] } }
  },
  errors: { roadmap: "That item is gone." },             // sources that could not be read
  sources: { revenue: { reads: "Finance 2026 · Revenue!A1:E13", title, url, note }, … }
}
```

- **In a report with sources, draw every number from it.** Headline numbers, charts, tables and the sentences
  that quote a number read `ARTIFACTS.data`; never type one of its numbers into the HTML. Show values with the `text` people see in the sheet.
- **A source that could not be read** (`ARTIFACTS.errors`) shows a short visible note where its content would be;
  the rest of the page still works.
- **Links:** `ARTIFACTS.sources[name].url` opens the item it reads (in a new tab); on the public page there are no
  links.
- A figure that reads a source carries a `.synced` note: what it reads (`ARTIFACTS.sources[name].reads`) and when
  (`read_at`).

## Changing it

`read_report` first (people may have edited its files, or the data changed), then `update_report`: `edits` to its
files (replace exact text — prefer it — or write a whole file), `sources` (the whole new list), and `theme` (its
fonts and colors, without touching its HTML). Render once after your changes.

## Publishing

`publish_item` puts the report on the web with its data as it is when you publish. When its sheets, tables or
items change, its owner sees "Publish changes" and decides when the public page shows the new numbers.

## Comments

People comment on a part of the report (an element, by CSS selector) or on lines of a file. Answer with
`reply_comment`, change it with `update_report`, resolve.

## Themes

- `paper` (the standard): The standard: white page, deep green ink and accent, a serif title face (Lora) over a clean sans (Nunito Sans).
- `slate`: Cool and exact: blue-grey ink, a blue accent, for finance, engineering and operations.
- `ink`: Black on white, editorial: a book serif, no color but one red, for essays and research.
- `forest`: Warm and natural: cream page, deep green accent, for sustainability, food, health and field work.
- `midnight`: Dark: near-black page, light ink, a bright accent, for product, technology and night reading.

## See it in use

- **Roles:** [AI for financial analysts](/roles/financial-analyst), [AI for paralegals](/roles/paralegal), [AI for sales managers](/roles/sales-manager), [AI for marketing managers](/roles/marketing-manager), [AI for logistics analysts](/roles/logistics-analyst), [AI for chief executives](/roles/chief-executive)
- **Articles:** [AI Literature Review: A Method You Can Check Line by Line](/blog/ai-literature-review), [AI Report Generator: 4 Tools for Data and Research Reports (2026)](/blog/ai-report-generator), [Business Plan Template: Every Section, With a Full Example](/blog/business-plan-template), [Project Plan Template: What to Include, With an Example](/blog/project-plan-template)
- **Examples:** [24 pages agents made for a sample company](/examples)
