> ## Documentation Index
> Fetch the complete documentation index at: https://koreai.mintlify.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Agent AI Web SDK v3.13.1

Agent AI Web SDK provides a versatile and customizable solution for integrating AI Agent functionalities into web applications. Built using JavaScript, Preact, and SCSS, this SDK enables seamless interaction, real-time event handling, and UI customization for an enhanced user experience.

## Prerequisites

Before using the SDK, generate the following identifiers:

* **Client ID**
* **Bot ID**
* **Client Secret**

To generate the above identifiers, follow these steps:

1. Navigate to the [AgentAssist Configuration](https://agentassist.kore.ai/) page.
2. Open the **Automations** section.
3. Create a new app or import an existing one.
4. Once the app is created or imported, its details are displayed under the **Channels** section of the **Configuration** page.

Generate a JWT **(JSON Web Token)** using the above identifiers.

<img src="https://mintcdn.com/koreai/QMFg8VtHu7wMGzMa/ai-for-service/agentai/integration/websdk/images/web-sdk01.png?fit=max&auto=format&n=QMFg8VtHu7wMGzMa&q=85&s=3ab3d56bbe2abcf4f8824535ad67aeaf" alt="web-sdk-channel" width="512" height="258" data-path="ai-for-service/agentai/integration/websdk/images/web-sdk01.png" />

## Getting Started

There are two ways to integrate the SDK into your project:

* Installation via CDN
* Installation via NPM

### Installation via CDN

Include the SDK directly in your HTML via a CDN:

```
<script src="https://cdn.jsdelivr.net/npm/@koreai/agentai-web-sdk@1.0.0/dist/umd/agentai-web-sdk-umd.min.js"></script>
   <script>
       var AAConfig = AAWindow.AAConfig;
       var AAWindow = AAWindow.AAWindow;
       var aaWindowInstance = new AAWindow();
       var config = {
	connectionDetails: {
               domainUrl: "<DOMAIN_URL>",
               token: "<TOKEN>",
               botId: "XXXX",
               botName: "<BOT_NAME>",
               conversationId: "XXXX",
               interactiveLanguage: "en",
               customData: {},
               userName: "<User Name>",
               channel: "chat",
	   sessionId: 0,
 	   summaryEnabled: "true",
	}
        };
       aaWindowInstance.show(config);
   </script>
```

### Installation via NPM

To install the SDK via NPM, use the following command

```
npm install --save @kore/agentai-web-sdk
```

Initialize the SDK in your project

```
import { AAConfig, AAWindow } from '@kore/agentai-web-sdk';
   const aaWindowInstance = new AAWindow();
   const config = { ...AAConfig };
   config.connectionDetails = {
       domainUrl: "<DOMAIN_URL>",
       token: "<YOUR_TOKEN>",
       botId: "XXXX",
       botName: "<BOT_NAME>",
       conversationId: "XXXX",
       interactiveLanguage: "en",
       customData: {},
       userName: "<USER_NAME>",
       channel: "chat",
       sessionId: "sessionId"
   }
```
