✦ New. One shared inbox behind WhatsApp, Instagram, Messenger, web and voice. See how handoff works →
Developers

Live on your site in about five minutes

Create an agent, let it read your content, paste one script tag. Everything after that, including branding, channels and what the agent is allowed to do, is configured in the workspace and needs no second deploy.

Last updated September 2026

Contents
1

Create

Paste your website URL. The agent is created and starts reading.

About 1 minute
2

Train

It crawls your pages and files, then cites them when it answers.

A few minutes
3

Embed

One script tag, or share the hosted link and skip embedding.

About 1 minute

Overview

OU Chat trains an AI agent on content you already have, then answers your customers with it. The same trained agent answers on your website and on every messaging channel you connect, so there is one place to fix an answer and one transcript per customer.

  • One agent, many channels. Connect a channel in the workspace, not in code.
  • One script tag on your site, carrying a public key. No SDK to install.
  • Answers cite the page they came from, and escalate to a person when they cannot.

Create your agent

Go to get started and paste your website URL. The agent is created immediately and begins crawling. Set its name, colour, greeting and quick prompts in the workspace while it reads.

You do not need to finish branding before going live. The snippet you paste never changes, so every later edit reaches the site on publish.

Train it on your content

Point the agent at any mix of sources: a website crawl, a sitemap, uploaded files (PDF, DOCX, PPTX, CSV, TXT, MD), raw text, or a YouTube channel. Scanned PDFs are read with OCR.

Set auto-resync to daily, weekly or monthly so answers do not go stale. When the agent cannot answer from what it has, it says so and escalates instead of guessing, which is also how you find the gaps in your own content.

Embed the widget

Copy the snippet from the Embed screen in your workspace, with your own agent key already filled in, and paste it before the closing </body> tag.

<script>
  (function (w, d, s) {
    w.ouWidget = w.ouWidget || function () { (w.ouWidget.q = w.ouWidget.q || []).push(arguments) };
    var j = d.createElement(s); j.async = 1; j.src = "https://ou.chat/widget.js";
    d.head.appendChild(j);
  })(window, document, "script");

  ouWidget("init", { deploymentId: "wgt_YOUR_KEY" });
</script>

The wrapper queues any call made before the script finishes loading, so ouWidget("init", …) on the next line is safe, and so is every method on this page. Nothing needs a readiness check.

How the OU Chat embed loads The script tag on your page renders a launcher bubble with no network calls. The first time a visitor opens it, the chat panel loads in an iframe on chat.omazy.ai, and the two talk over postMessage. Your page <script async> ouWidget("init", …) Launcher bubble ~4 KB, no network calls renders on your origin Chat panel iframe, separate origin loads on first open loads first open postMessage bridge
The script renders the bubble and makes no network calls. The chat panel loads on first open, in an iframe on its own origin, so it cannot read the host page or inherit its CSS.

Init options

Everything here is also a workspace setting. Pass an option only when you want the page to win, for example a different colour on a dark section of your site.

OptionWhat it does
deploymentIdYour agent key, wgt_…. Required, and safe to ship in HTML.
primaryColorHex colour for the launcher and accents.
positionbottom-right (default) or bottom-left.
sizesmall, medium (default) or large.
contextAny object of your own values to attach to the conversation. See setContext.

Allowed domains

Each agent lists the domains it will load on. If the widget does not appear, check that list first. A domain that is not on it is refused on purpose, so nobody can lift your key and run your agent on their own site. Add staging and www variants too, because they count as separate origins.

Share a hosted link

Every agent also has its own page at ou.chat/your-handle, with no embedding at all. Link it from an email signature, a help centre, a printed QR code or a table tent. Four live agents are on the customers page. Open one and ask it something.

Pick where you answer

Customers message where they already are. Each channel below is answered by the same trained agent, and each has its own setup page with what you need before you start.

Connect a channel

Connecting happens in the workspace, under Channels. You paste the credentials the provider gives you, and OU Chat registers the webhook for you. Nothing goes into your page source, and disconnecting deletes the credentials.

A channel inherits the agent it is attached to, so it answers from the same content on the day you connect it. There is no second training step.

Journeys

A journey is a job the agent finishes inside the conversation rather than handing off. Each one collects what it needs and then does the thing. They are opt-in per agent, so you turn on only the ones that match your business.

  • capture_orderTakes an order inside the conversation.
  • book_appointmentBooks a slot without a separate scheduler.
  • track_orderAnswers "where is my order".
  • product_finderRecommends from the live catalog.
  • lead_captureCaptures and scores a lead mid-conversation.
  • submit_ticketOpens a ticket with the transcript attached.
  • request_callbackTakes a number and a preferred time.
  • handoff_humanEscalates to a person with full context.
  • email_transcriptSends the visitor a copy of the conversation.
  • store_locatorFinds the nearest branch or outlet.

Catalog sync

Connect Shopify or WooCommerce and your products, variants, prices and stock sync into the agent, so an answer about availability reflects the store now rather than whenever the page was last crawled. Shoppers can also send a photo and get the closest thing you actually stock.

Handoff to a person

What the agent cannot answer goes to a person with the conversation attached, in the shared inbox. The visitor is not asked to repeat themselves, and the operator does not start from a blank screen.

