Widget Embedding

Embeddable AI chat for any website with JWT authentication, domain whitelisting, custom branding, and CORS security

widgets

Overview

The OpenRails Widget allows organizations to deploy AI-powered chat experiences on any website with a single script tag. The widget connects to your OpenRails instance, accesses your configured knowledge bases, and provides RAG-powered responses to visitors — all while maintaining the security and governance controls of the core platform. It is ideal for customer support, product documentation, and self-service portals.

Key Value: Turn your OpenRails investment into a customer-facing product. The widget lets you deploy AI-powered support on your website without building a custom chat interface — and without exposing your backend infrastructure.

stars

Key Capabilities

code Single Script Embedding

Add the widget to any page with one script tag. No build step, no framework dependency. Works with any website technology.

key JWT Authentication

Secure widget sessions with JSON Web Tokens. The embedding site generates a JWT with user identity and permissions, which the widget uses to authenticate against OpenRails. No API keys exposed in client-side code.

domain Domain Whitelisting

Restrict which domains can embed the widget. Only authorized origins can load and interact with the widget, preventing unauthorized usage and protecting your API resources.

palette Custom Branding

Match the widget to your site's design. Configure colors, fonts, avatar, welcome message, placeholder text, and position (bottom-right, bottom-left, or inline). CSS custom properties for deep customization.

security CORS Configuration

Fine-grained CORS (Cross-Origin Resource Sharing) controls ensure the widget only communicates with authorized OpenRails endpoints. Configurable allowed origins, methods, and headers.

stream Real-Time Streaming

The widget supports token-by-token streaming for responsive conversations. Users see answers as they are generated, matching the experience of the full OpenRails dashboard.

integration_instructions

How It Works

Configure Your Bot

Set up your bot in the OpenRails dashboard — choose the LLM, link your knowledge base, customize the chat template with your brand colors, welcome message, and avatar.

Add One Line to Your Site

Embed the widget on any page with a single script tag pointing to your OpenRails instance. All configuration is managed server-side — no tokens, API keys, or settings exposed in your page source.

Manage from the Dashboard

Update the bot's knowledge base, change the model, adjust branding, or configure domain whitelisting — all from the OpenRails dashboard. Changes take effect immediately, no redeployment needed.

Security by design: Authentication and authorization are handled server-side. Domain whitelisting ensures the widget only loads on approved sites. No sensitive configuration is ever exposed in client-side code.
lightbulb

Use Cases

support_agent

Customer Support

AI-powered self-service on support pages with automatic escalation to human agents

menu_book

Documentation Assistant

Embed on docs sites so users can ask questions about your product in natural language

storefront

E-Commerce Advisor

Product recommendations and purchase assistance powered by your product catalog

api

Beyond the Widget: Full API Access

When the embeddable widget is not enough and you need full programmatic control, OpenRails provides a complete REST API. Generate an API key in the dashboard and integrate chat, agent execution, file uploads, and audio transcription directly into your applications — no widget required. The built-in API documentation page in the dashboard shows all available endpoints and best practices.

Related Feature Sheets