AI Elements
Patterns for agentic interfaces — reasoning, tool calls, plans, sources — built from the components. Copy them into your app: there is no package to install, and the code is yours.
Example
What should we build?
A thread built with the Message Scroller, the Message and the Trace. Press send.
Patterns
A chat is a list of message turns in a scroller. The steps an agent takes inside a turn — reasoning, tools, plans — are built on the Trace, so every step has the same shape.
A summary that expands into the steps an agent took.
The thread. The Message Scroller keeps your place while the reply streams.
A point in the conversation you can return to.
A prompt to approve or deny a tool before it runs.
How much of the context window the conversation has used.
The files the agent changed, as a folder tree.
A source in the sentence that opens on hover.
One turn. The person's message, and the agent's reply with its actions.
Two menus. One picks the model the agent runs, the other how hard it thinks.
The steps the agent plans to take, and how far it has got.
A message field with attachments and a send button.
The agent's todo list, split into what is left and what is done.
The agent's thinking as it streams.
The links the agent used for a reply.
A failed tool call and its stack frames.
A subagent run, with its tool calls and result.
A short prompt you can send to the agent in one click.
The steps the agent takes, as it takes them.
A command the agent runs, with its output as it streams.
A test run by the agent, with its suites and failures.
A tool call the agent makes, from input to output.