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.
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 — Pre-configured questions displayed as clickable buttons below the greeting. Users can tap one to start a conversation instantly, or type their own query
- 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
- 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)
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
- 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)
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
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: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:dist/app.min.js file from your own application or CDN:
Configuration Options
Setwindow.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
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
Usetheme 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
Full-Screen Widget
To make the widget fill the entire viewport, useinline mode and mount the widget into a full-page #rapida-chat-app element:
Platform Integration Guides
WordPress
WordPress
- Go to Appearance > Theme File Editor (or use a plugin like Insert Headers and Footers)
- Add the following before the closing
</body>tag in your theme’sfooter.php:
- Save and verify the widget loads on your site
Shopify
Shopify
- Go to Online Store > Themes > Edit Code
- Open
theme.liquid - Add the scripts before the closing
</body>tag:
- Save and preview your store
Webflow
Webflow
- Go to Project Settings > Custom Code
- Paste in the Footer Code section:
- Publish your site
Squarespace
Squarespace
- Go to Settings > Advanced > Code Injection
- Paste in the Footer section:
- Save and preview your site
Next.js
Next.js
Use Next.js
Script component in your root layout:Vue / Nuxt
Vue / Nuxt
public/index.html.Angular
Angular
Add to
src/index.html before the closing </body> tag:Static HTML / Any Website
Static HTML / Any Website
Copy and paste the following into any HTML page:
Self-Hosted Deployment
If you’re running Rapida on your own infrastructure, override theapi_base to point at your assistant API:
react-widget SDK and upload the generated dist/app.min.js to your own CDN or static file server:
How It Works
When the widget script loads, it:- Reads configuration from
window.chatbotConfig - Reuses an existing
<div id="rapida-chat-app">or creates one and appends it to the page<body> - Initialises a
VoiceAgentinstance using the@rapidaai/reactSDK with the web plugin client connection - Fetches the assistant’s web plugin deployment config (greeting, suggestions, voice settings)
- Renders the configured layout: floating launcher, docked side panel, or inline chat
- Supports both text input and voice input (with microphone visualizer, device selection, and mute controls)
- Passes supported UI configuration through to the native IBM AI Chat layer
- Auto-detects language changes on the
<html lang="">attribute - Persists the user ID in
localStorage(rpd__uuid) across sessions when nouser.user_idis 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.
Related
- 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