Skip to main content
The Adopt AI SDK includes a set of methods that let you control when and how the Agent Experience appears inside your app.

Lifecycle Methods Covered

  1. init()
  2. boot()
  3. shutdown()
  4. setUserProperties()

1. init()

Used only with the NPM package. Initializes the SDK with your license key and optional configuration (like CSP settings).

NPM Package:

Optional config:

**Important **- You must call init() before using boot() or any other method.

2. boot()

Starts the Copilot for a logged-in user. This is what makes the agent visible and interactive.

Script/CDN:

NPM Package:

Parameters:
  • userId – required (string): unique ID for the current user
  • userProperties – optional: user-level data (name, plan, etc.)
  • instanceAttributes – optional: product config, API URLs, and auth headers

3. shutdown()

Hides the Copilot from view. Usually called when the user logs out or switches accounts.

Script/CDN:

NPM Package:

Best practice: always call shutdown() before calling boot() again for a different user.

4. setUserProperties()

Updates user properties after boot()—useful for real-time changes like plan upgrades or preference updates.

Script/CDN:

NPM Package:

Summary Table

Now that you know how to initialize and control the agent experience, you can move on to: Components → Learn how to enable and customize the Sidebar or Spotlight (or both) in your application. This is where you’ll decide how the Copilot appears to users—and how it fits into your product’s overall UX.