Embedding & Integration
Add your AI agent to any website with a single line of code, no backend needed.
Overview
Once your agent is deployed, you can embed it on any website — your own site, a client's site, a landing page, a Webflow project, a Shopify store — anywhere that accepts HTML.
Go to My Agents, find your agent card, and click Show embed code.
Option 1 — JavaScript Snippet (recommended)
The JS snippet is the simplest way to add your agent. It injects a floating chat button in the bottom-right corner of your page.
<script src="https://artificialintelligence.com.ai/widget.js" data-agent="YOUR_WIDGET_ID"> </script>
Replace YOUR_WIDGET_ID with the ID shown in your agent card.
Where to paste it:
- In the
<body>tag of your HTML, just before</body> - In Webflow: Page Settings → Custom Code → Footer Code
- In Shopify: Themes → Edit Code →
theme.liquidbefore</body> - In WordPress: Use a plugin like "Insert Headers and Footers" to paste in the footer
Option 2 — iFrame Embed
Use the iFrame if you want to embed the chat widget in a specific section of your page — for example inside a "Contact Us" section.
<iframe src="https://artificialintelligence.com.ai/chat-widget/YOUR_WIDGET_ID" width="400" height="600" frameborder="0" allow="clipboard-write"> </iframe>
You can change the width and height to fit your layout. The minimum recommended size is 350×500.
Direct link
Every agent also has a direct URL you can share or link to:
https://artificialintelligence.com.ai/chat-widget/YOUR_WIDGET_ID
This is useful for:
- Linking from a "Chat with us" button
- Sharing in email signatures
- Adding to a WhatsApp link tree
Customising the widget appearance
The widget inherits the accent colour you chose when building your agent. You cannot change the accent colour without rebuilding the agent.
The widget always shows:
- Your agent name and business name in the header
- An "Online · Powered by AI" indicator
- "Powered by Ask Ai" branding in the footer (cannot be removed on free/Starter)
Testing your widget
After embedding, always test by:
- Opening your page in a new incognito window
- Clicking the chat bubble
- Sending a test message
- Checking the reply comes back correctly
If the widget does not appear, check that your widget ID is correct and that the agent status is Active in My Agents.
Widget requires no login
Visitors using your embedded widget do not need an Ask Ai account. The widget is fully public and works for anyone who visits your site.