Widget customization
Learn how to customize the widget appearance and behavior to match your brand.
Widgets enable instant integration of Conversational AI into any website. For advanced customization, use our type-safe Conversational AI SDKs for complete control over styling and behavior.
Widgets currently require public agents with authentication disabled. Ensure this is disabled in the Advanced tab of your agent settings.
Embedding the widget
Add this code snippet to your website’s <body>
section. Place it in your main index.html
file for site-wide availability:
For enhanced security, define allowed domains in your agent’s Allowlist (located in the Security tab). This restricts access to specified hosts only.
Visual customization
Customize the widget’s appearance, text content, language selection, and more in the dashboard Widget tab.
Appearance
Feedback
Avatar
Display text
Terms
Language
Shareable page
Customize the widget colors and shapes to match your brand identity.
Advanced implementation
For more advanced customization, you should use the type-safe Conversational AI SDKs with a Next.js, React, or Python application.
Client Tools
Client tools allow you to extend the functionality of the widget by adding event listeners. This enables the widget to perform actions such as:
- Redirecting the user to a specific page
- Sending an email to your support team
- Redirecting the user to an external URL
To see examples of these tools in action, start a call with the agent in the bottom right corner of this page. The source code is available on GitHub for reference.
Creating a Client Tool
To create your first client tool, follow the client tools guide.
Example: Creating the `redirectToExternalURL` Tool
Example Implementation
Below is an example of how to handle the redirectToExternalURL
tool triggered by the widget in your JavaScript code:
Explore our type-safe SDKs for React, Next.js, and Python implementations.