Skip to main content

Kin Plugin

Kin is an AI-powered chat assistant that helps candidates find jobs, answer questions, and navigate your career site.

Installation

npm install @inploi/plugin-kin

Basic usage

import { initialiseSdk } from '@inploi/sdk';
import { kinPlugin } from '@inploi/plugin-kin';

const sdk = initialiseSdk({ publishableKey: 'pk_...', env: 'production' });

const kin = sdk.register(kinPlugin());

// Prepare the widget (preloads UI and connects)
kin.prepare();

Configuration

ParameterTypeRequiredDescription
serviceUrlstringNoOverride the agents service URL. Defaults to production (wss://agents.inploi.com). Only needed for local development.
themeKinThemeNoCustomize the appearance
starterPromptsStarterPrompt[]NoSuggested prompts shown in empty state
The publishable key is automatically inherited from the SDK initialisation — you don’t need to pass it again.

Theme options

type KinTheme = {
  mode?: 'light' | 'dark';
  accentColor?: string;  // Hex color
};

Starter prompts

type StarterPrompt = {
  label: string;   // Text displayed on the button
  message: string; // Message sent when clicked
};
Example:
const kin = sdk.register(kinPlugin({
  theme: {
    mode: 'light',
    accentColor: '#FF4D00',
  },
  starterPrompts: [
    { label: 'Find jobs near me', message: 'What jobs are available in my area?' },
    { label: 'Help with my application', message: 'I need help with my job application' },
  ],
}));

API

prepare()

Preloads the UI and establishes a connection. Call this early for the best user experience.
kin.prepare();

open()

Opens the chat panel.
kin.open();

close()

Closes the chat panel.
kin.close();

toggle()

Toggles the chat panel open/closed.
kin.toggle();

setTheme(theme)

Updates the theme at runtime.
kin.setTheme({ mode: 'dark', accentColor: '#6366f1' });

destroy()

Removes the widget and cleans up resources.
kin.destroy();

Features

Kin streams responses in real-time, providing a natural conversational experience.
The agent remembers the conversation within a session (or persistently, based on your configuration in Studio).
Candidates can upload CVs and other documents for the agent to analyze.
Conversations sync across browser tabs for a seamless experience.