Deploy to your website
Add the chat with Claude, Lovable, Bolt, and v0
Add the Assistrio AI chat widget with Claude Code, Lovable, Bolt, v0, Replit, or Cursor: pick your tool, copy one ready prompt, and paste it in.
Built your site with an AI tool? You don't need to know where the code goes. Install with AI writes a prompt for your tool that says exactly what to add and where, and how to check it works. Paste it into the tool's chat and it does the rest.
Install with AI
- 1
Open Deploy › Chat Widget
In Assistrio, click Deploy in the top bar and pick Chat Widget (or Iframe, or Center Stage).
- 2
Add your published address
Under Allowed websites, add the address your app is published on — for example
yourapp.lovable.app,yourapp.vercel.app, or your own domain. The prompt stays off until you add one. - 3
Pick your tool
Open Install with AI and pick the AI tool you use. The prompt changes to fit how that tool builds sites.
- 4
Copy and paste the prompt
Click Copy prompt and paste it into your tool's chat. Or click Email to your developer to send it.
- 5
Publish your app
Most tools need you to publish (or redeploy) before the change is live. Then open your published address: the chat shows at the bottom right.
AI tool you use
What the prompt tells each tool
| Tool | Pick | Where the code goes |
|---|---|---|
| Lovable | Lovable | A React app: in index.html, not inside a React component, so it loads once for the whole site. |
| Bolt | Bolt | Same as Lovable: in index.html, once. |
| v0 | v0 | A Next.js app: once in the root layout (app/layout.tsx, or pages/_document.tsx), using next/script. |
| Cursor | Cursor | Whatever your project is: the file every page shares (index.html, app/layout.tsx, a base template, or the footer). It tells you which file it changed. |
| Claude Code | Claude Code | Same as Cursor — it finds your shared layout and adds the code once. |
| Replit | Other AI tool | Same as Cursor. |
| Windsurf, GitHub Copilot, Base44, Firebase Studio, Same.new, and others | Other AI tool | Same as Cursor — the tool finds your shared layout and adds the code once. |
| ChatGPT, Claude, or Gemini (chat) | Other AI tool | Same prompt as Cursor. Chat assistants can't edit your files, so they'll tell you where to paste it. |
Every prompt also says to add the code only once, keep the code exactly as it is, and that it only works on your allowed websites. Your app has logins? Under Identity verification in Deploy › Chat Widget, Copy AI prompt gives your tool a second prompt: server code that signs each signed-in user with the secret key from an environment variable named ASSISTRIO_SECRET_KEY. Your key is never in a prompt — add it to your host's environment settings yourself.
Get the prompt here
Don't have Assistrio open? Pick your tool, copy the prompt, paste it into the tool's chat, and replace the last line with your install code (Deploy › Chat Widget › Copy Snippet). You don't need to know how your site is built: the prompt fits the tool — Lovable and Bolt get index.html, v0 gets the Next.js layout, and Claude Code, Cursor, and the rest find the right file themselves.
AI tool you use
Add the "Assistrio" AI Chat Widget to my website. What to do: - This is a React app: add the code to index.html, not inside a React component, so it loads once for the whole site. - Put the <link> tag in <head> and the <script> tags just before </body>. - Add it only once. Don't add it twice or load it again on each page change. - Paste the code exactly as it is. Don't change the agentId or the URLs. - When you're done, remind me to click Publish, then Publish changes, so it goes live. How to check it works: - Open the website: a Chat Widget shows at the bottom right. - Send it a message like "Hi": the agent answers. - If it doesn't show, check the code is on the page and look for an [Assistrio Chat] message in the browser console. The code: [Paste your install code from Assistrio › Deploy › Chat Widget › Copy Snippet here]
Replace the last line with your install code from Deploy › Chat Widget › Copy Snippet. In Assistrio, Install with AI fills it in for you.
Signed-in users
Your app has logins? Use Copy AI prompt under Identity verification in Deploy › Chat Widget, or add this to What to do: “On the server, for each signed-in user, set userId to their id and userHash to HMAC-SHA256(userId) in hex, made with the secret key from an environment variable named ASSISTRIO_SECRET_KEY. Never put the key in browser code.” Then add ASSISTRIO_SECRET_KEY in your host's environment settings yourself.
Check it works
Hi! 👋 How can I help you today?
- Open your published address in a private window and send “Hi”.
- The tool's preview runs on a different address (like
*.lovableproject.comor awebcontainerURL), so the chat may not show there. Check the published site — or, while you test, add the preview address to Allowed websites too. - Chat shows twice? Ask the tool: “Make sure the Assistrio code is only added once, in index.html (or the root layout).”
- Nothing at all? Ask the tool: “Check the browser console for an [Assistrio Chat] message and fix it.” Still stuck? Use the framework guide below.
Prefer to do it yourself?
Was this page helpful?
Need help? Contact support — we reply within one to two business days.
