---
title: "AI Elements"
description: "Patterns for agentic interfaces, built from Solid UI components."
---

AI Elements are patterns for building agentic interfaces. Each one is a composition of Solid UI components that you copy into your project. There is no package to install. The code is yours.

A [Chat](/docs/ai-elements/chat/) is a list of [Message](/docs/ai-elements/message/) turns inside a [Message Scroller](/docs/components/message-scroller/). The steps an agent takes inside a turn, like [Reasoning](/docs/ai-elements/reasoning/), [Tool](/docs/ai-elements/tool/) and [Plan](/docs/ai-elements/plan/), are built on [Trace](/docs/components/trace/), so every step has the same shape.

**Building a chatbot?** Start from the [streaming chat example](/docs/components/message-scroller/#following-the-live-edge).

**Coming from [elements.ai-sdk.dev](https://elements.ai-sdk.dev)?** See [Migrating from AI SDK Elements](#migrating-from-ai-sdk-elements).

## Patterns

- [Chain of Thought](/docs/ai-elements/chain-of-thought/) — A summary that expands into the steps an agent took.
- [Chat](/docs/ai-elements/chat/) — The thread. Message Scroller keeps your place while the reply streams.
- [Checkpoint](/docs/ai-elements/checkpoint/) — A point in the conversation you can return to.
- [Confirmation](/docs/ai-elements/confirmation/) — A prompt to approve or deny a tool before it runs.
- [Context](/docs/ai-elements/context/) — How much of the context window the conversation has used.
- [File Tree](/docs/ai-elements/file-tree/) — The files the agent changed, as a folder tree.
- [Inline Citation](/docs/ai-elements/inline-citation/) — A source in the sentence that opens on hover.
- [Message](/docs/ai-elements/message/) — One turn. The person's message, and the agent's reply with its actions.
- [Model Selector](/docs/ai-elements/model-selector/) — Two menus. One picks the model the agent runs, the other picks how hard it thinks.
- [Plan](/docs/ai-elements/plan/) — The steps the agent plans to take, and how far it has got.
- [Prompt Input](/docs/ai-elements/prompt-input/) — A message field with attachments and a send button.
- [Queue](/docs/ai-elements/queue/) — The agent's todo list, split into what is left and what is done.
- [Reasoning](/docs/ai-elements/reasoning/) — The agent's thinking as it streams.
- [Sources](/docs/ai-elements/sources/) — The links the agent used for a reply.
- [Stack Trace](/docs/ai-elements/stack-trace/) — A failed tool call and its stack frames.
- [Subagent](/docs/ai-elements/subagent/) — A subagent run, with its tool calls and result.
- [Suggestion](/docs/ai-elements/suggestion/) — A short prompt you can send to the agent in one click.
- [Task](/docs/ai-elements/task/) — The steps the agent takes, as it takes them.
- [Terminal](/docs/ai-elements/terminal/) — A command the agent runs, with its output as it streams.
- [Test Results](/docs/ai-elements/test-results/) — A test run by the agent, with its suites and failures.
- [Tool](/docs/ai-elements/tool/) — A tool call the agent makes, from input to output.

## Migrating from AI SDK Elements

If you used AI SDK Elements from [elements.ai-sdk.dev](https://elements.ai-sdk.dev), here is what changes.

### Existing projects

You do not need to migrate. When you installed components from elements.ai-sdk.dev, the code was copied into your project. It is yours, and it keeps working as is.

### What replaces each element

| AI SDK Elements        | Solid UI                                                |
| ---------------------- | ------------------------------------------------------- |
| `agent.tsx`            | [Subagent](/docs/ai-elements/subagent/)                 |
| `attachments.tsx`      | [Attachment](/docs/components/attachment/)              |
| `chain-of-thought.tsx` | [Chain of Thought](/docs/ai-elements/chain-of-thought/) |
| `checkpoint.tsx`       | [Checkpoint](/docs/ai-elements/checkpoint/)             |
| `code-block.tsx`       | [Code Block](/docs/components/code-block/)              |
| `commit.tsx`           | [Trace](/docs/components/trace/#commit)                 |
| `confirmation.tsx`     | [Confirmation](/docs/ai-elements/confirmation/)         |
| `context.tsx`          | [Context](/docs/ai-elements/context/)                   |
| `conversation.tsx`     | [Chat](/docs/ai-elements/chat/)                         |
| `file-tree.tsx`        | [File Tree](/docs/ai-elements/file-tree/)               |
| `inline-citation.tsx`  | [Inline Citation](/docs/ai-elements/inline-citation/)   |
| `message.tsx`          | [Message](/docs/ai-elements/message/)                   |
| `model-selector.tsx`   | [Model Selector](/docs/ai-elements/model-selector/)     |
| `plan.tsx`             | [Plan](/docs/ai-elements/plan/)                         |
| `prompt-input.tsx`     | [Prompt Input](/docs/ai-elements/prompt-input/)         |
| `question.tsx`         | [Questionnaire](/docs/components/questionnaire/)        |
| `queue.tsx`            | [Queue](/docs/ai-elements/queue/)                       |
| `reasoning.tsx`        | [Reasoning](/docs/ai-elements/reasoning/)               |
| `sources.tsx`          | [Sources](/docs/ai-elements/sources/)                   |
| `stack-trace.tsx`      | [Stack Trace](/docs/ai-elements/stack-trace/)           |
| `suggestion.tsx`       | [Suggestion](/docs/ai-elements/suggestion/)             |
| `task.tsx`             | [Task](/docs/ai-elements/task/)                         |
| `terminal.tsx`         | [Terminal](/docs/ai-elements/terminal/)                 |
| `test-results.tsx`     | [Test Results](/docs/ai-elements/test-results/)         |
| `tool.tsx`             | [Tool](/docs/ai-elements/tool/)                         |
