Video Modal Embed
When the DemoBites SDK is present on the page, the videos Expert returns open in an in-page modal embed, your user watches the walkthrough without leaving your app. With no SDK, the same link opens the dedicated bite page. One behavior, automatic fallback.
How it works
Every Expert result includes the bite’s page URL. When a user clicks a result, a simple waterfall decides how it opens:
SDK present + enabled
The bite opens in a modal embed over your page (the embedded player), so the user never navigates away.
No SDK on the page
The result link opens the dedicated bite page as normal, no change to existing behavior.
Add the SDK
Include one script on the pages where your AI agent renders Expert answers. ReplaceYOUR_WORKSPACE_SLUGwith your workspace slug.
<script src="https://assets.demobites.com/sdk.js?ws=YOUR_WORKSPACE_SLUG"></script>The SDK is the same universal script that powers Pulse and Moments. It loads asynchronously and exposes window.DemoBites. Your page’s domain must be on your workspace’s allowed-domains list.
The Expert toggle
In your Expert’s Settings, the “Open bites in a modal embed”toggle controls this behavior. It is on by default. Turn it off to always send users to the dedicated bite page, even when the SDK is present. The setting is returned in the API response as open_in_modal.
Open a bite yourself
If your agent renders its own UI, call the SDK directly to open any bite in the modal. Pass the bite’s video_id / identifier and title from the search response:
// After the SDK has loaded (window.DemoBites.isReady())
window.DemoBites.openBiteModal({
slug: result.id, // the bite's URL identifier from the result
title: result.title, // shown in the modal header
});openBiteModal is safe to call before the SDK finishes loading, the call is queued and runs once ready. Usewindow.DemoBites.ready(cb)if you want a callback.
Fallback behavior
The modal is purely an enhancement. If the SDK is absent, blocked by the domain allowlist, or the toggle is off, results open the dedicated bite page instead. Your integration always works; the modal just makes it feel native when the SDK is there.