AI Elements
Patterns for agentic interfaces built from Optics and Base UI components. Copy-ready blocks for traces, threads, approvals, and tool outputs.
Chain of Thought
A summary that expands into the steps an agent took.
Chat
The thread. Message Scroller keeps your place while the reply streams.
Checkpoint
A point in the conversation you can return to.
Confirmation
A prompt to approve or deny a tool before it runs.
Context
How much of the context window the conversation has used.
File Tree
The files the agent changed, as a folder tree.
Inline Citation
A source in the sentence that opens on hover.
Message
One turn. The person's message, and the agent's reply with its actions.
Model Selector
Two menus. One picks the model the agent runs, the other picks how hard it thinks.
Plan
The steps the agent plans to take, and how far it has got.
Prompt Input
A message field with attachments and a send button.
Queue
The agent's todo list, split into what is left and what is done.
Reasoning
The agent's thinking as it streams.
Sources
The links the agent used for a reply.
Stack Trace
A failed tool call and its stack frames.
Subagent
A subagent run, with its tool calls and result.
Suggestion
A short prompt you can send to the agent in one click.
Task
The steps the agent takes, as it takes them.
Terminal
A command the agent runs, with its output as it streams.
Test Results
A test run by the agent, with its suites and failures.
Tool
A tool call the agent makes, from input to output.
Showing 21 AI elements