はじめに
対話型AIプラットフォーム
チャットボットの概要
自然言語処理(NLP)
ボットの概念と用語
クイックスタートガイド
プラットフォームへのアクセス
ボットビルダーの操作
リリースノート
最新バージョン(英語)
以前のバージョン(英語)
廃止機能(英語)
コンセプト
設計
ストーリーボード
ダイアログタスク
ダイアログタスクとは
ダイアログビルダー
ノードタイプ
インテントノード
ダイアログノード
エンティティノード
フォームノード
確認ノード
ロジックノード
ボットアクションノード
サービスノード
Webhookノード
スクリプトノード
グループノード
エージェント転送ノード
ユーザープロンプト
音声通話プロパティ
イベント ハンドラー
ナレッジグラフ
ナレッジグラフの抽出
ナレッジグラフの構築
ボットにナレッジグラフを追加
グラフの作成
ナレッジグラフの構築
既存のソースからFAQを構築
通知タスク
スモールトーク
デジタルスキル
デジタルフォーム
デジタルビュー
デジタルビューとは
パネル
ウィジェット
トレーニング
トレーニングとは
機械学習
機械学習とは
モデル検証
ファンダメンタルミーニング
ナレッジグラフ
示唆
ランキングおよび解決
NLPの詳細設定
NLPのガイドライン
インテリジェンス
インテリジェンスとは
コンテキスト
コンテキストインテント
割り込み
複数インテントの検出
エンティティの変更
デフォルトの会話
センチメント管理
トーン分析
テストとデバッグ
ボットと会話
発話テスト
バッチテスト
会話テスト
デプロイ
チャネル
公開
分析
ボットの分析
NLPメトリクス
会話フロー
Usage Metrics
封じ込め測定
カスタムダッシュボード
カスタムダッシュボードとは
メタタグ
カスタムダッシュボードとウィジェット
LLM and Generative AI
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
ユニバーサルボット
ユニバーサルボットとは
ユニバーサルボットの定義
ユニバーサルボットの作成
ユニバーサルボットのトレーニング
ユニバーサルボットのカスタマイズ
他言語の有効化
ストア
プラントと使用
Overview
Usage Plans
Support Plans
Invoices
管理
ボット認証
複数言語対応ボット
個人を特定できる情報の編集
ボット変数の使用
IVRのシステム連携
一般設定
ボット管理
ハウツー
会話スキルの設計
バンキングボットを作成
バンキングボット – 資金の振り替え
バンキングボット – 残高を更新
ナレッジグラフを構築
スマートアラートの予約方法
Integrations
Actions
Actions Overview
Asana
Configure
Templates
Azure OpenAI
Configure
Templates
BambooHR
Configure
Templates
Bitly
Configure
Templates
Confluence
Configure
Templates
DHL
Configure
Templates
Freshdesk
Configure
Templates
Freshservice
Configure
Templates
Google Maps
Configure
Templates
Here
Configure
Templates
HubSpot
Configure
Templates
JIRA
Configure
Templates
Microsoft Graph
Configure
Templates
Open AI
Configure
Templates
Salesforce
Configure
Templates
ServiceNow
Configure
Templates
Stripe
Configure
Templates
Shopify
Configure
Templates
Twilio
Configure
Templates
Zendesk
Configure
Templates
Agents
Agent Transfer Overview
Custom (BotKit)
Drift
Genesys
Intercom
NiceInContact
NiceInContact(User Hub)
Salesforce
ServiceNow
Configure Tokyo and Lower versions
Configure Utah and Higher versions
Unblu
External NLU Adapters
Overview
Dialogflow Engine
Test and Debug
デジタルスキルの設計
デジタルフォームの設定方法
デジタルビューの設定方法
データテーブルのデータの追加方法
データテーブルのデータの更新方法
Add Data from Digital Forms
ボットのトレーニング
示唆の使用方法
インテントとエンティティのパターンの使用方法
コンテキスト切り替えの管理方法
ボットのデプロイ
エージェント転送の設定方法
ボット関数の使用方法
コンテンツ変数の使用方法
グローバル変数の使用方法
ボットの分析
カスタムダッシュボードの作成方法
カスタムタグを使ってフィルタリング
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
Build a Travel Planning Assistant
Travel Assistant Overview
Create a Travel Virtual Assistant
Design Conversation Skills
Create an ‘Update Booking’ Task
Create a Change Flight Task
Build a Knowledge Graph
Schedule a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Train the Assistant
Use Traits
Use Patterns
Manage Context Switching
Deploy the Assistant
Use Bot Functions
Use Content Variables
Use Global Variables
Use Web SDK
Build a Banking Assistant
Migrate External Bots
Google Dialogflow Bot
APIs & SDKs
API Reference
API Introduction
Rate Limits
API List
koreUtil Libraries
SDK Reference
SDK Introduction
Web SDK
How the Web SDK Works
SDK Security
SDK Registration
Web Socket Connect and RTM
Tutorials
Widget SDK Tutorial
Web SDK Tutorial
BotKit SDK
BotKit SDK Deployment Guide
Installing the BotKit SDK
Using the BotKit SDK
SDK Events
SDK Functions
Tutorials
BotKit - Blue Prism
BotKit - Flight Search Sample VA
BotKit - Agent Transfer
  1. ホーム
  2. Docs
  3. Virtual Assistants
  4. SDKs
  5. Web SDK: Architecture, Security, and Resource Utilization

