Skip to content

Widgets

Widgets are embeddable AI chat interfaces that you can add to any website. Each widget has its own AI provider, system prompt, agent tools, and moderation settings — giving you full control over how the AI behaves on your site.

Creating a Widget

Navigate to Widgets and click New Widget. Configure these core settings:

SettingDescription
NameDisplay name for internal reference
AI ProviderOpenAI, Anthropic, Google, Mistral, OpenRouter, Amazon Bedrock, or Custom (see AI Providers)
AI ModelModel to use (e.g., gpt-4o, claude-sonnet-4-6)
System PromptInstructions that define the widget's personality, tone, and behavior
Welcome MessageInitial message shown when a visitor opens the widget

Embedding

Each widget has a unique embed code. Add it to any HTML page to display the chat interface:

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. See Embedding for customization options including branding, colors, and multi-widget setups.

Features

Agent Mode

Enable Agent Mode to give the AI access to tools that extend its capabilities beyond text generation:

  • Image Generation — Create images from text descriptions
  • Web Search — Find current information and references
  • Playbook Trigger — Run automated workflows from the conversation
  • Data Queries — Query your BigQuery data with SQL or natural language

See Agent Tools for configuration details and examples.

Input Validation

Enable LLM Validation to automatically check user messages for harmful content before they reach the AI. The system uses both regex patterns and an AI-based validation layer.

For custom moderation rules (blocking competitor mentions, redacting PII, filtering profanity), see Content Gates.

Conversation Management

  • Archiving — Conversations can be archived after completion
  • Compaction — Long conversations are automatically summarized to stay within context limits, so conversations can continue indefinitely
  • Encryption — When chat logging is enabled, messages are encrypted with per-organization keys

Knowledge Base (RAG)

Upload documents to your widget's knowledge base. The AI retrieves relevant passages when answering questions — grounding responses in your content rather than general knowledge. Supports PDF, text, and web content.

Show knowledge sources

Enabled by default. End-users see a small N sources ▾ link under each assistant reply; clicking it expands a panel listing the knowledge files that answered their question, each with a short snippet from the matched passage and a deep link to the original source (for scraped URLs, Google Drive, and GitHub sources — uploaded files show snippet only in v1).

Use this to build trust, help users verify answers, and expose your knowledge base as a searchable reference.

Important: File names are visible to widget visitors when this setting is enabled. If any knowledge file has an internal-sounding name (e.g. "Internal HR Policy.pdf"), either rename it to something appropriate for end-users or disable this setting. Snippet text is also shown — limit the knowledge base to content you're comfortable surfacing publicly.

OpenAI-Compatible API

Every widget is accessible via an OpenAI-compatible API endpoint. Point any OpenAI SDK or tool at /v1/chat/completions with model widget:<uuid> — including streaming support. See API Keys for authentication.

Widget Settings

Beyond the core settings, each widget has additional configuration tabs:

TabWhat It Controls
AI ConfigurationProvider, model, temperature, max tokens
AgentTool toggles, allowed playbooks, tool call limits
ValidationInput/output validation, content gates
BrandingColors, logo, title, welcome message
KnowledgeUploaded documents for RAG retrieval
APIWidget API key management

API Access

Each widget can have its own API key for programmatic access. Generate or revoke keys from the widget detail page. Widget API keys are scoped to that specific widget — they cannot access other widgets or organization resources.