Epicenter
Local-first, open source apps
AI Elements are patterns for building agentic interfaces. Each one is a composition of shadcn-svelte 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.
The examples use @ai-sdk/svelte. The patterns only read message parts, so they work with any source of messages.
Patterns
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.
Getting Started
Add the components most patterns are built on:
Then open a pattern above and copy its code into your project. Each page lists any other components it needs.