# Honest AI

> Copy components for prompts, agent traces, tool calls, and approvals into your project.

Source: https://www.honestui.com/docs/ai

Honest AI is a set of interface pieces an agent or chat product needs around its model: a field for the prompt, a trace of what the agent is doing, a record of the tools it called, and a way to ask the person a question before it acts.

Each component renders the state you pass in. None of them calls a model, streams a reply, or runs a tool. Your application does that work and passes the result as props. Because of that, a component never shows progress your application did not report.

For interfaces generated by a model, open [Generative UI](/docs/ai/generative). It adds an Honest AI Lang parser and streaming renderer, component libraries backed by Honest components, and a chat state and transport layer.

Honest AI is built on [Honest UI](/docs). The Honest UI CLI copies each component into your project under `components/ai`, along with the Honest UI components it uses, so you can change the source directly.

## Available components [#available-components]

### Conversation [#conversation]

| Component                                         | Use it for                                                                                                          |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| [Chat Thread](/docs/ai/chat-thread)               | Laying out a scrolling conversation with the composer under it, and showing a message's files, editor, and versions |
| [Chat Welcome](/docs/ai/chat-welcome)             | Greeting a new conversation with starters before the first message                                                  |
| [Context Meter](/docs/ai/context-meter)           | Showing how full the model's context window is                                                                      |
| [Guardrail Notice](/docs/ai/guardrail-notice)     | Showing what a guardrail masked, blocked, or flagged, the rule that fired, and why                                  |
| [Markdown](/docs/ai/markdown)                     | Rendering a reply's Markdown, including Markdown that is still arriving                                             |
| [Message Scroller](/docs/ai/message-scroller)     | Following streamed output and revisiting messages with a preview navigation rail                                    |
| [Message Usage](/docs/ai/message-usage)           | Showing the tokens, cost, and latency of one reply or a whole thread, with the breakdown on demand                  |
| [Prompt Bar](/docs/ai/prompt-bar)                 | Collecting a prompt, with optional `@` sources, `/` commands, attachments, a model menu, and a Stop button          |
| [Prompt Suggestions](/docs/ai/prompt-suggestions) | Offering prompt starters a person can send with one click                                                           |
| [Prose Code Block](/docs/ai/prose-code-block)     | Showing a code block inside a reply, with its language and a copy button                                            |
| [Search List](/docs/ai/search-list)               | Filtering a short list, such as saved prompts                                                                       |
| [Sidebar Nav](/docs/ai/sidebar-nav)               | Navigating destinations and past conversations                                                                      |
| [Streaming Text](/docs/ai/streaming-text)         | Rendering a reply as it arrives, then its copy, retry, and feedback actions, sources, and follow-up prompts         |

### Agent activity [#agent-activity]

| Component                                   | Use it for                                                                                              |
| ------------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [Agent Handoff](/docs/ai/agent-handoff)     | Showing one agent handing a conversation to another, with the reason and the context that went with it  |
| [Agent Screen](/docs/ai/agent-screen)       | Showing what an agent that drives a browser or desktop sees                                             |
| [Checkpoint](/docs/ai/checkpoint)           | Marking a point in the conversation the work can be restored to                                         |
| [Flowchart](/docs/ai/flowchart)             | Laying out a workflow as steps joined by connectors                                                     |
| [Loading State](/docs/ai/loading-state)     | Showing that long work is in progress, with the time elapsed                                            |
| [Memory Viewer](/docs/ai/memory-viewer)     | Showing what an agent remembers, grouped by kind, with search, edit, pin, and forget                    |
| [Plan](/docs/ai/plan)                       | Proposing the steps an agent will take, with Approve and Revise                                         |
| [Queue](/docs/ai/queue)                     | Holding messages sent while the agent is busy, to reorder, edit, or send now                            |
| [Task Rows](/docs/ai/task-rows)             | Listing the tasks in a run with the status of each                                                      |
| [Thinking State](/docs/ai/thinking-state)   | Showing that the agent is working, with its steps, reasoning, searches, and sources behind a disclosure |
| [Tool Chips](/docs/ai/tool-chips)           | Listing the tool calls in a run, what each returned, and the files the run changed                      |
| [Trace Waterfall](/docs/ai/trace-waterfall) | Showing an agent run's spans on one time axis, with the latency, tokens, and cost of each step          |

### Decisions [#decisions]

