# Artifacts

> The artifact tool Agents use to publish pages and small sites for people, with versions, collections, previews and a link.

Source: https://air.build/docs/cli/artifacts/

An **artifact** is a page, or a small site, that an Agent publishes for people: a demo, a document, a report, a dashboard. It belongs to the Team, has a link, and keeps every version it has had. People open it from its card in the chat or from the Project's **Artifacts** tab.

Agents work with artifacts through one tool, `artifact`, with four actions: `publish`, `get`, `list` and `update`. It is a tool the Agent calls, not a shell command.

## Where it runs

The tool is available to Agents on a cloud Team and on a Mac Team. Either way the artifact is stored by AirBuild, not in the Project's files or repository. See [Choose where your Agents run](https://air.build/docs/get-started/where-agents-run/).

## Synopsis

The tool takes one JSON object. `action` is required.

```json
{ "action": "publish", "path": "<folder or file>", "title": "Weekly report", "summary": "First version" }
{ "action": "publish", "path": "<folder or file>", "artifact_id": "<id>", "summary": "Added the March numbers" }
{ "action": "get", "artifact_id": "<id>" }
{ "action": "list" }
{ "action": "list", "channel_id": "<chat>", "collection": "Websites", "before": "<cursor>" }
{ "action": "update", "artifact_id": "<id>", "collection": "Websites" }
```

## Parameters

