Docs

Quickstart

From install to a chat that renders your own components, in four steps. The full reference is being written alongside the SDK; this page covers what you need to start.

  1. 1

    Install the SDK

    Add the package to your Flutter app. It is pure Dart and runs on iOS, Android, Flutter Web and desktop.

    flutter pub add kletso
  2. 2

    Initialise with your keys

    Use your workspace key and a short-lived JWT for the signed-in user so tools act with their permissions.

    await Kletso.init(
      apiKey: 'kl_live_…',
      user: KletsoUser(jwt: token),
    );
  3. 3

    Register your components

    Map typed reply blocks to your real widgets. Default renderers cover text, buttons, cards and forms.

    Kletso.registerRenderer(
      'order_card',
      (ctx, data) => OrderCard.fromJson(data),
    );
  4. 4

    Open the chat and send events

    Open the launcher from any button, and send events so dashboard triggers can react.

    Kletso.open();
    Kletso.track('cart_abandoned');

On the web

No Flutter? Drop the widget on any site or framework. Configure everything else in the dashboard.

<script async src="https://cdn.kletso.ai/widget.js" data-key="kl_live_…"></script>

Full reference coming with the SDK release

Want early access to the SDK and the complete API docs? Join the early-access list and we’ll send them the day they ship.