← Directory

Persona

Free
• Updated Jun 30, 2026, 03:13 PM

Persona is an open-source vanilla JavaScript library for building AI-powered chat interfaces on the web.

Use Cases ▼
01

Adding a customer support chatbot to a website

02

Building an AI copilot for a SaaS application

03

Creating a sales assistant widget for e-commerce

04

Embedding a documentation search and Q&A assistant

05

Developing an AI-driven onboarding or tutorial agent

06

Prototyping agentic web experiences with page control tools

What Problem It Solves ▼

Adding conversational AI interfaces to websites often requires heavy framework dependencies, complex integration, and risk of style conflicts. Persona solves this by providing a lightweight, framework-free chat UI library that works with any SSE backend, isolates styles via Shadow DOM, and offers flexible embedding options with minimal setup.

Key Features ▼
✓

Lightweight and framework-agnostic

✓

Easy integration via script tag or npm

✓

Shadow DOM prevents style conflicts

✓

Flexible UI modes (floating, docked, fullscreen)

✓

WebMCP support for agent-driven page actions

Overview

Persona is an open-source vanilla JavaScript library for building AI-powered chat interfaces on the web. It is framework-agnostic, requiring only a script tag or npm install to embed a customizable chat widget. The library supports three UI modes: floating launcher, docked copilot panel, and fullscreen assistant, all configurable through a simple init call. Persona streams messages from any backend that supports Server-Sent Events (SSE) and offers a pluggable parser system to adapt to different event shapes. It is WebMCP-native, enabling AI agents to directly interact with host page elements—such as forms, carts, or search—with built-in user approval flows. Shadow DOM rendering ensures that widget styles never conflict with host page styles, and a three-layer theming system (palette, semantic, component tokens) with dark mode and a live editor allows deep visual customization without forking. The library is distributed via npm (@runtypelabs/persona) and CDN, and provides pre-built integration examples for Express, Hono, SvelteKit, Next.js, and AI SDK backends, among others.

Pros & Cons

Pros

+

Lightweight and framework-agnostic

+

Easy integration via script tag or npm

+

Shadow DOM prevents style conflicts

+

Flexible UI modes (floating, docked, fullscreen)

+

WebMCP support for agent-driven page actions

Cons

−

Limited to SSE transport for streaming

−

Requires a backend that implements SSE

−

Relatively new project with developing community

−

Custom theming requires understanding token architecture

−

WebMCP tools must be implemented manually

Similar Tools

Botpress Webchat Microsoft Bot Framework Web Chat Gradio Chat Interface Streamlit Chat Elements OpenAI Chat SDK Vercel AI SDK Chat UI

More in AI Agent