| Component                                           | Use it for                                                                                   |
| --------------------------------------------------- | -------------------------------------------------------------------------------------------- |
| [Approval Card](/docs/ai/approval-card)             | Asking the person one or more questions before the agent continues                           |
| [Diff Table](/docs/ai/diff-table)                   | Reviewing the rows an agent proposes to add or remove                                        |
| [Fine-tune Card](/docs/ai/fine-tune-card)           | Adjusting a result with a compact panel of controls                                          |
| [Input Request](/docs/ai/input-request)             | Pausing an agent mid-run to ask for structured input, with why it asks and what it does next |
| [Recommendation Card](/docs/ai/recommendation-card) | Proposing one action with its confidence, and the alternatives                               |
| [Selection Actions](/docs/ai/selection-actions)     | Offering AI edits for selected text, then keeping or discarding the result                   |

### Results [#results]

| Component                                 | Use it for                                                                                              |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------- |
| [Artifact Panel](/docs/ai/artifact-panel) | Giving a file or document an agent made a surface beside the conversation                               |
| [Code View](/docs/ai/code-view)           | Showing a file's code or a diff of it                                                                   |
| [Context Cards](/docs/ai/context-cards)   | Showing the passages an agent retrieved, with their sources                                             |
| [Eval Compare](/docs/ai/eval-compare)     | Comparing outputs from several models or prompt versions side by side, with a word diff and a scorecard |
| [Filter Table](/docs/ai/filter-table)     | Filtering a table's rows with counted chips                                                             |
| [Insight Cards](/docs/ai/insight-cards)   | Showing a set of findings one at a time                                                                 |
| [Records Table](/docs/ai/records-table)   | Showing records with columns an agent fills in cell by cell                                             |

### Developer [#developer]

| Component                                   | Use it for                                                                   |
| ------------------------------------------- | ---------------------------------------------------------------------------- |
| [File Tree](/docs/ai/file-tree)             | Browsing a project's files with the ones an agent added, changed, or deleted |
| [Stack Trace](/docs/ai/stack-trace)         | Reading an error's frames, with library frames folded away                   |
| [Terminal Output](/docs/ai/terminal-output) | Showing a command and its output as it streams, with its exit status         |
| [Test Results](/docs/ai/test-results)       | Summarizing a test run and showing the error for each failure                |
| [Web Preview](/docs/ai/web-preview)         | Previewing a page an agent built in a sandboxed frame with browser controls  |

### Voice [#voice]

| Component                                       | Use it for                                                                             |
| ----------------------------------------------- | -------------------------------------------------------------------------------------- |
| [Audio Player](/docs/ai/audio-player)           | Playing a spoken reply or voice message with a waveform scrub bar                      |
| [Live Waveform](/docs/ai/live-waveform)         | Drawing live audio from a microphone stream or a level                                 |
| [Transcript Viewer](/docs/ai/transcript-viewer) | Following a transcript in sync with playback and seeking from a line                   |
| [Voice Input](/docs/ai/voice-input)             | Recording a spoken prompt with a level meter and timer, for your transcription service |
| [Voice Orb](/docs/ai/voice-orb)                 | Showing whether a voice agent is listening, thinking, or speaking                      |

### Styles [#styles]

| Stylesheet              | Use it for                                                             |
| ----------------------- | ---------------------------------------------------------------------- |
| [Prose](/docs/ai/prose) | Styling rendered Markdown or plain HTML with one class, in any project |

## What your application supplies [#what-your-application-supplies]

* **The model and the transport.** Call your model from a route or server action and stream the result however your stack does it.
* **State.** Map your agent's events onto props: a status for Thinking State, an array of calls for Tool Chips, a list of questions for Approval Card, the text so far for Streaming Text.
* **Words.** Each component takes a `labels` prop for every string it writes, including the names read by screen readers. Replace the English defaults when you translate.
* **Failure handling.** Tell the component when something failed. Components that show progress have an error status. Components that send a decision, such as Approval Card and Diff Table, show an error when the promise you return rejects, and keep what the person chose.

## Reading the previews [#reading-the-previews]

The previews on these pages have no model behind them. Where a preview moves, a timer is standing in for an agent, and the text under the preview says so. Where a preview has a result, it shows the object your handler would receive.

## Theming [#theming]

The components use Honest UI's theme tokens, and they are built from Honest UI components: Button, Collapsible, Popover, Menu, Dialog, Table, Command, Select, and the form controls. A change to your theme or to one of those components carries through.
