Prebuilt agents

Website Widget

The website widget puts an assistant on any page: your documentation, your marketing site, your support portal, or inside your app. Visitors ask in natural language and get answers grounded in the project's knowledge base, with the documents cited underneath.

Installation is one script tag, and the widget reads its name, colours and welcome message from your stored configuration: nothing to hard-code in the snippet beyond the project UID.

What it does

Out of the box:

  • Answers with sources. Every answer can list the documents it came from. The visitor sees the filename, not an opaque citation marker: enough to check the claim themselves.
  • Suggested questions. The project can carry a set of starter questions, shown before the first message so an empty widget is never silent.
  • Feedback on every answer. Copy, thumbs up and thumbs down, stored per browser. The verdict survives a reload, so a visitor does not re-rate the same answer.
  • Streamed answers. The reply appears as it is generated, not after a pause; the stop button interrupts it mid-flight.
  • Recent conversations. The last ten are kept locally for 24 hours, so a visitor can come back to a thread without starting over.
  • Transcript download. A conversation can be exported as plain text.
  • Localised interface. French or English, picked from the browser language and overridable by the page.
  • Markdown rendering. Tables, lists, code blocks with copy button and syntax colouring, and diagrams written as Mermaid render as diagrams.

Two templates

The project's template setting chooses the presentation. Both answer from the same corpus and use the same proxy routes.

TemplateShape
ConversationalFloating bubble, full-screen panel on mobile. The default.
MinimalCompact panel, less chrome, for a page that already has a lot going on.

Those are the names shown in the dashboard. The stored template value is the lowercase key: intercom or minimalist. A third key, roomy-v2, still exists and is still served: projects configured with it before it was removed from the dashboard keep working, but new projects cannot choose it.

The id of this section stays three-templates so links and anchors written against the previous version keep resolving.

The script tag differs: each template is its own file.

html
<script src="https://widget.querymindx.tech/widget/roomy-widget-conversational.js"
        data-website-id="v0m6-4hag-6ubz-o57g-7l00"></script>

Replace roomy-widget-conversational.js with roomy-widget-minimalist.js for the other template. roomy-widget-v2.js still resolves for projects that were already set to it, but the dashboard no longer offers it for new widgets: pick Conversational or Minimal.

The script is plain JavaScript: no bundler, no dependency, no build step on your side. It fetches its own configuration at load time, so changing a colour in the dashboard changes it on the site without editing the snippet.

Installation by platform

The snippet is one script tag, but most documentation platforms want it declared in their configuration file rather than pasted into a template. Below is the shape for the common ones. The only values that change are the template file name and the project UID.

Docusaurus

Add the script to docusaurus.config.js. Docusaurus injects every entry of scripts into the document head of all pages.

js
const config = {
  // …
  scripts: [
    {
      src: 'https://widget.querymindx.tech/widget/roomy-widget-conversational.js',
      'data-website-id': 'v0m6-4hag-6ubz-o57g-7l00',
      async: true,
    },
  ],
};

module.exports = config;

For TypeScript configurations (docusaurus.config.ts), the same object works unchanged: scripts accepts a list of either strings or objects.

Next.js

Next.js needs the script to run in the browser, so it goes through next/script in the root layout. Do not paste a raw <script> tag into app/layout.tsx: it is evaluated during server rendering and the widget never mounts.

jsx
import Script from 'next/script';

export default function RootLayout({ children }) {
  return (
    <html lang="en">
      <body>
        {children}
        <Script
          src="https://widget.querymindx.tech/widget/roomy-widget-conversational.js"
          data-website-id="v0m6-4hag-6ubz-o57g-7l00"
          strategy="afterInteractive"
        />
      </body>
    </html>
  );
}

afterInteractive is the right strategy: the widget is not needed for the first paint, and loading it earlier delays hydration.

MkDocs and Sphinx

Both build static HTML, so the tag goes in a template override rather than in markdown. For MkDocs, add it to overrides/main.html and point theme.custom_dir at overrides/:

html
{% extends "base.html" %}
{% block extrahead %}
  {{ super() }}
  <script src="https://widget.querymindx.tech/widget/roomy-widget-conversational.js"
          data-website-id="v0m6-4hag-6ubz-o57g-7l00"></script>
{% endblock %}

WordPress

Add the tag to the theme's footer.php just before </body>, or use a plugin that injects header and footer scripts. Do not add it through the post editor: the block editor strips <script> from post content on save.

Webflow and Framer

Both accept custom code in project settings. In Webflow, put the tag in Project settings → Custom code → Footer code. In Framer, use Site settings → Custom code → End of body. The tag must be in the body, not in the head: the widget appends itself to document.body and needs it to exist.

Anywhere else

If your platform is not listed, the rule is the same everywhere: the tag must be present on every page where the widget should appear, and it must run after the body exists. A single-page application that only mounts the tag on the home page shows the widget on the home page only.

Script attributes

AttributeRequiredMeaning
data-website-idYesThe project UID. It identifies the corpus the widget answers from. Falls back to window.RoomyAI_WEBSITE_ID.
data-project-nameNoName shown until the stored configuration loads.
data-project-colorNoBrand colour applied before the configuration loads.
data-positionNobottom-right or bottom-left. Overrides the stored position.
data-containedNotrue renders inline inside data-container-id instead of the floating bubble.
data-container-idNoId of the element to mount into when data-contained is set.

There is deliberately no API key attribute. A key pasted into a public page is readable by every visitor; the widget identifies itself by project UID, and the backend decides what that UID may read.

Domain allow-list

The widget is public, so something has to stop it from being copied onto another site. That something is the project's allowed_domains: the backend compares the Origin (or Referer) of each request against that list.

An empty list authorises nothing. A project whose domains are not configured does not serve the widget: otherwise the snippet would work anywhere by default.

localhost and 127.0.0.1 are always accepted, on any port, so the widget can be developed locally without editing the list for every machine.

Configuration

Name, subtitle, welcome message, placeholder, colours, corner radius, position, the starter questions and the branding line are stored per project and read at load time, when the widget starts.

Changing a colour in the dashboard changes it on the site without touching the snippet: the page reloads the configuration on its next visit.

Security model

The widget does not talk to the main API directly. Its requests go through a narrow relay that exposes only what a public page needs: a chat exchange, the project's presentation settings, and its public articles.

That matters because the main API can read the whole account: its projects, its keys, its billing. A stolen project UID, on its own, opens a conversation with one public corpus and nothing else. A project marked internal cannot be served to a public page at all.

Conversation history lives in the visitor's browser, keyed by project, so two widgets on two sites never share a thread.

Troubleshooting

The bubble does not appear. Check the project UID first: an unknown UID returns nothing, silently. Then check allowed_domains: an empty list is the most common cause, and it fails the same way.

The widget answers about the wrong project. The UID in the snippet and the project you edited in the dashboard are different. The UID is shown on the project row.

Answers cite nothing. The project's documents are still processing, or the question matched no passage. A project with zero indexed documents answers from the model alone, which the prompt tries to refuse rather than invent.

The panel is cut off on mobile. Check for a parent element with overflow: hidden and a fixed height. With data-contained, the widget fills the element you give it and cannot escape it.