Overview
The Oration Widget SDK is a lightweight, embeddable conversation widget that enables you to integrate AI voice agents directly into any website. With zero dependencies and simple HTML integration, add powerful conversational AI capabilities to your site in minutes.Zero dependencies
Standalone widget that works on any website without external dependencies
Multiple conversation types
Support for web calls, chat, and user selection modes
Custom element
Simple HTML tag integration with 
<oration-widget>Highly customizable
Comprehensive theme system and configuration options
Quick start
Add the widget to your website with just 2 lines of code:
Configuration
Required attributes
| Attribute | Type | Description | 
|---|---|---|
| public-key | string | Your Oration workspace public key | 
| default-agent-id | string | The assistant/agent ID to use for conversations | 
Optional attributes
| Attribute | Type | Default | Description | 
|---|---|---|---|
| conversation-type | string | "web" | Conversation mode: "web","chat", or"both" | 
| agent-language-id-map | JSON string | - | Map of language codes to agent IDs for multi-language support | 
| size | string | "full" | Widget size: "tiny"or"full" | 
| theme | JSON string | - | Custom theme configuration | 
Conversation types
Web mode (default)
Direct web-based voice conversation with real-time audio.
Chat mode
Text-based chat interface with messaging.
User choice mode
Shows conversation selector UI for users to choose between web and chat.
Widget sizes
Full size (default)
Standard widget size with full UI elements (360px width when expanded).Tiny size
Compact widget size optimized for minimal screen real estate (260px width when expanded).
Multi-language support
Enable automatic language selection by mapping languages to specific agents:
Agent selection logic
When bothdefault-agent-id and agent-language-id-map are provided:
- If agent-language-id-mapis provided and not empty: Uses the language map for agent selection- If the provided default-agent-idexists as a value in the language map, it’s used
- If the provided default-agent-idis not in the language map, the first agent ID from the map is used
 
- If the provided 
- If agent-language-id-mapis not provided or empty: Uses thedefault-agent-iddirectly
agent-language-id-map is provided and contains at least 1 language mapping.
Theme customization
The widget supports comprehensive theme customization through user-friendly theme keys.Theme keys
Base theme keys
- base- Primary background color
- base_hover- Hover state for interactive elements
- base_active- Active/pressed state
- base_border- Border colors
- base_subtle- Subtle text and secondary elements
- base_primary- Primary text color
- base_error- Error states and destructive actions
Accent theme keys
- accent- Primary accent color (buttons, highlights)
- accent_hover- Accent hover state
- accent_active- Accent active/pressed state
- accent_border- Accent borders
- accent_subtle- Subtle accent elements
- accent_primary- Text on accent backgrounds
Basic theme example
Complete theme example
Partial theme customization
You don’t need to specify all theme keys. The widget uses default values for any missing keys:
Features
🚀 Zero dependencies
Standalone widget that works on any website without external dependencies.🎨 Custom element
Use via simple HTML tags with<oration-widget> custom element.
⚡ Lightweight
Optimized UMD bundle with Tailwind CSS for fast loading.🔧 Easy integration
Just add 1 script tag to your website.📱 Responsive
Works seamlessly on desktop and mobile devices.💬 Multiple conversation types
Support for web calls, chat, and user selection modes.🔊 Voice conversations
Real-time voice calls with audio controls and live transcripts.📊 Live transcripts
Real-time conversation transcripts during calls.🎛️ Conversation selector
Let users choose their preferred communication method.⚙️ Highly customizable
Configurable appearance, behavior, and conversation flows.🎨 Modern styling
Built with Tailwind CSS for consistent, modern design.External button trigger
You can trigger the widget conversation from any external button on your page by giving it the IDoration-conversation-trigger. This allows you to integrate the widget with your existing UI elements.
External trigger behavior
- Any button or element with ID oration-conversation-triggerwill automatically trigger the widget
- The external button respects the widget’s current state (won’t trigger if already connecting)
- Works with all conversation types (web,chat,both)
- If conversation-type="both", clicking the external button will show the conversation selector
- The widget’s built-in button still works alongside the external trigger
Complete integration example
Browser support
- Modern browsers (Chrome, Firefox, Safari, Edge)
- IE11+ (with polyfills)
- Mobile browsers (iOS Safari, Chrome Mobile)
Getting your keys
To use the widget, you need:- Public key: Get your workspace public key from the Oration AI Dashboard
- Agent ID: Create an agent and copy its ID from the agents section
Need help?
Contact our team at developers@oration.ai for support with integration
Advanced configuration
Shadow DOM isolation
The widget uses Shadow DOM to prevent CSS conflicts with your website, ensuring consistent styling regardless of your site’s CSS.Event handling
The widget handles all conversation events internally, providing a seamless user experience without requiring additional JavaScript.Performance optimization
- Lazy loading of conversation components
- Optimized bundle size with tree shaking
- Efficient memory management for long conversations
Troubleshooting
Widget not loading
- Verify the script tag is correctly placed
- Check browser console for JavaScript errors
- Ensure your public key and agent ID are valid
Styling issues
- The widget uses Shadow DOM for style isolation
- Custom themes should use the provided theme keys
- Check that theme JSON is properly formatted
Conversation issues
- Verify your agent is properly configured
- Check that your workspace has sufficient credits
- Ensure microphone permissions are granted for voice conversations
Make sure to keep your public key secure and only use it on authorized domains. Never expose private API keys in client-side code.