Skip to main content
The widget exposes one global function, window.karta, in the Segment/Intercom style: you call karta(command, ...args). It is load-order independent - install a tiny inline queue stub, call it immediately, and the bundle replays your calls in order once it loads. If all you want is the drop-in launcher, you do not need any of this - see the Quickstart. Reach for the command API when you want to open the widget from your own UI, identify the signed-in user, or react to what happens inside it.

The inline queue stub

Add the stub once (before or after your own scripts), then load the bundle async. Calls made before the bundle arrives are buffered and replayed in order.
You can also drive the whole config from JavaScript with init instead of data-*:
The runtime-resolved identity is not an appearance override: a named Karta uses its Karta name, while other embeds use the underlying agent name.

Commands

Unknown commands are logged via console.warn and ignored - a bad call never throws into your page.

Events

Subscribe with karta("on", name, callback):
A throwing subscriber is caught and logged - it can never break the widget or starve other subscribers.

Next

Identity

identify in depth: soft vs verified, and the HMAC scheme.

Headless & React

Skip the prebuilt UI: KartaAgentClient and <KartaWidget/>.