Web SDK: Architecture, Security, and Resource Utilization

The Kore.ai Web SDK is a powerful tool for integrating Kore.ai chatbots into web applications. This document provides an overview of how the Web SDK works, its architecture, security model, and resource utilization. It also discusses using JSON Web Tokens (JWTs) for session management and authentication, ensuring secure communication between the SDK and the Kore.ai platform.

How the Web SDK Works and Resource Utilization

  • The Kore.ai Web SDK consists of JavaScript libraries that are embedded into the client web application to enable communication with Kore.ai bots over a web socket.
  • The SDK libraries run on the client side in the user’s web browser. This means the SDK itself does not consume server-side resources.
  • The main resource utilization will be the hosting of the SDK files (JavaScript, CSS, etc.) and serving them to the client. This is minimal overhead, similar to serving other static web assets.

Session Management between Web SDK and Bot Platform

  • The Web SDK uses JSON Web Tokens (JWTs) to establish a secure session with the Kore.ai platform on behalf of the end user.
  • When the SDK is initialized, it calls a client-provided assertion function that generates a signed JWT containing the user identity and client app credentials. To make the signing secure, this assertion function will internally call the JWT generation service to get the JWT.
  • This JWT is sent to the Kore.ai platform to authenticate the user and establish the bot session.
  • The session is maintained on the client side using web sockets. Messages between the SDK and the bot platform are exchanged using this secure web socket.

JWT Flow

JWT Flow

Stateless Web SDK and Session Persistence

  • The Web SDK is stateless on the server side. All session states are stored on the client side in the user’s browser.
  • If a user’s request gets routed to a different web server in your Active-Active setup, their bot session will persist uninterrupted.
  • This is because the session state (user context, conversation history, etc.) is enclosed in the JWT, and messages are sent from the SDK. It is not dependent on any particular server.
  • Even if the client-side state gets lost (e.g. user refreshes page), the session can be restored from the user identity in the JWT. The loadHistory option can be enabled to retrieve recent conversation history in this scenario.

Minimum Server Requirements

  • Given the Web SDK runs client-side and simply needs the static files served, the minimum server requirements are quite low.
  • A server with 2 CPUs and 4 GB RAM should be more than adequate to serve the Web SDK files as part of a web application.
  • The real consideration is the expected traffic and concurrent users for your application as a whole rather than the Web SDK specifically.

