Back to Blog
Platform

Embed a Cerebral on Any Website With One Script Tag

Deploy on unlimited domains. Handle unlimited visitors. Scale to millions of conversations.

February 20, 2026

We just shipped Widgets.

Now any Cerebral can live on any website.

One script tag. No integration complexity. No months-long deployments.

Your customer service Cerebral? Drop it on your Shopify store.

Your support Cerebral? Add it to your SaaS product.

Your sales Cerebral? Embed it on your landing page.

What We Built

A complete embeddable chat widget system that lets you deploy Cerebrals to any web surface.

The entire implementation:

<script src="https://app.cerebralos.com/widget.js"
       data-widget-id="widget_abc123">
</script>

That's it.

Paste that before your closing </body> tag and you have a fully functional AI employee on your website.

Why This Matters

Before Widgets:

Cerebrals lived inside Cerebral OS.

Which meant your customers had to:

After Widgets:

Cerebrals live wherever your customers are.

On your:

Right in the browsing experience.

No context switching. No separate logins. No friction.

How It Actually Works

Step 1: Create a Widget

Log into Cerebral OS โ†’ Widgets โ†’ Create Widget

Pick which Cerebral to deploy (Customer Service, Sales, Support, whatever you've built)

Configure appearance and behavior.

Step 2: Copy the embed code

<script src="https://app.cerebralos.com/widget.js"
       data-widget-id="your_widget_id">
</script>

Step 3: Paste it on your site

Add it to your website's HTML.

That's the entire deployment.

The widget loads, connects to your Cerebral, and starts handling conversations.

What You Can Configure

Branding

Agent Name & Avatar:

Colors:

Welcome Message:

Position:

Behavior

Auto-Open:

Contact Collection:

File Uploads:

Business Hours:

Reset on Navigation:

Intent Menu (This is Cool)

Instead of forcing customers to describe their issue in text, show them a menu:

Support Categories:

Customer clicks their intent โ†’ Cerebral knows exactly what they need โ†’ deterministic routing to the right workflow.

No LLM guessing. Clean intent detection.

The Cerebral receives [Intent: ORDER_STATUS] and routes accordingly.

Session Continuity

The widget remembers.

Customer asks: "Where's my order?"

Navigates to a different page.

Comes back later.

Same conversation continues.

Session ID stored in browser cookie. Context preserved across:

Unless you want fresh conversations per page - then enable reset_on_navigation.

Page Context Awareness

The Cerebral knows where the customer is on your site.

Every message includes:

Example:

Customer on /products/running-shoes asks: "Is this waterproof?"

Cerebral sees:

{
 "message": "Is this waterproof?",
 "pageUrl": "https://example.com/products/running-shoes",
 "pageTitle": "TrailRunner Pro - Running Shoes"
}

The Cerebral can:

Proactive Messages

Widget can start conversations automatically.

"Need help finding the right size?" - shows after 10 seconds on product page

"Have questions about shipping?" - appears on checkout page

"Can I help you with anything?" - nudges after 30 seconds of browsing

Configure multiple proactive messages with different triggers and delays.

Broadcast Messages

Push a message to all active widget visitors at once.

Use cases:

Two types:

Banner: Shows at top of widget (doesn't interrupt conversation)

Message: Injected as if Cerebral sent it (starts conversation)

Visitors can dismiss. Seen state tracked in their browser.

Real-World Example: E-Commerce

Shopify store selling outdoor gear.

Widget configured:

Customer flow:

  1. Lands on hiking boot product page
  2. Widget opens automatically after 15 seconds
  3. Shows intent menu
  4. Clicks "Product Questions"
  5. Asks: "Are these good for wide feet?"

What the Cerebral sees:

{
 "message": "Are these good for wide feet?",
 "injectedIntent": "PRODUCT_QUESTIONS",
 "pageUrl": "https://store.com/hiking-boots-pro",
 "pageTitle": "HikePro Boots - Waterproof Hiking Boots"
}

Cerebral workflow:

All automatic. No human involved.

Real-World Example: SaaS Product

Project management SaaS tool.

Widget configured:

Customer asks: "How do I export my data?"

What the Cerebral sees:

{
 "message": "How do I export my data?",
 "injectedIntent": "TECHNICAL_SUPPORT",
 "pageUrl": "https://app.saas.com/projects/dashboard",
 "authContext": {
   "userId": "user_123",
   "email": "jane@example.com",
   "planTier": "pro",
   "accountAge": "247 days"
 }
}

Cerebral workflow:

Personalized based on plan tier and authenticated user.

Technical Details (For Developers)

How the Widget Works

Widget.js is a vanilla JavaScript IIFE:

When it loads:

  1. Fetches widget config from /api/v1/widgets/public/config/:widgetId
  2. Checks for existing session in localStorage
  3. Checks for active broadcasts
  4. Renders launcher bubble
  5. Listens for user interaction

When customer sends a message:

  1. Widget POSTs to /api/v1/widgets/public/chat
  2. Includes: message, sessionId, visitorId, pageUrl, pageTitle
  3. Backend routes to the assigned Cerebral
  4. Cerebral processes and responds
  5. Widget displays response
  6. Session updated in backend

Session continuity:

CORS & Security

Allowed Origins:Configure which domains can embed your widget.

Empty array = allow all (for testing)

Specified domains = only those can load the widget

Backend enforces:

File Upload Flow

When enabled:

  1. Customer clicks attachment button
  2. Widget uploads to pre-signed S3 URL
  3. Backend triggers Textract
  4. Extracted text injected into message context
  5. Cerebral receives both message + file content

Optional: Keep files in S3 after processing (configure persist_uploads)

Standalone Mode (The Part Nobody Else Does)

Widget can work as a standalone page.

No embedding. No website required. Just a direct URL.

https://app.cerebralos.com/widgets/standalone/widget_abc123

This is where it gets interesting.

QR Code Deployments

Restaurant table tent:

Product packaging:

Retail store signage:

Event badges:

Business cards:

Hotel room cards:

The Difference

Most QR codes link to:

Your QR codes link to an AI employee that:

Not information. Action.

Physical-to-Digital Bridge

Gym equipment:

Medical devices:

Manufacturing floor:

Delivery trucks:

Mobile-First Support

Email signature link:

SMS campaigns:

Print advertising:

No App Required

This is the key insight:

Most companies build mobile apps for workflows that only need to happen occasionally.

You don't need an app for:

You need a direct link to something that works.

QR code โ†’ Cerebral โ†’ Work gets done.

No download. No account creation. No app store approval.

Just scan and interact.

Internal Use Cases

Office building directory:

Factory floor stations:

Hospital patient rooms:

Retail stockroom:

Standalone Mode

Widget can also work as a standalone page.

No embedding needed. Just a direct link:

https://app.cerebralos.com/widgets/standalone/widget_abc123

Full-page widget. No launcher bubble. Just the conversation.

Perfect for:

Analytics Integration

Every widget interaction tracked:

Available in Analytics dashboard:

What Customers Are Building

E-commerce:

SaaS Products:

Healthcare:

Real Estate:

All with the same embed code. Different Cerebrals. Different workflows.

Cost Model

Widgets don't cost extra.

You pay for Cerebral usage:

The widget itself? Free infrastructure.

Deploy on unlimited domains. Handle unlimited visitors. Scale to millions of conversations.

Just like how Twilio doesn't charge for phone numbers. You pay for SMS sent.

We don't charge for widgets. You pay for Cerebral execution.

Getting Started

1. Create a Cerebral (if you haven't already)

2. Create a Widget

3. Copy the embed code

<script src="https://app.cerebralos.com/widget.js"
       data-widget-id="YOUR_WIDGET_ID">
</script>

4. Add to your website

5. Test it

6. Ship it

The Bottom Line

Cerebrals shouldn't require separate platforms.

They should work where your customers already are.

Widgets make that happen.

One script tag.

Any website.

Full AI employee functionality.

No integration complexity. No API keys to manage. No backend development.

Just paste the code and go.

The widget is live.

Start embedding.

[Create your first widget โ†’]

โ€

See Cerebral in production.

Governed, auditable labor running real workflows across your existing infrastructure.

Book a Demo