Skip to main content

Install the Widget in Mintlify

Mintlify can load custom JavaScript from your docs repository. Use that to add the Woes widget once, then let it appear across every page in your documentation site.
The widget uses a browser-safe public widget key such as trovw_..., trovw_agent_..., or woesw_.... Do not use a woesk_ REST API key, workspace secret, or widget identity secret in browser code.

Before You Start

You need:
  • Access to your Mintlify docs repository.
  • A Woes workspace or agent widget key from Settings → Keys.
  • The production widget loader: https://woes.dev/widget.js.
Use a workspace widget key when every docs visitor should route to the default agent. Use an agent widget key when your docs site should route visitors to a specific docs-focused agent.

AI Agent Install Prompt

If you want Codex, Cursor, Claude Code, or another coding agent to install the widget for you, copy this prompt and run it from your Mintlify docs repository. Create a JavaScript file in the root of your Mintlify docs content directory, next to docs.json or mint.json. For example, create woes-widget.js:
Replace YOUR_WIDGET_PUBLIC_KEY with the public widget key copied from your own Woes workspace or agent.
Public widget keys are designed to be embedded in browser pages. They identify the widget workspace or agent, but they are not REST API keys and do not prove visitor identity.

Deploy The Change

Commit and push the file to the Git repository connected to Mintlify.
Mintlify will rebuild the docs site from the pushed commit. After the deploy finishes, open the public docs site and confirm the Woes launcher appears.

Direct Snippet

If your Mintlify setup supports adding a raw script directly, use the same snippet Woes provides in Settings → Channels → Live chat:
The JavaScript-file approach is usually easier to maintain because it keeps the widget install in one reusable file.

Identify Signed-In Readers

Most public documentation sites can run anonymously. If your Mintlify docs are behind authentication and you can safely provide reader identity, call window.Woes("identify", ...) after your application receives identity from a backend endpoint. Unsigned identity can help operators recognize a reader, but it is not trusted identity proof.
For account-specific history or higher-trust routing, use signed identity. In Woes, open Settings → Security, select the agent widget key installed on Mintlify, then use Copy prompt for AI install if you want a coding assistant to wire the server-side HMAC or JWT endpoint. Verified identity requires a server endpoint outside the Mintlify static docs repo unless your Mintlify site is backed by an authenticated application. That endpoint should return Cache-Control: no-store and should never expose WOES_WIDGET_IDENTITY_SECRET. Browser code should retry window.Woes("identify", ...) after login/session load, when widget.js loads, on window focus, and when the page becomes visible again. Repeating the same verified identity is safe.
Generate HMAC proofs or JWTs only on your backend. Never place widget identity secrets, REST API keys, workspace secrets, or customer-private data in the Mintlify repository.

Test The Install

After Mintlify deploys:
  1. Open the docs site in a private browser window.
  2. Confirm the Woes launcher appears.
  3. Open the widget and send a test question.
  4. In Woes, open Inbox and confirm the conversation arrives.
  5. If you used an agent widget key, confirm the conversation is labeled with the expected agent.
  6. If you used signed identity, confirm Woes shows the reader email/name and identity_source of widget-token.

Troubleshooting

Last modified on July 2, 2026