Embeddable AI Widget

Career guidance, anywhere

Drop Cara into any website in two lines of code. Personalised AI career advice, seamlessly embedded.

01

Quick start

1

Configure the widget

Define window.CaraWidget.config before loading the script. This tells Cara who you are.

HTML
<!-- Set config BEFORE loading the widget -->
<script>
  window.CaraWidget = {
    config: {
      apiKey: 'YOUR_API_KEY_HERE',
      partnerName: 'Your Company Name',
      // userId: 'YOUR_USER_ID',     // Optional
      // buttonSize: 64,             // Optional (default: 56)
    }
  };
</script>
2

Load the script

Add the widget script tag immediately after your configuration block.

HTML
<!-- Load widget script -->
<script src="https://embedd.cara.certchain.net/cara-widget.umd.js"></script>

Order matters. Configuration must be defined before the script loads. The widget initialises automatically — no manual setup required.

02

Configuration

Property Description Status
apiKey Your Cara API key for authentication. Provided when you register your application. Required
partnerName Your organisation or company name, shown to users inside the widget. Optional
userId User ID forwarded to conversation creation for session tracking. Optional
buttonSize Widget floating button width & height in pixels. Defaults to 56. Optional
03

How it works

Auto-initialisation

When the script loads, Cara checks for window.CaraWidget.config. If found and valid, the widget mounts itself to the page automatically — no constructor calls, no DOM queries, nothing extra to wire up.

Complete example
<!-- Place anywhere in your <body> -->

<script>
  window.CaraWidget = {
    config: {
      apiKey: 'YOUR_API_KEY_HERE',
      partnerName: 'Your Company',
      // userId: 'YOUR_USER_ID',     // Optional
      // buttonSize: 64,             // Optional (default: 56)
    }
  };
</script>
<script src="https://embedd.cara.certchain.net/cara-widget.umd.js"></script>

Live demo: Cara is running on this page. Look for the chat icon in the bottom-right corner.

04

What's included

AI career guidance
Real-time career advice via WebSocket with typing indicators, slow-response warnings, and IAG-compliant career data sheets with PDF export.
File upload & preview
Drag-and-drop or click to attach PDFs, DOCX, images, CSVs, and more. In-app preview with thumbnails, download, and open-in-new-tab.
Transcript & export
One-click conversation transcript download and career data sheet PDF export, print-optimised for A4 format across all browsers.
Rich Markdown rendering
Full Markdown support including headings, lists, tables, blockquotes, links, and syntax-highlighted code blocks with one-click copy.
Shadow DOM isolation
Fully encapsulated styles — the widget never conflicts with your existing CSS. A built-in getElementById bridge ensures third-party libraries like Radix UI work seamlessly inside the Shadow Root.
Connection resilience
WebSocket with automatic reconnection, exponential backoff, heartbeat monitoring, and tab visibility detection for rock-solid connectivity.
Responsive & lightweight
Full-width drawer on mobile, expandable panel on desktop. Single UMD bundle with lazy-loaded components and zero external dependencies.
Accessible
ARIA roles and live regions, full keyboard navigation, focus management, screen-reader-only text, and prefers-reduced-motion support.
Secure by design
DOMPurify XSS sanitisation, safe external links, in-memory session data, PII masking in monitoring, and HTTPS-only communication.