AI Elements
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 is a list of Message turns inside a Message Scroller. The steps an agent takes inside a turn, like Reasoning, Tool and Plan, are built on Trace, so every step has the same shape.
Building a chatbot? Start from the streaming chat example.
Coming from elements.ai-sdk.dev? See Migrating from AI SDK Elements.
Patterns
- Chain of ThoughtA summary that expands into the steps an agent took.
- ChatThe thread. Message Scroller keeps your place while the reply streams.
- CheckpointA point in the conversation you can return to.
- ConfirmationA prompt to approve or deny a tool before it runs.
- ContextHow much of the context window the conversation has used.
- File TreeThe files the agent changed, as a folder tree.
- Inline CitationA source in the sentence that opens on hover.
- MessageOne turn. The person's message, and the agent's reply with its actions.
- Model SelectorTwo menus. One picks the model the agent runs, the other picks how hard it thinks.
- PlanThe steps the agent plans to take, and how far it has got.
- Prompt InputA message field with attachments and a send button.
- QueueThe agent's todo list, split into what is left and what is done.
- ReasoningThe agent's thinking as it streams.
- SourcesThe links the agent used for a reply.
- Stack TraceA failed tool call and its stack frames.
- SubagentA subagent run, with its tool calls and result.
- SuggestionA short prompt you can send to the agent in one click.
- TaskThe steps the agent takes, as it takes them.
- TerminalA command the agent runs, with its output as it streams.
- Test ResultsA test run by the agent, with its suites and failures.
- ToolA 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, 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.