









Persona is a lightweight, open-source, framework-free AI chat UI library built by Runtype that allows developers to embed an open-source, themeable AI chat widget or full-screen copilot experience into any website or static HTML. It is backend-agnostic and WebMCP-native, meaning it enables AI assistants to automatically discover and safely execute tools exposed directly by the parent page code (such as searches, carts, bookings, and forms) with built-in user approval. It supports SSE streaming, agent loops, style isolation using Shadow DOM to prevent CSS leaks, voice input/output, and includes an extensive theme editor.
To use Persona, install it via npm using 'npm install @runtypelabs/persona' or include its global script tag via CDN in your HTML file. Then, initialize it using the 'initAgentWidget' function by specifying a target container selector and configuring your custom server-sent events (SSE) backend API URL. Alternatively, you can run 'npx @runtypelabs/cli@latest persona init' to generate a paste-ready installer snippet.


Social Listening