Web chat, WhatsApp, Instagram, Telegram arrive in one queue. The agent resolves answered from your content. Anything it cannot answer goes to an operator in the shared inbox. Web chat WhatsApp Instagram Telegram AI front line answers from your content Answered from your content closed, marked AI-resolved An operator in the shared inbox Anything it cannot answer
One queue behind every channel. What reaches a person arrives with the transcript and the identity already on it.

Widget API

The loader installs one global, ouWidget. Every call is queued until the widget is up, then runs in order, so you can call any of these on the line after the snippet.

// Panel
ouWidget("open");
ouWidget("close");
ouWidget("toggle");

// Launcher: hide it on checkout, an admin screen, a full-screen editor
ouWidget("hide");
ouWidget("show");

// Start a conversation
ouWidget("startChat", { seed: "I need help with my order" });
ouWidget("sendMessage", "Where is order #1234?");

// Who is asking, and what they were looking at
ouWidget("identify", { name: "Ada Lovelace", email: "ada@acme.com" });
ouWidget("setContext", { plan: "growth", orderId: "1234" });
ouWidget("logout");

// Read the current state
ouWidget("getUnread", function (n) { console.log(n) });
ouWidget("getState", function (s) { console.log(s.open, s.identityLevel) });

// Teardown
ouWidget("destroy");
ouWidget("init", opts)Starts the widget. See init options.
ouWidget("open" | "close" | "toggle")Opens or closes the panel.
ouWidget("show" | "hide")Shows or hides the launcher bubble without unloading the widget.
ouWidget("startChat", { seed })Opens the panel and starts a conversation, optionally seeded with a first message.
ouWidget("sendMessage", text)Opens the panel and sends a message as the visitor.
ouWidget("identify", traits)Tells the agent who is asking. Accepts any traits you hold, for example name and email. login is an alias.
ouWidget("logout")Clears the identity and returns the visitor to anonymous.
ouWidget("setContext", obj)Merges your own values onto the conversation, for example a plan or an order id. Call it again on a route change.
ouWidget("on" | "off", event, fn)Subscribes to or removes an event handler.
ouWidget("getState", fn)Calls back with { open, unread, mounted, ready, layout, identityLevel }.
ouWidget("getUnread", fn)Calls back with the unread count.
ouWidget("destroy")Removes the widget from the page.

Events

Every event fires twice: to your on subscribers, and as a window CustomEvent named ouchat:widget:<event> with the payload on detail. The second form exists so a tag manager or an analytics snippet can listen without holding the SDK handle.

var onReply = function (d) {
  analytics.track("agent_reply", { sender: d.sender });
};
ouWidget("on", "message", onReply);
ouWidget("off", "message", onReply);

// Same events, without holding the SDK handle. Useful from a tag manager.
window.addEventListener("ouchat:widget:conversation-started", function (e) {
  analytics.track("chat_started", { id: e.detail.conversationId });
});
EventWhen it fires
readyThe widget has its config and is live. Payload carries the agent key and layout.
openThe visitor opened the panel.
closeThe visitor closed the panel.
messageA message arrived. Payload: { sender, preview, ts }.
unreadThe unread count changed. Payload: { count }.
conversation-startedA new conversation began. Payload carries the conversation id and the page it started on.
identity-changedThe visitor became identified or verified. Payload: { level }.
teaserA proactive teaser was shown next to the launcher.

Security

The agent key in your HTML is public by design. What protects it is the allowed-domains list: a request carrying any other origin is refused, so the key cannot be lifted onto someone else's page.

Channel credentials and integration secrets are stored server-side, are never included in the JavaScript sent to a browser, and are deleted when you disconnect. The chat panel runs in an iframe on its own origin, so it cannot read the host page, and the host page cannot read the conversation. Conversations are scoped per workspace.

For data handling, retention and subprocessors, see security and the privacy policy.

HTTP API

Programmatic access covering agents, sources, conversations and webhooks is available on Growth and above, with a key generated in your workspace. Requests use a bearer token over HTTPS. For the endpoint reference, email us and we will get you set up.

FAQ

Do I manage any API keys in page code?

No. The only value in your HTML is the public agent key, wgt_…. It is safe to ship. Every credential for a channel or an integration is stored in the workspace and never sent to a browser.

Will the widget slow my site down?

The loader is about 10 KB gzipped and loads async, so it does not block first paint. It renders the bubble and makes no network calls. The chat panel loads only when a visitor opens it.

Can the agent answer on more than one channel?

Yes. Every channel you connect is answered by the same trained agent, so there is no second bot to build and no separate knowledge base to keep in step.

What happens when my website content changes?

Set auto-resync to daily, weekly or monthly and the agent re-crawls on that schedule. You can also trigger a resync by hand after a launch.

What does the agent do when it does not know?

It says so and escalates rather than guessing. Those moments are logged, so the list of questions it could not answer is also the list of gaps in your own content.

Can I change the branding without a code change?

Yes. Colour, position, size, greeting, quick prompts and layout are all set in the workspace and take effect on publish. The snippet on your site never changes.

Stuck on setup? Contact the team and we will walk you through it, or book a walkthrough and we will build a version on your site first.