GETTING STARTED
Kore.ai XO Platform
Virtual Assistants Overview
Natural Language Processing (NLP)
Concepts and Terminology
Quick Start Guide
Accessing the Platform
Navigating the Kore.ai XO Platform
Building a Virtual Assistant
Help & Learning Resources
Release Notes
Current Version
Recent Updates
Previous Versions
CONCEPTS
Design
Storyboard
Overview
FAQs
Conversation Designer
Overview
Dialog Tasks
Mock Scenes
Dialog Tasks
Overview
Navigate Dialog Tasks
Build Dialog Tasks
Node Types
Overview
Intent Node
Dialog Node
Dynamic Intent Node
GenAI Node
GenAI Prompt
Entity Node
Form Node
Confirmation Node
Message Nodes
Logic Node
Bot Action Node
Service Node
Webhook Node
Script Node
Process Node
Agent Transfer
Node Connections
Node Connections Setup
Sub-Intent Scoping
Entity Types
Entity Rules
User Prompts or Messages
Voice Call Properties
Knowledge AI
Introduction
Knowledge Graph
Introduction
Terminology
Build a Knowledge Graph
Manage FAQs
Knowledge Extraction
Import or Export Knowledge Graph
Prepare Data for Import
Importing Knowledge Graph
Exporting Knowledge Graph
Auto-Generate Knowledge Graph
Knowledge Graph Analysis
Answer from Documents
Alert Tasks
Small Talk
Digital Skills
Overview
Digital Forms
Digital Views
Introduction
Widgets
Panels
Session and Context Variables
Context Object
Intent Discovery
Train
NLP Optimization
ML Engine
Overview
Model Validation
FM Engine
KG Engine
Traits Engine
Ranking and Resolver
Training Validations
NLP Configurations
NLP Guidelines
LLM and Generative AI
Introduction
LLM Integration
Kore.ai XO GPT Module
Prompts & Requests Library
Co-Pilot Features
Dynamic Conversations Features
Intelligence
Introduction
Event Handlers
Contextual Memory
Contextual Intents
Interruption Management
Multi-intent Detection
Amending Entities
Default Conversations
Conversation Driven Dialog Builder
Sentinment Management
Tone Analysis
Default Standard Responses
Ignore Words & Field Memory
Test & Debug
Overview
Talk to Bot
Utterance Testing
Batch Testing
Conversation Testing
Conversation Testing Overview
Create a Test Suite
Test Editor
Test Case Assertion
Test Case Execution Summary
Glossary
Health and Monitoring
NLP Health
Flow Health
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
Deploy
Channels
Publishing
Versioning
Analyze
Introduction
Dashboard Filters
Overview Dashboard
Conversations Dashboard
Users Dashboard
Performance Dashboard
Custom Dashboards
Introduction
Custom Meta Tags
Create Custom Dashboard
Create Custom Dashboard Filters
LLM and Generative AI Logs
NLP Insights
Task Execution Logs
Conversations History
Conversation Flows
Conversation Insights
Feedback Analytics
Usage Metrics
Containment Metrics
Universal Bots
Introduction
Universal Bot Definition
Universal Bot Creation
Training a Universal Bot
Universal Bot Customizations
Enabling Languages
Store
Manage Assistant
Team Collaboration
Plan & Usage
Overview
Usage Plans
Templates
Support Plans
Invoices
Authorization
Conversation Sessions
Multilingual Virtual Assistants
Get Started
Supported Components & Features
Manage Languages
Manage Translation Services
Multiingual Virtual Assistant Behavior
Feedback Survey
Masking PII Details
Variables
Collections
IVR Settings
General Settings
Assistant Management
Manage Namespace
Data
Overview
Data Table
Table Views
App Definitions
Data as Service
HOW TOs
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
Design Conversation Skills
Create a Sample Banking Assistant
Create a Transfer Funds Task
Create a Update Balance Task
Create a Knowledge Graph
Set Up a Smart Alert
Design Digital Skills
Configure Digital Forms
Configure Digital Views
Add Data to Data Tables
Update Data in Data Tables
Add Data from Digital Forms
Train the Assistant
Composite Entities
Use Traits
Use Patterns for Intents & Entities
Manage Context Switching
Deploy the Assistant
Configure an Agent Transfer
Use Assistant Functions
Use Content Variables
Use Global Variables
Intent Scoping using Group Node
Analyze the Assistant
Create a Custom Dashboard
Use Custom Meta Tags in Filters
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. Docs
  2. Virtual Assistants
  3. SDKs
  4. 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.

 

 

 

메뉴