# aparté > aparté is a framework-agnostic AI-chat library: vanilla web components with zero third-party dependencies (@aparte/core, whose only dependency is @aparte/engine, the agent loop), plus thin React, Vue, Svelte and Angular wrappers. It is backend-agnostic — a transport sends requests either browser-direct (bring your own key, or a local model) or to your own endpoint, where the key stays server-side. Providers and plugins are opt-in packages. How it compares to NaN Three families, three places. **Components** are custom elements (``, ``, ``…) under /components/. **Segments** are the data a message bubble renders (text, thinking, code, tool_call, error, custom) under /segments/ — an artifact is a plugin's segment (/plugins/artifacts/). **The UI kit** is plain CSS classes on plain elements (`aparte-btn`, `aparte-field`, `aparte-alert`, `aparte-tag`, `aparte-menu`, tabs, switches, avatars) for the controls a host puts around the chat, listed with their HTML at /kit/ (one page per family, live) and /reference/classes/ (every class) — they exist, they are themed by the same variables as the chat, do not rewrite your own. Asking the user something mid-run is built in: a tool marked `needsApproval` pauses for a human decision (guide: /guides/tools/#require-approval-human-in-the-loop), `requestUserInput()` asks a typed question or a yes/no decision (`kind: 'approval'`) through a panel in the composer (/guides/elicitation/), and `@aparte/plugin-ask-user` gives the model a ready-made `ask_user` tool (/plugins/ask-user/, with `systemPrompt: false` to send no system message). Approval MODES — plan / ask / auto-edit / auto, from a read/write/exec classification of your tool names, with an `` switch for the composer toolbar — are `@aparte/plugin-approval` (/plugins/approval/), built on core's per-call `setApprovalPolicy()`. Driving your own loop (a backend that streams over its own SSE, a server-side agent): the display-only API — `appendMessage`, `addSegment`, `appendToSegment`, `updateSegment`, then `updateMessage(id, { status: 'completed' })` to finish the turn — is documented at /guides/bring-your-own-loop/. Plain `content` and `segments` are mutually exclusive on a message. ## Documentation Sets - [Abridged documentation](https://apartejs.dev/llms-small.txt): a compact version of the documentation for aparté, with non-essential content removed - [Complete documentation](https://apartejs.dev/llms-full.txt): the full documentation for aparté - [Getting started, frameworks and guides](https://apartejs.dev/_llms-txt/getting-started-frameworks-and-guides.txt): Install, first render in vanilla or a framework, and every guide (theming, tools, persistence, branching, localisation, accessibility, troubleshooting). - [Tools, approval and asking the user](https://apartejs.dev/_llms-txt/tools-approval-and-asking-the-user.txt): Registering tools, the tool-call row, human-in-the-loop approval, typed questions to the user (elicitation), and the ask-user plugin. - [Bring your own loop (display-only)](https://apartejs.dev/_llms-txt/bring-your-own-loop-display-only.txt): Driving the transcript from a loop you own: appendMessage, segments, token streams, finishing a turn, the wrappers' imperative API, the backend transport. - [Theming and the UI kit](https://apartejs.dev/_llms-txt/theming-and-the-ui-kit.txt): CSS variables, dark mode, the customization hooks, and the kit of plain classes (buttons, fields, alerts, tags, menus, tabs) with their HTML. - [Providers and transports](https://apartejs.dev/_llms-txt/providers-and-transports.txt): OpenAI-compatible endpoints, the AI SDK bridge, a model in the browser, the scripted scenario provider, local models, writing your own provider. - [Reference: components, segments, events, config](https://apartejs.dev/_llms-txt/reference-components-segments-events-config.txt): Every custom element with its attributes, events and CSS properties; every segment shape; the event map; the config object; the icons. ## Notes - The complete documentation includes all content from the official documentation - The content is automatically generated from the same source as the official documentation ## Optional - [Source and issues](https://github.com/apartejs/aparte): The monorepo — open an issue here. - [npm](https://www.npmjs.com/package/@aparte/core): Every @aparte/* package ships at one version.