Skip to main content
The Web Widget deployment embeds an interactive AI assistant directly into your website. Visitors can type messages, speak via microphone, and hear voice responses — all from a floating widget that loads with a single script tag. Voice input and output are optional; the widget works as a text-only chat by default.
Voice capabilities (microphone input and spoken responses) are optional. You can deploy a text-only chat widget by skipping the Voice Input and Voice Output steps during configuration.
Use Listen when enabling microphone input and Speak when enabling spoken responses for the widget.

Creating a Web Widget Deployment

Navigate to your assistant, click Configure Assistant, then select Deployments from the sidebar. Click Add Deployment and choose Web Widget. The web widget wizard walks you through four steps:
1

Experience

Define the greeting, quickstart questions, and session behaviour.Required fields:
  • Greeting — Welcome message displayed when the widget opens. Describe your agent so users know how to interact with it
Quickstart Questions:
  • Quickstart Questions — Pre-configured questions displayed as clickable buttons below the greeting. Users can tap one to start a conversation instantly, or type their own query
Advanced settings (expand to configure):
  • Error Message — Message shown when an unexpected error occurs
  • Idle Silence Timeout — Duration of silence before Rapida prompts the user (3000-10000ms, default: 30000ms)
  • Idle Timeout Backoff — How many times the idle timeout multiplies before ending the session (0-5, default: 2)
  • Idle Message — Message spoken/shown when the user hasn’t responded (default: “Are you there?”)
  • Maximum Session Duration — Hard limit before the session is automatically ended (3-15 minutes, default: 5 min)
2

Voice Input (Speech-to-Text) — Optional

Enable microphone-based voice input for the widget. Users can speak instead of typing.If enabled:
  • STT Provider — Deepgram, AssemblyAI, Google, Azure, OpenAI Whisper, AWS Transcribe, Cartesia, Rev.ai, Speechmatics, Sarvam, Groq, or Nvidia
  • Model — Provider-specific transcription model
  • Language — Primary transcription language
  • Encoding — Audio encoding format
  • Sample Rate — Audio sample rate
Advanced settings (expand to configure):
  • Voice Activity Detection (VAD) — Silero VAD with configurable threshold (0.0-1.0, default: 0.8)
  • Background Noise Removal — RNNoise for removing ambient noise before transcription
  • End of Speech Detection — Silence-based EOS with configurable timeout (default: 1000ms)
Click Skip to deploy a text-only widget without voice input. You can enable it later by editing the deployment.
3

Voice Output (Text-to-Speech) — Optional

Enable spoken audio responses from the assistant. The assistant’s text responses will be read aloud through the browser.If enabled:
  • TTS Provider — ElevenLabs, Deepgram, Azure, Google, OpenAI, AWS Polly, Cartesia, Resemble, Rime, Sarvam, Neuphonic, MiniMax, Groq, Speechmatics, or Nvidia
  • Model — Provider-specific voice model
  • Language — Output speech language
  • Voice ID — The specific voice from your TTS provider
Advanced settings (expand to configure):
  • Pronunciation Dictionaries — Custom pronunciation for domain-specific terms, names, and acronyms
  • Conjunction Boundaries — Natural pause points at conjunctions for more human-like speech
  • Pause Duration — Length of pause at conjunction boundaries (100-300ms, default: 240ms)
Click Skip to deploy without voice output. Text responses will still appear in the chat. You can enable voice output later.
4

Features

Enable additional content sections available in the web widget beyond the chat interface.Available sections:
  • Help Center / Q&A Listing — Display a searchable FAQ section alongside the chat, powered by your knowledge base
  • Product Catalog — Show product listings and details within the widget
  • Blog Post / Articles — Surface blog posts and articles for self-service browsing
Click Deploy Web Widget to save and activate the deployment.

Embedding the Widget

After deployment, Rapida generates a pre-built widget script (app.min.js) hosted on the Rapida CDN. You configure it by setting window.chatbotConfig before the script loads.

Quick Start

Add this to any page on your website:
The default configuration renders a floating launcher in the bottom-right corner of the page. Clicking it opens the chat window with your assistant’s greeting and quickstart questions.
Replace YOUR_ASSISTANT_ID with your assistant’s ID (found on the assistant overview page) and YOUR_PROJECT_CREDENTIAL_KEY with your project credential key from the credential vault.

Installation Options

Use the latest hosted widget script:
Pin to a specific widget build when you need controlled rollout:
You can also install the package from npm and serve the built dist/app.min.js file from your own application or CDN:

Configuration Options

Set window.chatbotConfig before loading the widget script. The widget has two configuration layers:
  • Rapida layer — connection, authentication, assistant version, user identity, language, and debug logging
  • UI layer — native IBM AI Chat configuration exposed directly on window.chatbotConfig