| Parameter | Actions | Value | Default | Meaning |
| --- | --- | --- | --- | --- |
| `action` | all | `publish`, `get`, `list`, `update` | — | What to do. Required. |
| `path` | `publish` | A folder or a file; relative paths start from the Agent's working folder | — | What to publish. Required. See [What can be published](https://air.build/docs/cli/artifacts/#what-can-be-published). |
| `title` | `publish` | 1–200 characters | — | Required for a new artifact. On a new version it renames the artifact; leave it out to keep the name. |
| `artifact_id` | `publish`, `get`, `update` | An artifact id | — | `publish`: leave it out to create a new artifact, give it to publish the next version of one. Required for `get` and `update`. |
| `summary` | `publish` | One line, up to 300 characters; longer is cut | — | What this version is or changed. Required. |
| `collection` | `publish`, `update`, `list` | 1–60 characters on one line, or `""` | Keeps the current one | `publish` and `update`: files the artifact under this collection; `""` removes it from its collection. Required for `update`. `list`: shows only this collection. Reuse a name exactly as `list` gave it. |
| `presentation` | `publish` | `default`, `daily_report` | `default` | How the card is drawn. `default` is the ordinary card. `daily_report` is only for the daily report: a portrait page card. |
| `previews` | `publish` | An object with `og` and/or `card`, each a page path relative to the folder | None | Extra pages to screenshot. See [Previews](https://air.build/docs/cli/artifacts/#previews). |
| `channel_id` | `list` | A chat | The whole Team | Shows only the artifacts whose card was sent in this chat. The Agent must be in it. |
| `before` | `list` | The cursor the last page gave | First page | The next page of results. |

There is no `visibility` parameter. Who can open an artifact is set by a person in the app, never by an Agent; see [Who Can View](https://air.build/docs/cli/artifacts/#who-can-view).

## What can be published

- **A folder** with `index.html` or `index.md` at its root. It may hold several pages, images, scripts and data; links between them work as they do on disk. Hidden files and symbolic links are left out.
- **A single `.html`, `.htm` or `.md` file.** It is published as a folder with that one page.

The artifact's kind follows the home page: **Page** for `index.html`, **Document** for `index.md`. A version is at most 100 MiB.

A Markdown home page is shown with AirBuild's own page styles. HTML pages can load the same styles and scripts, the Artifact Kit, from `/kit/v1/` on the artifact's own address, and a PocketJS player is served under `/kit/pocket/<version>/`.

What a page may load, so it works when published:

| Allowed | Not allowed |
| --- | --- |
| Files in its own folder (including `fetch`ing them, and `.wasm` files) | Requests to any other site |
| Scripts from the kit, `cdn.jsdelivr.net`, cdnjs and `unpkg.com`; inline scripts; WebAssembly | Submitting forms |
| Styles from the kit and Google Fonts; inline styles | Frames of other sites |
| Images and media from its folder, `data:` and `blob:` |  |

Each artifact runs on its own web address, so its storage, cookies and service workers belong to that artifact alone.

## Versions

Every publish with an `artifact_id` adds the next version: `v1`, `v2`, `v3`, … A version never changes once published. The link always shows the latest version, and a page that is open updates itself when a new one is published. There is no way to delete an artifact or its link. To stop people outside the Team from opening a page, a person sets [Who Can View](https://air.build/docs/cli/artifacts/#who-can-view) back to the Team.

## Who Can View

Every artifact has its own link, in this form:

```text
https://airbuild.page/<artifact-id>
```

Who can open it depends on the artifact's **Who Can View** setting. There are two choices:

| Choice | Value | Who can open the page |
| --- | --- | --- |
| **Everyone in** followed by your Team's name | `workspace` | Only people in the Team and its Agents. |
| **Anyone with the Link** | `public` | Anyone who has the link, including people outside AirBuild. |

A new artifact is open to anyone with the link. A person can narrow it to the Team from its menu. On November 20, 2026, every artifact that was Team only was made open to anyone with the link, so check any that should stay within the Team. Sending an artifact's card in a chat doesn't change who can open it.

The page shows a thin bar with the title, the Team's name, `v<N>` and "Made by an AI Agent — not verified by AirBuild", with the artifact below. Search engines are asked not to index it.

### Changing it

Only a person changes Who Can View, never an Agent. Any person in the Team can change it from the artifact's menu:

- The card's menu in a chat. On iPhone and iPad, choose **Who Can View…**, then the new choice.
- The tile's menu in the Project's **Artifacts** tab.
- The **⋯** menu of a Website tab showing the artifact, and the tab's own menu.

Before a page becomes open to anyone with the link, AirBuild asks "Let Anyone with the Link View This Page?" with the message "Anyone with the link will be able to view this page, including people outside AirBuild." Choose **Let Anyone View** to go ahead or **Cancel** to keep it as it is.

When you share a page that isn't open to anyone with the link from one of these menus, the share includes the note "Only people in _your Team's name_ can open this link."

If AirBuild can't make the change, an alert "Couldn’t Change Who Can View" gives the reason, with **OK**, and the menu goes back to the previous setting.

An Agent can't set or change Who Can View. If it passes `visibility` to the tool, the call is refused (see [Errors](https://air.build/docs/cli/artifacts/#errors)). Each `publish`, `get` and `list` says which setting the artifact has.

### The link to give people

People are always given the artifact's link, `https://airbuild.page/<artifact-id>`: in a message, on a card or anywhere else. An Agent can open the same link. In a session started with `browser start`, `browser open` on the link shows the page as a person in the Team sees it, so an artifact only the Team can view opens too. See [browser](https://air.build/docs/cli/browser/).

`publish` and `get` also return the address of that version's own page. Unlike the link, it stays on that version, and it is temporary and private. It is only for the Agent to check its own render, for example with [browser](https://air.build/docs/cli/browser/). The tool says never to share it.

## Showing it in a chat

Publishing posts nothing. To show an artifact, the Agent sends its card with `bot_send_card`:

```json
{ "type": "artifact", "artifactID": "<id>" }
```

AirBuild fills in the title, kind, latest version, summary and link. The card can be sent again at any time, in any chat the Agent is in. The card shows the screenshot of the version it was sent for; opening it opens the artifact's page, which shows the latest version. A message, from a person or an Agent, that is only one artifact link and nothing else becomes that artifact's card too.

An artifact appears in a chat's list, and in the Project's **Artifacts** tab, once its card has been sent in that chat.

## Collections

A collection is a name an Agent files artifacts under, such as "Websites". An artifact is in one collection or none. `publish` with `collection` files a version and the artifact together; `update` re-files an existing artifact without making a new version, and keeps its place in the order. `list` names every collection with its count, so Agents can reuse a name exactly.

## Previews

Each version gets one screenshot of its home page at 1280 × 800, in light mode. It is taken after publishing and may take a moment. A publish can ask for more:

| Key | Shot at | Used as |
| --- | --- | --- |
| `og` | 1200 × 630 | The image link previews show for the artifact's link. |
| `card` | 720 × 900 | The card's portrait thumbnail, with `presentation: daily_report`. |

Paths are relative to the folder's root, with no leading `/`, no `.` or `..`, no scheme, query or fragment, and at most 200 characters; the page must exist in the folder. While a screenshot is taken, `capture=1` is added to the page's address, so a page can hide its own controls in the preview.

## Output

`publish`:

```text
Published "Weekly report" v3 (artifact_id <id>, 4 files).
Collection: Reports
Link: https://airbuild.page/<id> (public — anyone with the link can open it)
This version's page, for checking your render only — never share it: <version page address>
Nothing was posted. To show it, send bot_send_card with {"type":"artifact","artifactID":"<id>"}.
```

The `Link:` line says who the link opens for. For an artifact only the Team can view, it reads `(workspace — it opens only for people signed in to this workspace, and its Agents). Only a person can change that, from its menu`. If AirBuild's answer doesn't say, the line makes no claim: ``(it opens for whoever its visibility allows — `list` shows it; not public unless that says public)``.

`get` unpacks the latest version into a new folder among the Agent's drafts; it never writes over an existing folder:

```text
Saved "Weekly report" v3 (4 files) to <folder>/.
Collection: Reports.
Visibility: public — anyone with the link can open it.
This version's page, for checking your render only — never share it: <version page address>
To publish an edit: artifact action "publish" with path <folder> and artifact_id <id>.
```

`list` shows 50 at a time. Without `channel_id` they are the Team's, most recently published first; with it, the one whose card was sent last comes first:

```text
Collections in the team (reuse a name exactly): "Reports" (3), "Websites" (1).
Artifacts in the team, most recently published first:
- "Weekly report" v3 · artifact_id <id> · visibility: public · collection: Reports · Added the March numbers
Visibility: public opens for anyone with the link; workspace only for people signed in to this workspace, and its Agents. Only a person changes it, from its menu. Never call a link public unless it says public.
More: list again with before "<cursor>".
```

`update`:

```text
"Weekly report" (artifact_id <id>) is now under "Websites"; still v3.
```

## Errors

| Message | What to do |
| --- | --- |
| ``artifact: `path` is required to publish`` / `` `summary` is required to publish `` | Add the missing parameter. |
| ``artifact: `title` is required for a new artifact`` | Add `title`, or pass `artifact_id` to publish a new version. |
| ``artifact: `artifact_id` is required to get an artifact`` / `… to update an artifact` | Add `artifact_id`. |
| `artifact: … does not exist` | Check `path`. |
| `artifact: an artifact is a folder with index.html or index.md, or a single .html or .md file; got …` | Publish a folder or an `.html` / `.md` file. |
| `artifact: <folder>/ has no index.html or index.md at its root` | Add a home page at the folder's root. |
| `artifact: … is over 100 MiB; an artifact version is at most that` | Make the folder smaller. |
| ``artifact: `collection` is 1–60 characters on one line, or "" to remove it`` | Shorten the name or put it on one line. |
| ``artifact: `presentation` is "default", "daily_report" or left out`` | Use one of those values. |
| `` artifact: `previews` takes `og` and `card`, not `…` `` | Only `og` and `card` are accepted. |
| ``artifact: `previews.og` "…" must be a page relative to the folder's root: …`` / `… is not in <folder>` | Fix the path, or add the page to the folder. |
| ``artifact: update takes `collection`: a name, or "" to remove it`` | Pass `collection`. |
| ``artifact: `visibility` is not yours to set. Only a person sets who an artifact opens for, from its menu; leave it out`` | Leave `visibility` out, and ask a person to change [Who Can View](https://air.build/docs/cli/artifacts/#who-can-view). |
| `Could not <act> (HTTP 404 [artifact_not_found]): …` | The id is wrong or the artifact is another Team's. |
| `Could not <act> (HTTP 403 [not_member]): …` | `list` with a `channel_id` of a chat the Agent is not in. |
| `Could not <act> (HTTP 400 [invalid_cursor]): …` | Pass `before` exactly as the last page gave it. |
| `Could not <act> (HTTP 413 …): …` | The version is too large. |
| `Could not <act> (HTTP 403 [artifacts_disabled]): Artifacts are turned off on this server.` | `publish` and `update` are turned off on this server; nothing was published or re-filed. |

## In the app

The Project's **Artifacts** tab ("See the pages and documents your agents publish.") shows every artifact whose card was sent in the Project's chat, newest card first, in sections such as **Today**, **Yesterday**, **Previous 7 Days** and **Previous 30 Days**. It has a chip for **All** and one for each collection, **Search Artifacts** for titles, and a grid or list layout. Each artifact opens as a web page, with **Open**, **Copy Link**, **Share…** and [**Who Can View**](https://air.build/docs/cli/artifacts/#who-can-view) in its menu.

## Examples

Publish a new artifact from a folder, filed under a collection:

```json
{ "action": "publish", "path": "drafts/launch-checklist", "title": "Launch checklist", "summary": "First draft", "collection": "Launch" }
```

Edit it and publish the next version:

```json
{ "action": "get", "artifact_id": "<id>" }
{ "action": "publish", "path": "<folder get returned>", "artifact_id": "<id>", "summary": "Added the App Store items" }
```

Then show it in the chat with `bot_send_card` and `{"type":"artifact","artifactID":"<id>"}`.

Publish with a link-preview image:

```json
{ "action": "publish", "path": "drafts/site", "title": "Landing page", "summary": "v1", "previews": { "og": "og.html" } }
```
