How aparté fits together
What sits between your framework and your model — the elements, the client and its loop, the transport, the provider — and which package holds each.
One message, from send to reply
Section titled “One message, from send to reply”- The person sends. The composer fires
aparte-sendwith the text and any files. - The client,
AparteClient, adds the message to the conversation and builds the request: the history, the tools you registered, the system prompt. - The loop,
@aparte/engine, sends it and reads the reply as it streams. When the model calls a tool, the loop runs it — once the person approves, if the tool asks for that — sends the result back, and goes on until the model is done. - The transport carries each request: from the browser straight to the model, or through your server.
- The provider speaks the model’s format: an OpenAI-compatible API, the Vercel AI SDK, a model running in the page.
- The reply comes back as segments — text, reasoning, code, tool calls, errors — and the message draws each one as it streams.
Where the request goes
Section titled “Where the request goes”| Transport | The request goes | The key |
|---|---|---|
AparteDirectTransport, the default | from the browser to the model | the person’s own, or none for a local model |
AparteBackendTransport | to your endpoint, which calls the model | stays on your server |
The chat is the same either way. Keep the key server-side has the
endpoint, ready-made as createAparteChatHandler.
Where the loop runs
Section titled “Where the loop runs”| Where | What you use | Guide |
|---|---|---|
| In the page | AparteClient, the default | Installation and first chat |
| On your server | createAparteAgentHandler on the server, createAgentStreamRunner in the page | Run the loop on your server |
| In an agent framework | @aparte/runner-ag-ui, for an agent served over AG-UI: Agno, LangGraph, Mastra, CrewAI, TanStack AI | AG-UI, TanStack AI |
| In your own code | the chat alone: you stream into it | Use your own loop |
The client, both transports and both server handlers come from @aparte/core, in the page and
on the server alike.
What the chat is made of
Section titled “What the chat is made of”Three kinds of parts, all in the components:
- Elements — tags you put on the page, such as
<aparte-chat>,<aparte-composer>or<aparte-conversation-list>. They hold the behaviour: streaming, scrolling, focus, keyboard. - Segments — what a message is made of, as data: text, reasoning, code, a tool call, an error, or a view of your own. Each kind has a renderer, and you can register yours.
- The kit — CSS classes for the controls around the chat: buttons, fields, menus, dialogs, in the same theme.
51 components in all: 24 for the chat, 5 for the page around it, 22 in the kit.
In your framework
Section titled “In your framework”The framework packages wrap the same elements: a chat component for React, Vue,
Svelte and Angular, with typed properties and events for every element. They depend on
@aparte/core alone: the provider and the transport are set up the same way in every framework,
and each package starts the client for you — useAparteClient in React, AparteAiService in
Angular.
Which package does what
Section titled “Which package does what”| Package | What it is |
|---|---|
| The library | |
@aparte/core
|
AI chat and agent UI components as Web Components, with the agent loop inside |
@aparte/engine
|
The agent loop on its own: runStreamAgent streams a model's turns and runs its tools, in the browser or in Node |
| Frameworks | |
@aparte/angular
|
Angular 19 wrapper for aparté |
@aparte/react
|
React 18+ wrapper for aparté |
@aparte/svelte
|
Svelte wrapper for aparté |
@aparte/vue
|
Vue 3 wrapper for aparté |
| Models | |
@aparte/provider-ai-sdk
|
Bridge any Vercel AI SDK model into aparté |
@aparte/provider-openai-compat
|
One OpenAI-compatible chat-completions adapter for any /v1 endpoint |
@aparte/provider-scenario
|
A scripted model for aparté |
@aparte/provider-transformers
|
Run LLMs 100% in the browser via Transformers.js (WebGPU/WASM) |
| Agent frameworks | |
@aparte/runner-ag-ui
|
Render an AG-UI agent in aparté |
| Plugins | |
@aparte/plugin-approval
|
Approval modes for aparté tool calls |
@aparte/plugin-artifacts
|
Artifacts for aparté |
@aparte/plugin-ask-user
|
The ask_user tool for aparté |
@aparte/plugin-compaction
|
Conversation compaction for aparté |
@aparte/plugin-marked
|
Markdown rendering for aparté via marked |
@aparte/plugin-model-selector
|
Provider + model selector web component (<aparte-model-selector>) for aparté |
@aparte/plugin-shiki
|
Syntax highlighting for aparté via shiki |
@aparte/plugin-streaming-markdown
|
Incremental (token-by-token) Markdown rendering for aparté via streaming-markdown, with a live URL-scheme guard |
@aparte/plugin-titler
|
Auto-title conversations with an aparte-titler model |
| Translations | |
@aparte/locale-fr
|
French locale for aparté |
| Tools | |
@aparte/docs-mcp
|
The aparté documentation as an MCP server |
- Installation and first chat Install, put the chat on a page, stream a first reply.
- Models and agents Pick the provider for your model, or the runner for your agent.
- Tools and approval Let the model call your functions, with the person approving what matters.
- Use your own loop Keep your loop, and stream its replies into the chat.