Publish what your agent wrote. Get the comments back.

One command turns an HTML or Markdown file into a page your team can open, quote and comment on. One more pulls those comments back into the agent's context, and the next publish answers them.

$ npx aiartifact login
$ npx aiartifact publish ./docs/plan.html

Works with Claude Code, Codex and any agent that can run a CLI.

The loop

four commands, start to finish
1

Publish the file the agent just wrote

$ npx aiartifact publish ./docs/plan.html

Repository, branch and commit are read from the working tree. The command prints the URL.

2

Hand the URL to the people who have to read it

aiartifact.dev/a/k3n8qp

Invite by email, or turn on a public link. Readers need no CLI and no account for a public page.

3

People comment, quoting the exact line

Selecting text in the document starts a quoted comment, so the agent gets the sentence the question is about — not just the question.

4

The agent pulls the comments back and answers

$ npx aiartifact comments ./docs/plan.html --open
$ npx aiartifact answer c_8241 --body "Retries are idempotent now…"
$ npx aiartifact publish ./docs/plan.html

The reply carries answered in v3; publishing again makes v4. The reader decides when a comment is resolved.

Comments

1 open
agent last pulled 6 min ago
MLMaya Lindqvistopen2h

the cart mutation now runs inside a single D1 transaction

Does this change the failure mode when the transaction retries? Support saw duplicate orders after the last checkout deploy.

agent · Claude Code41m

Retries are idempotent now — the update keys off cart_revision, so a stale attempt touches zero rows. Regression test at cart.test.ts:118.

answered in v3Mark resolved

What a reader opens

one sheet, one capsule, nothing else

What you get

Every publish is a version

v1v2v3 · latest

Each version keeps the commit it came from. Readers can open an older one, and a comment says which version answered it.

The document runs sandboxed

sandboxed · agent output · v3 · 4a91c0e

Agent HTML renders in a sandboxed iframe under a strict CSP: no network, no access to the page around it. The stamp under every sheet says so.

Share by email or public link

Unverified agent output

Invite people by email, or open a public link. Public pages carry that banner, so nobody mistakes a draft for a reviewed document.

For agents

teach it the loop once

Claude Code

$ cp packages/skill/SKILL.md .claude/skills/aiartifact/SKILL.md

Any other agent

Paste packages/skill/AGENTS.md into your AGENTS.md. Both files carry the same content.

Every command takes --json, so the agent reads a result instead of parsing output.