Skip to main content
One script tag loads Argide on your site. It shows as a floating chat widget or as a copilot sidebar, depending on the mode you pick in the dashboard. You control it from your own code with 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.
There is no exception for localhost, staging, or preview URLs. On a page outside your Website, the Argide bundle request returns 403 and nothing renders. To test somewhere else, use a separate product whose Website is that origin, such as http://localhost:3000. The port must 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.
The first line creates a queue, so your code can send commands before Argide finishes loading. See Send commands before the widget loads. Your Product ID is also listed on the product’s card in Settings → Products.

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.
Your policy must also allow scripts from 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 before window.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:
After Argide 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:
Every command can be queued except setNavigate. Call it only once window.argide is a function:
Here 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.