Katexs
Quickstart: website chat

Quickstart

Quickstart: website chat

Put a streaming AI chat agent on your website with one script tag, restricted to the domains you allow.

What you'll build

A branded chat bubble on your website that answers visitors in real time, streams its reply word by word, remembers the visitor for 30 days on that browser, and records every conversation in your dashboard.

Steps

  1. 1

    Create a chat agent

    Open Chat agents and choose New agent. Write a system prompt and pick a model.

  2. 2

    Connect a model key if asked

    Chat agents run on your workspace's model key or the platform's. If the builder says "Add an OpenAI or Anthropic key in Integrations to take chat live", add one under Bring your own keys.

  3. 3

    Deploy

    Save and deploy the agent. Its status changes to Live.

  4. 4

    Brand the widget

    Open Website widget, pick the agent, and set the brand name, logo, accent color, theme, launcher position, greeting and up to six quick replies.

  5. 5

    Allow your domains

    Add every origin the widget will run on, one per line, for example https://www.example.com. Requests from any other origin are refused.

  6. 6

    Copy the embed code

    Paste it just before </body> on every page where the chat should appear.

  7. 7

    Test

    Open your site, click the bubble and send a message.

Embed code
<script src="https://katexs.com/widget.js" data-assistant="YOUR_PUBLIC_ID" async></script>

YOUR_PUBLIC_ID is the agent's public deployment id, shown in the embed code in the dashboard. It is safe to publish: it identifies the agent but grants no access to your workspace.

Warning

Origins must match exactly, including the protocol and the www. https://example.com and https://www.example.com are different origins. Add both if your site answers on both.

What visitors experience

  • The widget loads in its own shadow DOM, so your site's CSS can't break it and it can't break your site.
  • Replies stream in token by token, typically starting in under a second.
  • If you enable the pre-chat form, visitors are asked for their name, email and/or phone before chatting.
  • If the agent is offline or not yet deployed, the widget shows "Chat is being set up. Please check back soon." instead of failing silently.

Next steps

Last updated November 2026 · Found a problem? Email support@katexs.com