loadAgent takes one object that controls how the web widget looks and starts on your page. The agent’s prompt, voice and tools stay in the dashboard. Settings from the Appearance tab in Web widget overview are written into the copied snippet as these same fields.
Options marked 2.0 need a 2.0.0-beta CDN version. See Pick a CDN version.
CDN bundles
The CDN exposesloadAgent on window once the script has loaded. Two builds are published:
The ES build loaded as a plain
<script> puts its internals on window and can overwrite globals such as jQuery’s $. The snippet copied from the dashboard loads the ES build as a plain script, so on a non-module page change the file name to dv-agent.umd.js.
Full example
Core options
variables, the key and everything else in this object are readable in the page source. Never put passwords, internal tokens or personal data in them.
Values for the agent’s variables, such as
callee_name.Replaces the privacy and terms text shown before a conversation. Words in
text that match a key in links link to that URL.Colors and corners. See Theme.
Trigger and start buttons. See Buttons.
Fixed, bottom right by default. See Position.
Panel size, 400 × 456 px by default (95% of the screen width on mobile). See Window size.
Ringg copy and 5 stars by default. See Feedback screen.
Shows a pill in the chat each time an agent action fires. 2.0
Theme
Every color accepts a hex value or a CSS gradient string. Components inherit these values.Buttons
Position
From 1.0.19."fixed" floats over the viewport. "absolute" places the widget inside the ringg_ai_container element.loadAgent runs and give it a height. Without it, the widget creates ringg_ai_container at the end of <body>.
Window size
innerWindowProps sets the open panel’s width, height and borderRadius. Numbers are pixels; strings pass through as CSS. The Size controls in Appearance allow width 280–600 px, height 300–700 px and radius 0–40 px.
Feedback screen
Shown after a conversation ends, unlessbypassFeedbackScreen is true. A submitted or skipped rating fires ringg:feedback_status; see Events.