Persona
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.
- Category
- AI Agent
- Pricing
- Free
Problem solved
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.
Use cases
- Adding a customer support chatbot to a website
- Building an AI copilot for a SaaS application
- Creating a sales assistant widget for e-commerce
- Embedding a documentation search and Q&A assistant
- Developing an AI-driven onboarding or tutorial agent
- Prototyping agentic web experiences with page control tools
Audience
- Developers
- Startups
- Enterprise
- Hobbyists
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
Official website: https://www.persona-chat.dev/
Canonical LambdaBase page: https://www.lambdabase.com/tools/persona