Skip to content

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.

On this page
React, Vue, Svelte, Angular, Laravel or vanilla JS render the same aparté elements. From the browser, a request goes straight to a model running in the page, an OpenAI-compatible API or a Vercel AI SDK model, with your key or a local server. Through your server, it reaches an OpenAI-compatible API or an AI SDK model with the key kept there, or an agent that runs its own loop: AG-UI agents, TanStack AI and n8n workflows. Your framework aparté Transport Models and agents React Vue Svelte Angular Laravel Vanilla JS (aparté) 65 components and the agent loop npm i @aparte/core In the browser your key, or a local model Your server keeps your key, runs agents Scripted replies In-browser models OpenAI-compatible Vercel AI SDK AG-UI agents TanStack AI n8n workflows Your framework React Vue Svelte Angular Laravel Vanilla JS (aparté) 65 components and the agent loop In the browser your key, or a local model Your server keeps your key, runs agents Models and agents Scripted replies In-browser models OpenAI-compatible Vercel AI SDK OpenAI-compatible Vercel AI SDK AG-UI agents TanStack AI n8n workflows
  1. The person sends. The composer fires aparte-send with the text and any files.
  2. The client, AparteClient, adds the message to the conversation and builds the request: the history, the tools you registered, the system prompt.
  3. 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.
  4. The transport carries each request: from the browser straight to the model, or through your server.
  5. The provider speaks the model’s format: an OpenAI-compatible API, the Vercel AI SDK, a model running in the page.
  6. The reply comes back as segments — text, reasoning, code, tool calls, errors — and the message draws each one as it streams.
TransportThe request goesThe key
AparteDirectTransport, the defaultfrom the browser to the modelthe person’s own, or none for a local model
AparteBackendTransportto your endpoint, which calls the modelstays on your server

The chat is the same either way. Keep the key server-side has the endpoint, ready-made as createAparteChatHandler.

WhereWhat you useGuide
In the pageAparteClient, the defaultInstallation and first chat
On your servercreateAparteAgentHandler on the server, createAgentStreamRunner in the pageRun 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 AIAG-UI, TanStack AI
In an n8n workflow@aparte/runner-n8n, for a Chat Trigger and its AI Agentn8n
In your own codethe chat alone: you stream into itUse your own loop

The client, both transports and both server handlers come from @aparte/core, in the page and on the server alike.

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.

65 components in all: 24 for the chat, 12 cards for what a tool returns, 6 for the page around it, 23 in the kit.

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.

Package What it is
The library
@aparte/core AI chat Web Components with the agent loop inside: your OpenAI-compatible backend, approved tool calls, generative UI cards. Zero third-party deps
@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 AI chat component built on Web Components: connect your backend, approve tool calls, draw results as cards. Angular 19.2 to 21, zone or zoneless
@aparte/react React AI chat component built on Web Components: connect your backend, approve tool calls, draw results as interactive cards. <AparteChat> plus hooks
@aparte/svelte Svelte AI chat component built on Web Components: connect your backend, approve tool calls, draw results as interactive cards. Stores; Svelte 4 and 5
@aparte/vue Vue 3 AI chat component built on Web Components: connect your backend, approve tool calls, draw results as interactive cards. <AparteChat> plus composables
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é
@aparte/runner-n8n Put aparté on an n8n chat workflow
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-cards Rich cards for aparté
@aparte/plugin-chartjs Charts for aparté via Chart.js
@aparte/plugin-compaction Conversation compaction for aparté
@aparte/plugin-echarts Charts for aparté via Apache ECharts
@aparte/plugin-katex Maths for aparté via KaTeX
@aparte/plugin-marked Markdown rendering for aparté via marked
@aparte/plugin-mermaid Diagrams for aparté via Mermaid
@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-storage-idb Keep conversations in the browser: an IndexedDB storage adapter for aparté's conversation manager
@aparte/plugin-streaming-markdown Incremental (token-by-token) Markdown rendering for aparté via @paulrichez/streaming-markdown, with a live URL-scheme guard
@aparte/plugin-titler Auto-title conversations with an aparte-titler model
Translations
@aparte/locales The chat’s interface in nine languages for aparté
Tools
@aparte/docs-mcp The aparté documentation as an MCP server