Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.
The Web Widget puts one of your agents on your website. A visitor clicks, talks in
their browser, and the agent answers. No phone number, no dialing.Each agent has its own widget, so different pages can run different agents.
Use this to get something working today.The Widget agent field shows the agent the widget will connect to. It is fixed to
the agent you are editing.JWT lifetime decides how long the token stays valid. Options are 30 minutes,
1 hour, 3 hours, 6 hours and Never expire. The default is 1 hour.Click Generate JWT and copy the token.
Never expire is for testing only. A token pasted into a public web page is
readable by anyone who views the source, and one that never expires never stops
being useful to them.
Use this for a real site.Instead of pasting a token that eventually expires and breaks your page, you generate
an API key, keep it on your server, and have your server mint a short-lived token
for each visitor. The page always gets a fresh token, and the key itself never reaches
the browser.Click Generate API key. The key is shown once, so store it somewhere safe
immediately.
The API key belongs on your backend and nowhere else. Anyone who can read it can
generate tokens for your agent. If you put it in client-side code, you have
published it.
Existing keys are listed with the date they were created and can be removed. Removing
a key immediately stops anything using it from generating new tokens.
Use Test Agent on the agent and choose Start Browser Call. That is the same
browser conversation your visitors will get, so if the agent behaves there it will
behave in the widget.If it works in the dashboard but not on your site, the problem is the token or the
snippet, not the agent.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Fluents","colors":{"primary":"#4F26B0","light":"#4F26B0","dark":"#4F26B0"},"logo":{"light":"https://mintcdn.com/fluents/W3_lTopfh-MPxgIG/logo/light.png?fit=max\u0026auto=format\u0026n=W3_lTopfh-MPxgIG\u0026q=85\u0026s=df6ec38fc1edc83ff878dba4d265142e","dark":"https://mintcdn.com/fluents/W3_lTopfh-MPxgIG/logo/dark.png?fit=max\u0026auto=format\u0026n=W3_lTopfh-MPxgIG\u0026q=85\u0026s=f140612cf4bd33328d32cbd17bd34253"},"favicon":"https://mintcdn.com/fluents/W3_lTopfh-MPxgIG/favicon.png?fit=max\u0026auto=format\u0026n=W3_lTopfh-MPxgIG\u0026q=85\u0026s=05805ec9db48c56a8c20e0d6f5a1ee09","api":{"playground":{"display":"simple"}},"appearance":{"default":"light"},"footer":{"socials":{"website":"https://www.fluents.ai/"}},"seo":{},"styling":{"latex":false},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"fluents","hasAudioNarration":false,"actualSubdomain":"fluents","customDomains":["docs.fluents.ai"],"gitSource":{"type":"github","owner":"fluentsai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ad147dc5dc4effd88fe8578","collectionId":"813063b7-139a-4bf8-a528-51fc40603523","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ad147dc5dc4effd88fe8578"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6ad147dc5dc4effd88fe8578","clientVersion":"0.0.3965","searchFilterCounts":[{"language":"default","tag":"API Documentation","count":70},{"language":"default","tag":"Product Documentation","count":48},{"language":"default","tag":"Feature Guides","count":32},{"language":"default","tag":"Integrations","count":16},{"language":"default","tag":"Integration Partners","count":16},{"language":"default","tag":"Agents","count":12},{"language":"default","tag":"Calls","count":11},{"language":"default","tag":"Numbers","count":10},{"language":"default","tag":"Agent skills","count":10},{"language":"default","tag":"Getting Started","count":9}]},"assistantConfig":{},"hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-v7-file-tree","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"pause-universal-search-reconcile","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"per-site-search-delta","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-private-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-nav-generations","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-agent-model-picker","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"isAtlas":false,"googleFontsInlined":false},"customCss":[{"filePath":"styles.css","content":"#sidebar-group li>ul,.sidebar-group li>ul{margin-left:.8rem;border-left:1px solid rgb(17 24 39/.1)}.dark #sidebar-group li>ul,.dark .sidebar-group li>ul{border-left-color:rgb(255 255 255/.12)}#sidebar-group li>ul>li,.sidebar-group li>ul>li{position:relative}#sidebar-group li>ul>li::before,.sidebar-group li>ul>li::before{content:'';position:absolute;left:1.15rem;top:.95rem;width:5px;height:5px;border-radius:50%;background:rgb(17 24 39/.25)}.dark #sidebar-group li>ul>li::before,.dark .sidebar-group li>ul>li::before{background:rgb(255 255 255/.3)}#sidebar-group li>ul>li:has(>a[aria-current=page])::before,#sidebar-group li>ul>li:has(>a[class~='bg-primary/10'])::before,.sidebar-group li>ul>li:has(>a[aria-current=page])::before,.sidebar-group li>ul>li:has(>a[class~='bg-primary/10'])::before{background:#4f26b0}#sidebar-group li>ul>li:has(>a[aria-current=page])::after,#sidebar-group li>ul>li:has(>a[class~='bg-primary/10'])::after,.sidebar-group li>ul>li:has(>a[aria-current=page])::after,.sidebar-group li>ul>li:has(>a[class~='bg-primary/10'])::after{content:'';position:absolute;left:-1px;top:.25rem;bottom:.25rem;width:2px;border-radius:1px;background:#4f26b0}"}],"page":{"pagePath":"product/features/widget","slug":"/product/features/widget","pageMetadata":{"title":"Web Widget","sidebarTitle":"Web Widget","description":"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.","href":"/product/features/widget"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,hr:`hr`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,Frame,Heading,OptimizedImage,Table,Warning}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Frame)_missingMdxReference(`Frame`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!OptimizedImage)_missingMdxReference(`OptimizedImage`,true);if(!Table)_missingMdxReference(`Table`,true);if(!Warning)_missingMdxReference(`Warning`,true);return _jsxs(_Fragment,{children:[_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Web Widget`}),` puts one of your agents on your website. A visitor clicks, talks in\ntheir browser, and the agent answers. No phone number, no dialing.`]}),`\n`,_jsx(_components.p,{children:`Each agent has its own widget, so different pages can run different agents.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`where-it-lives`,children:`Where it lives`}),`\n`,_jsxs(_components.p,{children:[`Open the agent, then `,_jsx(_components.strong,{children:`More`}),` at the end of the tab row, then `,_jsx(_components.strong,{children:`Web Widget`}),`.`]}),`\n`,_jsx(Frame,{children:_jsx(OptimizedImage,{src:`https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=7b483aac5688081f21d1503e759a4420`,alt:`The Web Widget tab showing the Generate JWT form and the Widget Installation Instructions snippet`,\"data-og-width\":`1496`,width:`1496`,\"data-og-height\":`697`,height:`697`,\"data-path\":`images/product/widget/generate-jwt.jpg`,\"data-optimize\":`true`,\"data-opv\":`3`,srcset:`https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?w=280\u0026fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=1d99f071fe1098f1c41f2098c4b2d7e0 280w, https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?w=560\u0026fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=fd13ed7862eee2dc4cff26188f26eb93 560w, https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?w=840\u0026fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=92f9a79a0709d386fb2de94a09b0ad08 840w, https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?w=1100\u0026fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=21bdd095b3e69308d5abc0a36258f8ad 1100w, https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?w=1650\u0026fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=df2220a76db1a6513c6b5607edfd097f 1650w, https://mintcdn.com/fluents/Ntis-q5QWqwCqRQw/images/product/widget/generate-jwt.jpg?w=2500\u0026fit=max\u0026auto=format\u0026n=Ntis-q5QWqwCqRQw\u0026q=85\u0026s=b3fe1c25b3fdcdfb4933dd137cdb7dfa 2500w`})}),`\n`,_jsx(_components.p,{children:`The tab has two options, and which one you want depends on whether the site is a test\nor a real product.`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`Generate JWT`})}),_jsx(_components.th,{children:_jsx(_components.strong,{children:`API JWT Generation`})})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Good for`}),_jsx(_components.td,{children:`Testing, landing pages, simple sites`}),_jsx(_components.td,{children:`Production`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`What you copy`}),_jsx(_components.td,{children:`One token, by hand`}),_jsx(_components.td,{children:`An API key your backend uses`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:`Tokens are made`}),_jsx(_components.td,{children:`Once, by you`}),_jsx(_components.td,{children:`On demand, by your server`})]})]})]}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`generate-jwt`,children:`Generate JWT`}),`\n`,_jsx(_components.p,{children:`Use this to get something working today.`}),`\n`,_jsxs(_components.p,{children:[`The `,_jsx(_components.strong,{children:`Widget agent`}),` field shows the agent the widget will connect to. It is fixed to\nthe agent you are editing.`]}),`\n`,_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`JWT lifetime`}),` decides how long the token stays valid. Options are 30 minutes,\n1 hour, 3 hours, 6 hours and Never expire. The default is 1 hour.`]}),`\n`,_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Generate JWT`}),` and copy the token.`]}),`\n`,_jsx(Warning,{children:_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Never expire`}),` is for testing only. A token pasted into a public web page is\nreadable by anyone who views the source, and one that never expires never stops\nbeing useful to them.`]})}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`install-it-on-your-site`,children:`Install it on your site`}),`\n`,_jsxs(_components.p,{children:[`Paste this immediately before the closing `,_jsx(_components.code,{children:`\u003c/body>`}),` tag on any page where you want the\nwidget, and replace the placeholder with your token.`]}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`9`,language:`html`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`html`,children:_jsxs(_components.code,{language:`html`,numberOfLines:`9`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` id`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"webcall-container\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`div`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#9CDCFE`},children:` src`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://storage.googleapis.com/fluents-assets/fluents-web-widget/fluents-web-widget.iife.js\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Initialize the widget`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`FluentsWebWidget`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`init`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` targetId:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'webcall-container'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` jwtToken:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'JWT_FROM_CLICKING_GENERATE_JWT'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` });`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`\u003c/`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#569CD6`},children:`script`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#808080`},children:`>`})]}),`\n`]})})}),`\n`,_jsx(_components.p,{children:`The dashboard shows this same snippet with a copy button, so you do not have to\nretype it.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`api-jwt-generation`,children:`API JWT Generation`}),`\n`,_jsx(_components.p,{children:`Use this for a real site.`}),`\n`,_jsxs(_components.p,{children:[`Instead of pasting a token that eventually expires and breaks your page, you generate\nan `,_jsx(_components.strong,{children:`API key`}),`, keep it on your server, and have your server mint a short-lived token\nfor each visitor. The page always gets a fresh token, and the key itself never reaches\nthe browser.`]}),`\n`,_jsxs(_components.p,{children:[`Click `,_jsx(_components.strong,{children:`Generate API key`}),`. The key is shown once, so store it somewhere safe\nimmediately.`]}),`\n`,_jsx(Warning,{children:_jsx(_components.p,{children:`The API key belongs on your backend and nowhere else. Anyone who can read it can\ngenerate tokens for your agent. If you put it in client-side code, you have\npublished it.`})}),`\n`,_jsx(_components.p,{children:`Existing keys are listed with the date they were created and can be removed. Removing\na key immediately stops anything using it from generating new tokens.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`test-before-you-install`,children:`Test before you install`}),`\n`,_jsxs(_components.p,{children:[`Use `,_jsx(_components.strong,{children:`Test Agent`}),` on the agent and choose `,_jsx(_components.strong,{children:`Start Browser Call`}),`. That is the same\nbrowser conversation your visitors will get, so if the agent behaves there it will\nbehave in the widget.`]}),`\n`,_jsx(_components.p,{children:`If it works in the dashboard but not on your site, the problem is the token or the\nsnippet, not the agent.`}),`\n`,_jsx(_components.hr,{}),`\n`,_jsx(Heading,{level:`2`,id:`where-to-go-next`,children:`Where to go next`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[`Configure what the agent says: `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/product/features/agent`,children:`Agents`})})]}),`\n`,_jsxs(_components.li,{children:[`Let the visitor move to a phone call: `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/product/features/skills/switch-communication`,children:`Switch Communication`})})]}),`\n`,_jsxs(_components.li,{children:[`React to widget conversations in your own systems: `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/product/features/webhook`,children:`Webhooks`})})]}),`\n`,_jsxs(_components.li,{children:[`Read the conversations afterwards: `,_jsx(_components.strong,{children:_jsx(_components.a,{href:`/product/features/call`,children:`Calls`})})]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Web Widget","sidebarTitle":"Web Widget","description":"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.","href":"/product/features/widget"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Where it lives","slug":"where-it-lives","depth":2,"children":[]},{"title":"Generate JWT","slug":"generate-jwt","depth":2,"children":[]},{"title":"Install it on your site","slug":"install-it-on-your-site","depth":2,"children":[]},{"title":"API JWT Generation","slug":"api-jwt-generation","depth":2,"children":[]},{"title":"Test before you install","slug":"test-before-you-install","depth":2,"children":[]},{"title":"Where to go next","slug":"where-to-go-next","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":[],"subdomain":"fluents","siteName":"Fluents","title":"Web Widget - Fluents","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-08-19T01:10:35.307Z","originalFileLocation":"product/features/widget.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"light\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Fluents\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Web Widget - Fluents\">\u003cmeta data-mint-head property=\"og:description\" content=\"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Fluents\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.fluents.ai/product/features/widget\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://fluents.mintlify.app/_mintlify/api/og/v2?division=Automation\u0026amp;title=Web+Widget\u0026amp;description=Put+an+agent+on+your+website+so+visitors+can+talk+to+it+in+the+browser%2C+with+no+phone+number+involved.\u0026amp;theme=46dbc8525a36dcde546fe4b2\u0026amp;signature=0a31ce2342f38dba688086cb5a571027de1d485f4f6d076cf2799945ceba9d71\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Web Widget - Fluents\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://fluents.mintlify.app/_mintlify/api/og/v2?division=Automation\u0026amp;title=Web+Widget\u0026amp;description=Put+an+agent+on+your+website+so+visitors+can+talk+to+it+in+the+browser%2C+with+no+phone+number+involved.\u0026amp;theme=46dbc8525a36dcde546fe4b2\u0026amp;signature=0a31ce2342f38dba688086cb5a571027de1d485f4f6d076cf2799945ceba9d71\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/fluents/9O1LYrnNFDJkAmx2/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Fluents\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4F26B0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.fluents.ai/product/features/widget\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/product/features/widget.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.fluents.ai/#organization\",\"name\":\"Fluents\",\"url\":\"https://docs.fluents.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/fluents/W3_lTopfh-MPxgIG/logo/light.png?fit=max\u0026auto=format\u0026n=W3_lTopfh-MPxgIG\u0026q=85\u0026s=df6ec38fc1edc83ff878dba4d265142e\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.fluents.ai#website\",\"name\":\"Fluents\",\"url\":\"https://docs.fluents.ai\",\"publisher\":{\"@id\":\"https://docs.fluents.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.fluents.ai/product/features/widget#webpage\",\"url\":\"https://docs.fluents.ai/product/features/widget\",\"name\":\"Web Widget\",\"description\":\"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.\",\"dateModified\":\"2026-08-19T01:10:35.307Z\",\"isPartOf\":{\"@id\":\"https://docs.fluents.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.fluents.ai/product/features/widget#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.fluents.ai/product/features/widget#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Feature Guides\",\"item\":\"https://docs.fluents.ai/product/features/dashboard\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Automation\",\"item\":\"https://docs.fluents.ai/product/features/actions\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Web Widget\",\"item\":\"https://docs.fluents.ai/product/features/widget\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.fluents.ai/product/features/widget#article\",\"headline\":\"Web Widget\",\"name\":\"Web Widget\",\"description\":\"Put an agent on your website so visitors can talk to it in the browser, with no phone number involved.\",\"url\":\"https://docs.fluents.ai/product/features/widget\",\"mainEntityOfPage\":{\"@id\":\"https://docs.fluents.ai/product/features/widget#webpage\"},\"dateModified\":\"2026-08-19T01:10:35.307Z\",\"publisher\":{\"@id\":\"https://docs.fluents.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.fluents.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Fluents\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Fluents","nav":{"global":null,"anchors":[{"anchor":"Product Documentation","icon":"book","groups":[{"group":"Getting Started","icon":"rocket","pages":[{"title":"Introduction to Fluents","sidebarTitle":"Introduction","icon":"hand-wave","href":"/product/welcome"},{"group":"Quickstart","icon":"play","expanded":true,"pages":[{"title":"Quickstart","sidebarTitle":"Overview","href":"/product/quickstart/index"},{"title":"Create your first inbound agent","sidebarTitle":"Your first inbound agent","href":"/product/quickstart/first-inbound-agent"},{"title":"Create your first outbound agent","sidebarTitle":"Your first outbound agent","href":"/product/quickstart/first-outbound-agent"},{"title":"Set up your first campaign","sidebarTitle":"Your first campaign","href":"/product/quickstart/first-campaign"},{"title":"Improving an agent","sidebarTitle":"Improving an agent","href":"/product/quickstart/improving-an-agent"}]},{"group":"Use cases","icon":"briefcase","pages":[{"title":"Use cases","sidebarTitle":"Overview","href":"/product/use-cases/index"},{"title":"Book appointments for a clinic","sidebarTitle":"Clinic appointments","href":"/product/use-cases/clinic-appointments"}]},{"title":"Documentation assistant","sidebarTitle":"Documentation assistant","icon":"comments","href":"/product/features/assistant"}]},{"group":"Core Concepts","icon":"lightbulb","pages":[{"group":"Agents","icon":"robot","pages":[{"title":"What an agent is","sidebarTitle":"What an agent is","href":"/product/concepts/agent/intro"},{"title":"What the agent says","sidebarTitle":"What the agent says","href":"/product/concepts/agent/basic"},{"title":"How a call runs","sidebarTitle":"How a call runs","href":"/product/concepts/agent/advanced"},{"title":"What happens after a call","sidebarTitle":"After a call","href":"/product/concepts/agent/post-call"}]},{"title":"How campaigns work","sidebarTitle":"Campaigns","href":"/product/concepts/campaigns"},{"title":"How numbers work","sidebarTitle":"Numbers","href":"/product/concepts/numbers"},{"title":"How voices work","sidebarTitle":"Voices","href":"/product/concepts/voices"}]},{"group":"Feature Guides","icon":"book","pages":[{"group":"Activity","icon":"chart-line","expanded":true,"pages":[{"title":"Dashboard","sidebarTitle":"Dashboard","href":"/product/features/dashboard"},{"title":"Calls","sidebarTitle":"Calls","href":"/product/features/call"},{"title":"Reports","sidebarTitle":"Reports","tag":"BETA","href":"/product/features/reports"}]},{"group":"Agents","icon":"robot","pages":[{"title":"Agents","sidebarTitle":"Agents","href":"/product/features/agent"},{"title":"Data","sidebarTitle":"Data","href":"/product/features/data"},{"title":"Post-call","sidebarTitle":"Post-call","href":"/product/features/post-call"},{"title":"Testing an agent","sidebarTitle":"Testing an agent","href":"/product/features/agent-testing"}]},{"group":"Agent skills","icon":"puzzle-piece","pages":[{"title":"Appointment Scheduling","sidebarTitle":"Appointment Scheduling","href":"/product/features/skills/appointment-scheduling"},{"title":"Call Routing","sidebarTitle":"Call Routing","href":"/product/features/skills/call-routing"},{"title":"Call Back Later","sidebarTitle":"Call Back Later","href":"/product/features/skills/call-back-later"},{"title":"Knowledge Search","sidebarTitle":"Knowledge Search","href":"/product/features/skills/knowledge-search"},{"title":"Switch Communication","sidebarTitle":"Switch Communication","href":"/product/features/skills/switch-communication"},{"title":"In Call Email","sidebarTitle":"In Call Email","href":"/product/features/skills/in-call-email"},{"title":"In Call SMS","sidebarTitle":"In Call SMS","href":"/product/features/skills/in-call-sms"},{"title":"Call Screen Handling","sidebarTitle":"Call Screen Handling","href":"/product/features/skills/call-screen-handling"},{"title":"IVR Navigation","sidebarTitle":"IVR Navigation","href":"/product/features/skills/ivr-navigation"},{"title":"End Call","sidebarTitle":"End Call","href":"/product/features/skills/end-conversation"}]},{"group":"Campaigns","icon":"bullhorn","pages":[{"title":"Campaigns","sidebarTitle":"Campaigns","href":"/product/features/campaigns"},{"title":"Campaign Schedules","sidebarTitle":"Campaign schedules","href":"/product/features/campaign-schedules"}]},{"group":"Connections","icon":"plug","pages":[{"title":"Numbers","sidebarTitle":"Numbers","href":"/product/features/numbers"},{"title":"DNC List","sidebarTitle":"DNC List","href":"/product/features/dnc-list"},{"title":"Providers and connections","sidebarTitle":"Providers","href":"/product/features/providers"}]},{"group":"Libraries","icon":"layer-group","pages":[{"title":"Prompts","sidebarTitle":"Prompts","href":"/product/features/prompts"},{"title":"Voices","sidebarTitle":"Voices","href":"/product/features/voice"},{"title":"Knowledge Bases","sidebarTitle":"Knowledge Bases","href":"/product/features/knowledge-base"}]},{"group":"Automation","icon":"bolt","pages":[{"title":"Actions","sidebarTitle":"Actions","href":"/product/features/actions"},{"title":"Webhooks","sidebarTitle":"Webhooks","description":"Have Fluents tell your own systems when something happens on a call, without the agent waiting for a reply.","href":"/product/features/webhook"},{"title":"Web Widget","sidebarTitle":"Web Widget","href":"/product/features/widget"}]},{"title":"Early Access","sidebarTitle":"Early Access","description":"Turn on features that are still being built, for one environment at a time.","icon":"flask","href":"/product/features/experimental-feature"},{"group":"Account","icon":"user-gear","pages":[{"title":"Sign up","sidebarTitle":"Sign up","href":"/product/features/account/sign-up"},{"title":"Settings","sidebarTitle":"Settings","href":"/product/features/account/settings"},{"title":"Get API key","sidebarTitle":"Get API key","href":"/product/features/account/get-api-key"}]}]}]},{"anchor":"Integrations","icon":"book","pages":[{"title":"Integrations","href":"/product/integrations/active-campaign"}]},{"anchor":"API Documentation","icon":"rectangle-terminal","pages":[{"title":"API Documentation","href":"/api-reference/account_connections/get-account-connection"}]},{"anchor":"Contact","icon":"envelope","href":"mailto:support@fluents.ai"}]},"title":"Web Widget - Fluents","buildId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","deploymentId":"dpl_849ArpqvBiCczQiT1Y1stNGpbqHT","dynamics":["07c022d89b","a74be98ba7"],"chunks":["Frame-Cz91mEGH.js","DynamicMarkdown-a8hUKrw6.js","zoom-image-lightbox-CaUwvYH3.js","lightbox-handle-r17bVUz3.js"]}