Rapida always owns messaging.customSendMessage because text messages must go through the Rapida SDK. Rapida also appends its audio controls through renderWriteableElements.afterInputElement; if you provide your own afterInputElement, it is preserved and Rapida audio controls are appended after it. Use the sectioned config shape below. Do not use a carbon config key.

Required Rapida Options

Rapida Options

Theme Options

Use theme for all theme-level options.

Layout Options

layout can be a string for old embeds or an object for the current sectioned config.
Per-corner layout.corners object: Supported layout.customProperties keys:

Header Options

Launcher Options

Messaging Options

Other UI Options

Upload Options

File upload is experimental in the underlying UI.

Keyboard Shortcut Options

Keyboard shortcut configuration is experimental in the underlying UI.

Service Desk Options

These are advanced native UI options for human-agent handoff integrations.

Render And Lifecycle Hooks

Layout Modes

Floating

A fixed-position panel with a launcher button. Click the launcher to open or close the chat.

Docked

A side panel fixed to the viewport. When open, it pushes page content to make room.

Inline

The widget flows with the page content. Place the <div id="rapida-chat-app"> where you want it to render.

Legacy Shortcuts

These remain supported for old embeds. Prefer the sectioned config above for new usage.

Full HTML Example

Place both script tags just before the closing </body> tag. The defer attribute on app.min.js ensures it loads after the config is set without blocking page rendering.

Full-Screen Widget

To make the widget fill the entire viewport, use inline mode and mount the widget into a full-page #rapida-chat-app element:

Platform Integration Guides

  1. Go to Appearance > Theme File Editor (or use a plugin like Insert Headers and Footers)
  2. Add the following before the closing </body> tag in your theme’s footer.php:
  1. Save and verify the widget loads on your site
  1. Go to Online Store > Themes > Edit Code
  2. Open theme.liquid
  3. Add the scripts before the closing </body> tag:
  1. Save and preview your store
  1. Go to Project Settings > Custom Code
  2. Paste in the Footer Code section:
  1. Publish your site
  1. Go to Settings > Advanced > Code Injection
  2. Paste in the Footer section:
  1. Save and preview your site
Use Next.js Script component in your root layout:
For plain Vue, add the script tags directly to public/index.html.
Add to src/index.html before the closing </body> tag:
Copy and paste the following into any HTML page:

Self-Hosted Deployment

If you’re running Rapida on your own infrastructure, override the api_base to point at your assistant API:
You can also self-host the widget script itself. Build the react-widget SDK and upload the generated dist/app.min.js to your own CDN or static file server:
Then reference your self-hosted script:

How It Works

When the widget script loads, it:
  1. Reads configuration from window.chatbotConfig
  2. Reuses an existing <div id="rapida-chat-app"> or creates one and appends it to the page <body>
  3. Initialises a VoiceAgent instance using the @rapidaai/react SDK with the web plugin client connection
  4. Fetches the assistant’s web plugin deployment config (greeting, suggestions, voice settings)
  5. Renders the configured layout: floating launcher, docked side panel, or inline chat
  6. Supports both text input and voice input (with microphone visualizer, device selection, and mute controls)
  7. Passes supported UI configuration through to the native IBM AI Chat layer
  8. Auto-detects language changes on the <html lang=""> attribute
  9. Persists the user ID in localStorage (rpd__uuid) across sessions when no user.user_id is provided

Widget Features

The pre-built widget includes:
  • Text chat — Type messages and receive markdown-rendered responses
  • Voice input — Click the audio icon to switch to voice mode with real-time microphone visualization
  • Microphone device selector — Choose from available input devices via a dropdown flyout
  • Mute/unmute — Toggle microphone during voice conversations
  • Quickstart suggestions — Clickable buttons from your deployment’s configured suggestions
  • Session reset — Restart the conversation via the header button
  • Auto-scroll — Chat automatically scrolls to the latest message
  • Layout modes — Use floating, docked-right, docked-left, or inline rendering
  • Theme controls — Use light, dark, system, or explicit UI token injection

Input and Output Modes

Troubleshooting

Use Cases

Customer Support

Provide instant answers and reduce support ticket volume with 24/7 voice-enabled help.

Lead Generation

Engage visitors with qualifying questions and route them to your sales team.

Product Recommendations

Guide users through product catalogs with personalized suggestions.

Appointment Scheduling

Let users book appointments directly through conversational flow.
  • Create an Assistant — Set up your assistant before deploying
  • Listen — Choose and tune STT, VAD, noise cancellation, and EOS settings
  • Speak — Choose and tune TTS, voice, pronunciation, and speech delivery settings
  • Web App (React SDK) — Full SDK integration for custom React apps with complete UI control
  • Credentials — Manage your project credential keys
  • Conversation Logs — Monitor widget conversations
  • Webhooks — Receive post-conversation events