Skip to main content

Web Widget

Seamlessly integrate AI Agent into your website to provide visitors with conversational assistance, calls, and voice-to-text.

Embed AI Agent on your website.

General

  • Audio Transcription - Enables converting voice inputs into text directly within the widget.

  • AI Web Call - Allows users to make calls directly from the web widget. Activating this feature consumes platform credits.

    Platform Credits

    Activating AI Web Call consumes platform credits. Make sure you have sufficient credits before enabling this feature.

  • AI Video Call - Allow users to make video calls directly from the web widget with the Web Video Call feature.

  • Attachments - When enabled, users can attach files and documents to their conversations.

    Enable voice-to-text, calls, and adjust your AI Agent's position easily.
  • AI Agent Position - Adjust the AI Agent's position on your website as needed.

  • Draggable - Enables users to drag and reposition the AI Agent widget on the screen.

  • Mobile Device Visibility - Ensures the widget is accessible and functional for users on mobile devices.

    Enable voice-to-text, calls, and adjust your AI Agent's position easily.
  • Show Launcher Background - Displays a background behind the launcher button so it stays visible against complex page layouts.

  • AI Actions - When enabled, AI actions and their configured descriptions will be visible to users interacting with the AI Agent.

  • Enable User Feedback - Lets end users rate and provide feedback on conversations inside the widget.

    Enable voice-to-text, calls, and adjust your AI Agent's position easily.
  • Logged In Users Only - When the Logged In Users Only toggle is enabled, the widget will only be visible to users who have signed in. This ensures that only authenticated users can access the widget.

    Enable Logged In User toggle
    • Set User - To activate this feature, use the setUser event to provide user details for authentication. If the details are not passed, the user will not be able to interact with the AI Agent chatbot.

      Required Fields

      hostId is mandatory. Either email or phone (or both) must be provided for user identification.

      window?.copilot?.users.set({
      hostId: "12312", // Mandatory
      email: "example@gmail.com", // Mandatory (either email or phone)
      phone: "+1234567890", // Mandatory (either email or phone)
      name: "Smith",
      additionalFields: {
      orgId: 123,
      },
      });

      // `hostId` is mandatory. Either `email` or `phone` (or both) must be provided for user identification.
      FieldDataTypeDescription
      hostIdStringUnique identifier assigned to each user (mandatory).
      emailStringUser's email address (mandatory - either email or phone must be provided).
      phoneStringUser's phone number (mandatory - either email or phone must be provided).
      nameStringUser's full name. Used to personalize interactions.
      profilePicUrlStringURL to the user's profile picture. Optional but enhances user profiles visually.
      additionalFieldsObjectAdditional details like age, gender, or interests for improved chatbot responses.
      • Setting User in AI Agent Script - Call setUser inside the copilot("init") callback function (the third parameter). This ensures the user is set after the AI Agent loads:

        Best Practice

        Always call setUser inside the copilot("init") callback to ensure the user is set after the AI Agent loads successfully.

        <script type="application/javascript">
        (function(w,d,s,o,f,js,fjs){w[o]=w[o]||function(){(w[o].q=w[o].q||[]).push(arguments);};(js=d.createElement(s)),(fjs=d.getElementsByTagName(s)[0]);js.id=o;js.src=f;js.async=1;js.referrerPolicy = "origin";fjs.parentNode.insertBefore(js,fjs);})(window,document,"script","copilot","https://script.copilot.live/v1/copilot.min.js?tkn=cat-YOUR_TOKEN_HERE");
        copilot("init",{},function(){
        // Add setUser here, inside the init callback
        window?.copilot?.users.set({
        hostId: "user_12345",
        email: "john.doe@example.com",
        name: "John Doe",
        profilePicUrl: "https://example.com/profile-pic.jpg",
        phone: "+1234567890"
        });
        });
        </script>
    • Unset User - When a user logs out, use the unsetUser event to clear their session from the widget.

      window?.copilot?.users.unset();
  • Resume Conversation - When enabled, the AI Agent resumes the last conversation with the user. If disabled, it starts a new conversation each time the page is opened.

  • Allowed Domains and Paths - Define specific domains and paths where the widget is allowed to function. This helps maintain security and ensures the widget is only accessible from approved locations.

    Configure allowed domains and paths for the web widget.
    Security Feature

    The Allowed Domains feature is a security mechanism. If a domain is not in the allowed list, the widget will not appear, even if the script code is present on the page.

    When you embed the Copilot widget on a website using the <script> code, the widget performs a security check:

    • Domain Verification: The widget checks which domain the website is running on
    • Allowed List Check: It verifies whether that domain is listed in the Allowed Domains configuration
    • Widget Behavior:
      • ✅ If the domain is allowed, the widget loads and appears on the page
      • ❌ If the domain is NOT allowed, the widget will not appear, even if the script is present on the page

    This security feature prevents unauthorized use of your widget and ensures it only functions on domains you've explicitly approved.

    Example

    If Allowed Domains is configured with:

    gofynd.com
    kaily.ai
    • The widget will load and function on https://gofynd.com and https://kaily.ai
    • The widget will not appear on any other domains, such as https://example.com or https://unauthorized-site.com

Embed Code

To add the AI Agent to your website, copy and paste the following code into your webpage:

Copy and paste this code to add the AI Agent to your website

Integrate AI Actions

  • Use AI Actions to trigger backend workflows, call external APIs, or run MCP tools directly from conversations.
  • For setup steps and examples (Workflows, Web Client Action, MCP Server), see the AI Actions Guide.

React Copilot Widget

For the official React integration and advanced usage, see the React Copilot Widget Guide.

Kaily logo

More than just a virtual AI assistant, Kaily brings interactive, human-like conversations to your website. Easy to create, easier to customize, and the easiest to deploy—no code required. Let Kaily enhance your user experience using the information you provide.

Is this page useful?