Web sdk
Getting Started

Getting started

pnpm add @agiflowai/js-sdk

Sdk overview

@agiflowai/js-sdk provides below functionalities:

  • Establish user session to keep client tracking private to user.
  • Keep track of user interaction and tracing.
  • Manage feedback widget and prompts.

Setup sdk

Setup @agiflowai/js-sdk client once and use agiflowClient throughout the app liked below:

import { Agiflow } from '@agiflowai/js-sdk';
 
const agiflowClient = new Agiflow();
agiflowClient.init(
  process.env.CLIENT_KEY, // Agiflow client key (please don't use API key here)
);

The client key is available on Environment > Settings page on Agiflow Dashboard (opens in a new tab).