The Adopt AI JavaScript SDK allows you to embed the Agent Experience directly into your web application. It connects the agents you’ve built in the Agent Builder to your live product environment—enabling real users to interact with your Copilot in production. This SDK powers everything from rendering the UI to personalizing responses and executing actions securely in the right user context.

Why Use the SDK?

Before you deploy the Agent Experience to end users, you need to install the SDK in your web app. The SDK handles:
  • Initializing the Copilot with your org’s configuration
  • Displaying the Sidebar or Spotlight (or both)
  • Targeting users based on properties or rules
  • Securing API communication through headers and tokens
  • Supporting complex environments like SPAs or apps with CSPs
Whether you’re deploying on a simple marketing site or a multi-user SaaS platform, the SDK gives you the flexibility and control to make the Copilot feel like a native part of your product.

Integration Options

Adopt supports two ways to install the SDK →
  • Easiest setup—just add a script tag
  • Automatically handles initialization
  • Use the global window.AdoptAI object to trigger functionality
  • Full control over when and how the SDK loads
  • Better suited for TypeScript or Webpack/Vite-based projects
  • You’ll manually import methods like init(), boot(), shutdown() etc.

What This Guide Covers

This SDK guide is organized into sub-pages based on what you’ll need to set up and customize the experience →
  1. Installation
  2. SDK Lifecycle
  3. Components
  4. Configuration
  5. Security
  6. Single Page Apps (SPA’s)
  7. API Reference
  8. Troubleshooting
  9. FAQ’s
  10. Usage Examples