Skip to content

Widget Embedding

Add an AI-powered chat widget to any website with a single script tag. Widgets connect to your configured AI provider and can use agent tools, playbooks, and custom instructions.

Quick Start

  1. Create a widget in Widgets > New Widget
  2. Configure the AI provider, system prompt, and behavior
  3. Copy the embed code from the widget settings
  4. Paste it into your website's HTML
html
<script
  src="https://studio.taufinity.io/widget/YOUR_WIDGET_ID/embed.js"
  async
></script>

The widget appears as a chat button in the bottom-right corner of your page.

Configuration

Each widget has its own settings that control behavior:

SettingDescription
System PromptInstructions that define how the AI responds
AI ProviderWhich model handles conversations (see providers)
Agent ModeEnable tool use (image generation, web search, playbook triggers)
Input ValidationFilter inappropriate or off-topic messages before they reach the AI
Welcome MessageInitial message shown when the widget opens
BrandingColors, logo, and widget title

Customization

Widgets inherit your branding settings — colors, logo, and title. The chat interface adapts to your site's look and feel.

Conversation Management

  • Conversations persist per browser session
  • Users can start new conversations at any time
  • When chat logging is enabled, conversations are stored for audit

Multiple Widgets

You can create multiple widgets with different configurations — for example, a support widget on your help pages and a sales widget on your pricing page. Each widget has its own embed code, AI settings, and behavior.

Rate Limiting

Public widget endpoints are rate-limited to prevent abuse. Limits apply per IP address and are configured at the organization level.