This document covers the build and usage of the @boomi/embedkit-cdn package — the pre-built UMD bundle for the public embed (CDN drop-in) flow.
The CDN bundle is a minimal, self-contained build of EmbedKit that auto-initializes from a global window.BoomiEmbed configuration object. It is designed for embedding Boomi AI Agents on any website without requiring a build pipeline, npm, or React knowledge.
React and ReactDOM are bundled in. Nothing additional is required on the host page beyond the CSS stylesheet and the UMD script.
Run the following from the embedkit/ root:
npm run build
npm run build:cdnOutput files (written to embedkit-cdn/dist/):
| File | Format | Description |
|---|---|---|
embedkit-cdn.umd.cjs |
UMD | Browser-compatible bundle. Use this in <script src="proxy.php?url=https%3A%2F%2Fgithub.com.%2F..."> tags. |
embedkit-cdn.es.js |
ESM | ES Module build for bundler consumption. |
embedkit-cdn.css |
CSS | Required stylesheet. Must be loaded alongside the JS bundle. |
Once published to npm, files are automatically available via public CDN providers:
| Provider | Base URL |
|---|---|
| jsDelivr | https://cdn.jsdelivr.net/npm/@boomi/embedkit-cdn/ |
| unpkg | https://unpkg.com/@boomi/embedkit-cdn/ |
Full asset URLs:
https://cdn.jsdelivr.net/npm/@boomi/embedkit-cdn/embedkit-cdn.umd.cjs
https://cdn.jsdelivr.net/npm/@boomi/embedkit-cdn/embedkit-cdn.css
jsDelivr is the recommended CDN for production use — it is highly available and provides global edge caching.
The CDN bundle communicates with the EmbedKit Server's public session endpoint. Ensure the server is deployed with:
POST /api/v1/embed/session— Validates the public token, agent ID, and origin, then returns a scoped access token and project configuration.
See the CDNConfiguration.md for the full embed session flow.
<!-- 1. EmbedKit stylesheet -->
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@boomi/embedkit-cdn/embedkit-cdn.css" />
<!-- 2. Configure the embed -->
<script>
window.BoomiEmbed = {
publicToken: "pk_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // From Admin Console → Projects → Token
agentId: "project_xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", // From Admin Console → Projects
mountId: "boomi-agent", // ID of the <div> to mount into
serverBase: "https://api.boomi.space/api/v1", // EmbedKit API base URL
userId: "user_456", // Optional: for session tracking
origin: "https://your-site.com" // Optional: defaults to window.location.origin
};
</script>
<!-- 3. Load the CDN bundle -->
<script src="https://cdn.jsdelivr.net/npm/@boomi/embedkit-cdn/embedkit-cdn.umd.cjs" async></script>
<!-- 4. Mount target -->
<div id="boomi-agent"></div>| Property | Required | Description |
|---|---|---|
publicToken |
Yes | The pk_... token from Admin Console → Projects |
agentId |
Yes | The project_... ID from Admin Console → Projects |
serverBase |
Yes | EmbedKit API base URL, including /api/v1 |
mountId |
No | ID of the <div> to mount into. Defaults to "boomi-agent" |
userId |
No | Identifier for the current user (analytics / session history) |
origin |
No | Override the detected origin. Defaults to window.location.origin |
autoInit |
No | Set to false to disable automatic initialization. Default: true |
If you need to defer initialization (e.g., until a user accepts a consent form):
<script>
window.BoomiEmbed = {
publicToken: "pk_...",
agentId: "project_...",
serverBase: "https://api.boomi.space/api/v1",
autoInit: false
};
</script>
<script src="https://cdn.jsdelivr.net/npm/@boomi/embedkit-cdn/embedkit-cdn.umd.cjs"></script>
<script>
// Call manually when ready
BoomiEmbedKitCdn.BoomiPublicEmbed(window.BoomiEmbed);
</script>publicTokenandagentIdmust be created and linked via the EmbedKit Admin Console at admin.boomi.space.- The origin of the host page must be registered in Admin Console → CORS before embed sessions will be accepted.
mountIddefaults to"boomi-agent"if omitted.- The bundle uses Shadow DOM to isolate styles from the host page — no style conflicts with existing site CSS.