diff --git a/assistant/widget.mdx b/assistant/widget.mdx index 28e5375a0..41bc8a336 100644 --- a/assistant/widget.mdx +++ b/assistant/widget.mdx @@ -1,7 +1,7 @@ --- title: "Embed the AI assistant widget" sidebarTitle: "Widget" -description: "Install and configure the Mintlify widget to embed an AI assistant trained on your content into any website, web app, or dashboard." +description: "Install and configure an existing Mintlify assistant widget on your site or app, or build your own in-app assistant with the assistant API." keywords: ["assistant", "chat", "embed"] --- @@ -11,7 +11,15 @@ export const WidgetCodeBlock = ({ children, ...props }) => ( {children} ); -The [assistant](/assistant) answers questions on your Mintlify site. To embed the same capability on another site or web app, use the widget. The widget gives your users access to AI chat trained on your content, wherever they use your product. Embed it in your dashboard, marketing site, support portal, or elsewhere. + + New widgets are not available. If you already use the widget, it keeps working on your authorized sites, and this page explains how to install and configure it. + + To add an AI assistant to a new site or app, build your own with the assistant API. The [Build an in-app assistant](/guides/assistant-embed) tutorial walks through building one in a Next.js app. + + For other frameworks, point a coding agent to the [create assistant message](/api/assistant/create-assistant-message-v2) API reference and ask it to build a chat widget for your app. + + +The [assistant](/assistant) answers questions on your Mintlify site. The widget embeds the same capability on another site or web app. It gives your users access to AI chat trained on your content, wherever they use your product. Embed it in your dashboard, marketing site, support portal, or elsewhere. Add the widget to any website or web application with a hosted script. The widget owns its trigger and renders inside a closed Shadow DOM, an isolated document tree that prevents your application styles from affecting the widget. @@ -19,16 +27,9 @@ The only required browser option is your public widget ID. Set embed-specific st ## Prerequisites +- An existing widget and its widget ID. - A [Pro or Enterprise plan](https://mintlify.com/pricing?ref=assistant). The widget uses the same credits as the assistant. -## Enable the widget - - - You can no longer configure the widget in the dashboard. If you already use the widget, it keeps working on your authorized sites. - - Email [support@mintlify.com](mailto:support@mintlify.com) if you need help setting up the widget on a new site. - - ## Install and configure Use the playground to configure the presentation, visual options, and observer hooks for your widget. The installation code block updates as you change each option. diff --git a/help-center/embed-docs-site-in-iframe.mdx b/help-center/embed-docs-site-in-iframe.mdx index 145928e78..026c34cb7 100644 --- a/help-center/embed-docs-site-in-iframe.mdx +++ b/help-center/embed-docs-site-in-iframe.mdx @@ -28,6 +28,6 @@ Include staging or local development origins in your request if you need to test If you serve your docs through your own reverse proxy that overwrites the `Content-Security-Policy` header, set `frame-ancestors` in your proxy's policy instead. See [CSP configuration](/deploy/csp-configuration). -## Alternative: embed the assistant widget +## Alternative: build an in-app assistant -If you want users to get answers from your documentation inside your app without loading the full site, embed the assistant widget instead. The widget loads from a hosted script, so it does not depend on your docs site's `frame-ancestors` policy. You manage the origins allowed to load the widget in your dashboard. The widget requires a Pro or Enterprise plan. See [Embed the AI assistant widget](/assistant/widget). +If you want users to get answers from your documentation inside your app without loading the full site, build your own assistant with the assistant API instead. Your assistant doesn't load your docs site, so `frame-ancestors` doesn't apply. The assistant requires a Pro or Enterprise plan. See [Build an in-app assistant](/guides/assistant-embed). diff --git a/migration-services/go-live-checklist.mdx b/migration-services/go-live-checklist.mdx index 82a668281..78ef10d9b 100644 --- a/migration-services/go-live-checklist.mdx +++ b/migration-services/go-live-checklist.mdx @@ -37,7 +37,7 @@ Use this checklist to set up configurations and validate settings before going l - Configure your [support and sales deflection emails](/assistant/configure#set-deflection-emails). - Configure your [search domains](/assistant/configure#search-domains). - Customize the [assistant's response patterns](/assistant/customize) and [add assistant skills](/assistant/skills). -- **Embed the assistant widget.** Enable the [assistant widget](/assistant/widget) to add the assistant to your product dashboard, marketing site, or support portal. +- **Build an in-app assistant.** Use the assistant API to [build your own assistant](/guides/assistant-embed) for your product dashboard, marketing site, or support portal. - **Enable add-ons.** Go to the [Site](https://app.mintlify.com/settings/project/site) page in your dashboard. Enable relevant add-ons such as agent feedback, [CI checks](/deploy/ci), related topics, and more. - **Set up the Slack agent.** This lets you make changes to your content directly in Slack. See [Connect your Slack workspace](/agent/slack#connect-your-slack-workspace). - **Set up automations.** See [how to enable an automation](/automations/manage#enable-an-automation). diff --git a/mint-instructions/publish/assistant.mdx b/mint-instructions/publish/assistant.mdx index 2b80877e6..c65690697 100644 --- a/mint-instructions/publish/assistant.mdx +++ b/mint-instructions/publish/assistant.mdx @@ -81,7 +81,7 @@ description: Step-by-step guide for upgrading from SDK v2 to v3, including break } ``` -Widget. The widget is no longer configurable in the dashboard (an enabled widget's Widget settings entry only links to the docs). To enable the widget for a site, get a widget ID, or change authorized sites or availability, the user emails support@mintlify.com. Existing widgets keep working on their authorized sites. Install code comes from the playground on https://www.mintlify.com/docs/assistant/widget (do not invent the loader URL). Then initialize; `id` is the only required option: +Widget. Not configurable in the dashboard; no new widgets. For a new site or app, the user builds one with the assistant API: Next.js tutorial https://www.mintlify.com/docs/guides/assistant-embed, or, for other frameworks, a coding agent given https://www.mintlify.com/docs/api/assistant/create-assistant-message-v2. Existing widgets keep working on their authorized sites; for changes, the user emails support@mintlify.com. Install code comes from the playground on https://www.mintlify.com/docs/assistant/widget (do not invent the loader URL). Then initialize; `id` is the only required option: ```js await window.MintlifyAssistant.init({ id: "YOUR_WIDGET_ID", diff --git a/mint-instructions/publish/domain.mdx b/mint-instructions/publish/domain.mdx index 62a1a2d0a..7df3f02f5 100644 --- a/mint-instructions/publish/domain.mdx +++ b/mint-instructions/publish/domain.mdx @@ -45,7 +45,7 @@ Use this to host docs on the user's domain or a subpath of their site, or to fix - Only add the Mintlify CNAME with `--basePath` if the domain hosts nothing else. - Do not rewrite only `/docs/llms.txt` to root; forward the full base path route. - CSP: the default CSP allows any HTTPS origin; it blocks plain HTTP resources, `blob:`/`data:` scripts, ``/``, cross-origin workers. A proxy that overwrites CSP must allow the required domains (`*.mintlify.site`, `*.mintlify.com`, `mintcdn.com`, `*.mintcdn.com`, hCaptcha, two CloudFront hosts and more): copy the policy from the CSP page. -- Iframes: default `frame-ancestors 'self' https://dashboard.mintlify.com https://app.mintlify.com` blocks other sites. It is not configurable in `docs.json`. Email support@mintlify.com with subdomain, docs domain, every origin (wildcard subdomains allowed) and use case. Own proxy overwriting CSP: set `frame-ancestors` there. Alternative: assistant widget (Pro or Enterprise). +- Iframes: default `frame-ancestors 'self' https://dashboard.mintlify.com https://app.mintlify.com` blocks other sites. It is not configurable in `docs.json`. Email support@mintlify.com with subdomain, docs domain, every origin (wildcard subdomains allowed) and use case. Own proxy overwriting CSP: set `frame-ancestors` there. Alternative: build an in-app assistant with the assistant API (Pro or Enterprise; https://www.mintlify.com/docs/guides/assistant-embed). - Default address stays indexed: the default Mintlify address remains reachable and crawlable after adding a domain. Support can make it return 404, only if the CNAME points to `cname.mintlify.builders` (not with a reverse proxy or a CNAME to the default address). While disabled, new domains cannot be added from the dashboard. Also set the canonical and submit `https:///sitemap.xml` in Search Console. - `Domain is already in use by another deployment in your organization` or `Domain is already claimed by another organization`: one project holds a domain at a time. Remove it (trash icon) on the holding project's Custom domain setup page, then re-add. No access to that org: email support with proof of DNS control. diff --git a/poc-onboarding.mdx b/poc-onboarding.mdx index e5de74bf7..fbeff113a 100644 --- a/poc-onboarding.mdx +++ b/poc-onboarding.mdx @@ -266,8 +266,8 @@ Review unanswered and downvoted questions in [Assistant analytics](/analytics/as Choose the workflow most relevant to your evaluation: - - Add the [assistant widget](/assistant/widget) to your product, marketing site, or support portal. + + Use the assistant API to [build your own assistant](/guides/assistant-embed) for your product, marketing site, or support portal.