Overview
The Oration Widget SDK is a lightweight, embeddable web component (<oration-widget>) that adds AI voice and chat agents to any website. No framework or build step required — just a script tag.
Quick start

Getting your keys
- Public key — copy your workspace public key from the Oration Dashboard
- Agent ID — create an agent and copy its ID from the agents section
Configuration
Required attributes
Optional attributes
Conversation types
Web mode (default)
Real-time voice conversation.
Chat mode
Text-based chat interface.
User choice mode
Lets users pick between voice and chat.
Widget sizes

Multi-language support
Map BCP-47 language codes to specific agent IDs. A language selector will appear in the widget when the map contains at least one entry.
- If
agent-language-id-mapis provided, the map takes priority overdefault-agent-id - If
default-agent-idexists as a value in the map, it is pre-selected - Otherwise the first entry in the map is used as the default
Dynamic variables
Pass context to your agent using thedynamic-variables attribute. Values must be a JSON object of string key-value pairs.
Programmatic updates
Theme customization
Pass a JSON object totheme with any subset of the following keys. Missing keys fall back to defaults.
Theme keys
All values must be hex color strings.

Color mode
Usecolor-mode to force light or dark theme, or let the widget follow the user’s system preference:
External button trigger
Any element withid="oration-conversation-trigger" will open the widget when clicked. The trigger respects the widget’s current state (no-op while connecting).
conversation-type="both", the trigger shows the conversation type selector first.
Terms acceptance
Show a consent gate before the first conversation. Acceptance is stored inlocalStorage and won’t be shown again.
Troubleshooting
Widget not loading — check the browser console, verify the script tag is present, and confirm your public key and agent ID are correct. Styling issues — the widget uses Shadow DOM for style isolation. Custom styles must go through thetheme attribute.
No microphone access — browser microphone permissions must be granted for voice conversations.
Conversation fails — verify the agent is configured and your workspace has sufficient credits.
Need help? Contact us at support@oration.ai