> ## Documentation Index
> Fetch the complete documentation index at: https://kiro.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Rich output & widgets

> Interactive HTML widgets in chat messages — buttons, forms, dashboards, and live previews that drive further agent work through a bidirectional event bridge.

Not everything the agent produces is plain text. When Crew builds something visual — a UI prototype, a status dashboard, a configuration form — it renders as a **widget** directly inside the chat message. You interact with it in place, and your actions feed back to the agent.

## Widgets in chat

A widget is embedded HTML inside a chat message. It renders inline in an iframe with Tailwind CSS, theme variables, and a sandboxed execution environment. The key difference from a static code block: widgets are **interactive** and can send events back to the agent.

### What it looks like

When the agent produces a widget, you see it rendered in your chat flow — a live mini-app inside the conversation. Examples:

- A button that triggers a deploy
- A form where you fill in config values and submit
- A status dashboard with live data
- A file explorer that lets you pick what to work on next

### Interacting with widgets

Click buttons, fill forms, select options — your interactions fire events back to the agent session. The agent receives a `[Widget action event]` with your payload and can:

- Respond with another message
- Update the widget
- Trigger tool calls based on your selection
- Spawn subagents based on your choice

This makes widgets more than previews — they're a way to have structured, form-like interactions without leaving the chat.

### Widget capabilities

- **Tailwind CSS** — available for styling
- **Theme variables** — `var(--bg)`, `var(--text)`, `var(--accent)` follow your dashboard theme
- **Sandboxed** — no access to parent origin state, cookies, or storage
- **Bidirectional** — events flow both ways (agent → widget HTML, widget actions → agent)

### Common widget patterns

| Pattern | What it does |
|---|---|
| **Approval UI** | "Deploy to prod?" with structured Yes/No buttons |
| **Configuration builder** | Form fields the agent applies on submit |
| **Data explorer** | Filter/drill-down interface that requests more data |
| **Progress dashboard** | Real-time status of a running task |
| **Option selector** | Multiple-choice cards the agent acts on |

## Artifacts — persistent output

When the agent creates something you want to keep — a webapp, a document, a code file — it becomes an **artifact**. Artifacts persist beyond the chat session in a dedicated library with version history, folders, and comments.

Artifacts are a full feature with their own lifecycle: create, iterate, version, deploy, revert. For the complete guide on managing artifacts, deploying webapps, and working with the artifacts library, see [Artifacts & deploy](https://kiro.dev/docs/crew/features/artifact-deploy.md).

### Quick context for chat

When you're chatting and want to save something, ask "save this as an artifact". Crew warns when a saved artifact has hardcoded colors that might not work with the dashboard theme. You can assign an exact handle with `kirocrew artifact save --slug <slug>`; Crew refuses a slug that is already taken instead of renaming it.

Select **Publish** from an artifact's menu to publish it to a public HTTPS URL in your own AWS account. Publishing requires a configured AWS profile, the `capabilities.publish` governance gate, and a destination allowed by `publish.allowed_destinations` in `config.json`; it is never a default destination. Published content is public, so publish only content you would share openly.

You can iterate on an artifact with "update the artifact," and webapp artifacts get a live local preview right on their card. The **Artifacts** panel in the dashboard is where you browse, organize, and manage everything the agent has produced.
