Install with the npm SDK

For single-page apps and headless storefronts, the web SDK gives you control over when and where the widget mounts.

About 10 minutes

  1. Create a Web channel

    In the LiveCart console open Channels, add a Web channel, list the domains the widget may load on, and choose the AI agent that should answer.

  2. Install the package

    Add the SDK to your project.

    npm install @livecarthq/web-sdk
  3. Initialise

    Call init once when your app starts, with your public installation key. Use renderMode "inline" to mount inside your own layout.

    import { init } from "@livecarthq/web-sdk";
    
    const widget = init({
      installationKey: "YOUR_PUBLIC_KEY",
      renderMode: "iframe", // or "inline" to mount inside your app
    });
  4. Test it

    Open your site in a private window, start a chat and ask a question your knowledge base covers. The conversation appears in your LiveCart inbox.

FAQ

Questions, answered

Still curious? Ask our team

Is the installation key secret?

No, it is a public key restricted by your allowed domains. Never put private API keys in front-end code.

Your agent is one paste away

Create a free LiveCart workspace and copy your snippet from the Install tab.

Change these any time from the footer.