Add a streaming AI chat
to any website, in minutes.
Themeable, pluggable, zero framework dependencies. Style isolation, SSE streaming, agent loops, and tool use — all in one drop-in widget.
Try it live
Ask Persona anything — or pick a suggestion below to explore.
Choose your integration path
Ship to prod with Runtype in minutes, or wire Persona into your own SSE backend.
Sign in when prompted — the CLI reveals your token and lets you copy the snippet.
<script
src="https://cdn.jsdelivr.net/npm/@runtypelabs/persona@latest/dist/install.global.js"
data-runtype-token="ct_test_..."
></script>
The widget mounts on body by default. Need a specific container? Pass --target-selector "#chat" and the CLI will include a mount div and data-config in the snippet.
Need server-side flow control? Use @runtypelabs/persona-proxy.
import "@runtypelabs/persona/widget.css";
import { initAgentWidget } from "@runtypelabs/persona";
initAgentWidget({
target: "#chat",
config: { apiUrl: "https://your-api.com/chat" },
});
If your backend uses a different request or event shape, customize customFetch or parseSSEEvent in the widget config.
Theme Editor
Customize every color, font, and layout token — then copy the config straight into your project.
See what Persona can do
Explore different use cases across full-page layouts, embedded contexts, and business scenarios.
Advanced
Examples
Explore different use cases and widget configurations.
- Action Middleware Live DOM context on every message; structured actions for navigation, cart, and checkout
- Dynamic Forms AI-generated forms via component middleware; preview directly with
injectComponentDirective - Agent Loop Multi-turn reasoning with tool calls
- Feedback Integration Wire feedback events to your backend
- Custom Loading Indicator Replace the default loading animation
- Tool Approval Human-in-the-loop confirmation before tool execution
- Focus Input Programmatic input focus and state control
- Artifact Sidebar Resizable split view for rich content
- Attachments File and image attachments in the composer
- Voice Integration Speech-to-text and text-to-speech input
- Tool & Reasoning Loading Animations Configurable loading indicators for tool calls and reasoning
- Stream Animations Reveal effects for streaming assistant text: typewriter, word fade, letter rise, glyph cycle, wipe, pop bubble, thinking
- Ask User Question Built-in stacked answers vs. a custom horizontal-pills plugin
- Event Stream Testing Inspector API, window events, inline + launcher
Standalone Scripts
Script tag integration — no bundler required. Uses the CDN build in production.