WebChat
The WebChat channel is enabled by default in the Druid Portal. This allows you to quickly deploy your AI Agent to any web page using a pre-configured snippet.
Configure the WebChat Channel
The Druid web chat is comprised of two elements:
- web chat widget
- web chat landing page (expanded widget).
The Druid AI Platform provides you with a default web chat configuration you can embed into your website. You can further style the web chat to comply with your brand style guide.
The default webchat configuration is illustrated in the figures below. By default, the web chat displays collapsed on the page hosting the webchat.
Figure: Collapsed web chat
Clicking the collapsed web chat will expand it:
Figure: Expanded web chat
To configure an AI Agent for web integration, follow these steps:
- Go to the AI Agent settings.
- Click the Channels tab.
- In the Channels page, search for WebChat.
- Click the WebChat card to open the channel configuration modal.
- Within the modal, you can customize the WebChat styling and behavior parameters:
- Click Save at the bottom of the modal to apply your channel settings.
| Setting | Description |
|---|---|
| Avatar image URL | The URL for the custom AI Agent profile picture. |
| Custom css |
Upload a stylesheet to match your brand's look and feel (for Bot Framework v3). Info: The .css file has a maximum file size of 1MB; otherwise, you will get an error message.
NOTE: If your AI Agent uses bot framework version 4, you can do custom CSS settings by clicking the Customize webchat button in the Webchat Snippet field and customize the webchat UI based on your needs (in the Custom CSS section of the Customize Your Webchat UI editor). For more information, see WebChat Common Styling and Behavior.
|
| WebChat Snippet | The code snippet that you will be embed into your web page. For information on how to configure widget parameters, refer to see WebChat Common Styling and Behavior specific to the bot framework version you're using. |
The following parameter is available within the conversation context: [[ChatUser]].ChannelId = "directline".
Deploy the WebChat Snippet
Once you have finalized the WebChat configuration, copy the code from the WebChat snippet field and embed it into the HTML of your website hosting the AI Agent. Ensure the script is placed within the appropriate tags of your HTML web page (<head> </head>and <body> </body> tags) to initialize the chat component.
The default snippet contains:
-
A css file which contains the layout of the webchat widget (under the <head> tag)
-
A script file which renders the webchat widget (within the <body></body> tags)
-
A script which initializes the webchat component on document load.