Security of the Web SDK and JWT Service

  • The Web SDK uses secure web sockets (wss://) for all communication with the Kore.ai platform, encrypting data end-to-end.
  • User authentication is handled via signed JWTs, ensuring only authorized clients can establish bot sessions.
  • Client secrets and private signing keys are never exposed client-side. The JWT signing occurs server-side via the client-provided assertion function.
  • The client app ID and secret used to sign the JWT are obtained by registering your app on the Kore.ai platform, ensuring only valid clients can authenticate.
  • As an added security measure, you can enable the requireHTTPS option to force the SDK to only communicate over HTTPS.It’s important to note that you must host a server-side JWT generation service for the Web SDK to authenticate with the Kore.ai platform. This service should:
    • Receive a request from the Web SDK with the user identity and any other necessary claims.
    • Retrieve the client app ID and secret (or private key) from a secure location (e.g., environment variables, secret management service).
    • Generate and sign the JWT using the client credentials and return it to the Web SDK.

The JWT service should be hosted on infrastructure that matches your security and compliance requirements. A few recommendations:

  • Host the service on HTTPS with a valid SSL certificate.
  • Ensure the server has restricted access and follows security best practices (regular patching, minimal attack surface, etc.).
  • Store secrets securely and rotate them periodically.
  • Implement rate limiting and other safeguards against abuse.
  • From a resource perspective, the JWT service is lightweight and can be hosted on a server with similar specs to your web servers (2 CPUs, 4GB RAM). The main factors are the expected traffic and ensuring low latency to generate JWTs quickly.

The Kore.ai Web SDK is a lightweight and secure solution for enabling Kore.ai bots in your web application. Its client-side architecture, stateless design, and JWT-based authentication make it well-suited for deployment across multiple web servers in an Active-Active setup. With proper app credentials and SSL, you can ensure a secure and uninterrupted user experience. Learn more.

 

 

 

Web SDK: Architecture, Security, and Resource Utilization

The Kore.ai Web SDK is a powerful tool for integrating Kore.ai chatbots into web applications. This document provides an overview of how the Web SDK works, its architecture, security model, and resource utilization. It also discusses using JSON Web Tokens (JWTs) for session management and authentication, ensuring secure communication between the SDK and the Kore.ai platform.

How the Web SDK Works and Resource Utilization

  • The Kore.ai Web SDK consists of JavaScript libraries that are embedded into the client web application to enable communication with Kore.ai bots over a web socket.
  • The SDK libraries run on the client side in the user’s web browser. This means the SDK itself does not consume server-side resources.
  • The main resource utilization will be the hosting of the SDK files (JavaScript, CSS, etc.) and serving them to the client. This is minimal overhead, similar to serving other static web assets.

Session Management between Web SDK and Bot Platform

  • The Web SDK uses JSON Web Tokens (JWTs) to establish a secure session with the Kore.ai platform on behalf of the end user.
  • When the SDK is initialized, it calls a client-provided assertion function that generates a signed JWT containing the user identity and client app credentials. To make the signing secure, this assertion function will internally call the JWT generation service to get the JWT.
  • This JWT is sent to the Kore.ai platform to authenticate the user and establish the bot session.
  • The session is maintained on the client side using web sockets. Messages between the SDK and the bot platform are exchanged using this secure web socket.

JWT Flow

JWT Flow

Stateless Web SDK and Session Persistence

  • The Web SDK is stateless on the server side. All session states are stored on the client side in the user’s browser.
  • If a user’s request gets routed to a different web server in your Active-Active setup, their bot session will persist uninterrupted.
  • This is because the session state (user context, conversation history, etc.) is enclosed in the JWT, and messages are sent from the SDK. It is not dependent on any particular server.
  • Even if the client-side state gets lost (e.g. user refreshes page), the session can be restored from the user identity in the JWT. The loadHistory option can be enabled to retrieve recent conversation history in this scenario.

Minimum Server Requirements

  • Given the Web SDK runs client-side and simply needs the static files served, the minimum server requirements are quite low.
  • A server with 2 CPUs and 4 GB RAM should be more than adequate to serve the Web SDK files as part of a web application.
  • The real consideration is the expected traffic and concurrent users for your application as a whole rather than the Web SDK specifically.

Security of the Web SDK and JWT Service

  • The Web SDK uses secure web sockets (wss://) for all communication with the Kore.ai platform, encrypting data end-to-end.
  • User authentication is handled via signed JWTs, ensuring only authorized clients can establish bot sessions.
  • Client secrets and private signing keys are never exposed client-side. The JWT signing occurs server-side via the client-provided assertion function.
  • The client app ID and secret used to sign the JWT are obtained by registering your app on the Kore.ai platform, ensuring only valid clients can authenticate.
  • As an added security measure, you can enable the requireHTTPS option to force the SDK to only communicate over HTTPS.It’s important to note that you must host a server-side JWT generation service for the Web SDK to authenticate with the Kore.ai platform. This service should:
    • Receive a request from the Web SDK with the user identity and any other necessary claims.
    • Retrieve the client app ID and secret (or private key) from a secure location (e.g., environment variables, secret management service).
    • Generate and sign the JWT using the client credentials and return it to the Web SDK.

The JWT service should be hosted on infrastructure that matches your security and compliance requirements. A few recommendations:

  • Host the service on HTTPS with a valid SSL certificate.
  • Ensure the server has restricted access and follows security best practices (regular patching, minimal attack surface, etc.).
  • Store secrets securely and rotate them periodically.
  • Implement rate limiting and other safeguards against abuse.
  • From a resource perspective, the JWT service is lightweight and can be hosted on a server with similar specs to your web servers (2 CPUs, 4GB RAM). The main factors are the expected traffic and ensuring low latency to generate JWTs quickly.

The Kore.ai Web SDK is a lightweight and secure solution for enabling Kore.ai bots in your web application. Its client-side architecture, stateless design, and JWT-based authentication make it well-suited for deployment across multiple web servers in an Active-Active setup. With proper app credentials and SSL, you can ensure a secure and uninterrupted user experience. Learn more.

 

 

 

メニュー