window.argide commands.
Before you start
The widget only loads on your product’s Website and its subdomains. Set it in Settings → Products. Until a Website is set, the widget loads nowhere, and Deploy → Install shows a warning saying so.
On shared hosting domains —
vercel.app, netlify.app, pages.dev, github.io, myshopify.com, web.app, firebaseapp.com, and onrender.com — subdomains are other people’s sites. There, only the exact host and its www. form match.
Add the script
Open Deploy → Install and copy the snippet under Add the script. It already contains your Product ID. Paste it just before the closing</body> tag on every page where the agent should appear.
Script attributes
The agent’s name, welcome message, and look come from the dashboard, not from the script tag. See Identity and instructions and Mode and design.
Choose widget or copilot
Pick the mode under Choose how it appears on Deploy → Install. It saves as soon as you click. You can also change it, along with the copilot’s side, in Agent → Mode. The script tag stays the same in both modes, and the change applies on the next page load.
On screens 768px wide or narrower, copilot mode falls back to the widget layout.
To pin a mode in code, for example to run your own A/B test, add
data-mode="widget" or data-mode="copilot" to the script tag. A forced mode overrides the dashboard setting on that page.
Content Security Policy
If your Content Security Policy uses nonces, add your nonce to both<script> tags in the snippet. The loader passes its nonce on to the Argide bundle it injects.
https://dashboard.argide.ai and requests to https://api.argide.ai.
Control the widget with window.argide
Once Argide has loaded, window.argide is a function that takes a command name and an optional payload:
resetUser still works as an alias for resetAndPreserveSession, but it is deprecated and logs a console warning.Send commands before the widget loads
Argide loads asynchronously, so your code may run beforewindow.argide is a function. Until then, window.argide is the queue array the snippet created. Push [command, payload] pairs onto it, and Argide runs them in order once it loads:
window.argide is replaced by the function, and push no longer exists. If your code can run at either moment, use a small helper that handles both:
setNavigate. Call it only once window.argide is a function:
router is your app’s router. The helper stops checking after 10 seconds, so it doesn’t poll forever if Argide fails to load.
Troubleshooting
Argide logs to the browser console with an[Argide-B2B] prefix. Start there.

