Guide

How to embed an AI agent on your website

From My Agents, open Embed on Website. Generate a domain-bound token, preview the floating widget, then paste the agent-widget.js snippet on a page you already host. AshnaAI does not build the website.

AshnaAI

How to embed an AI agent on your website

Open Embed on Website

In My Agents, open the agent menu and choose Embed on Website. Preview the floating button on desktop, tablet, or mobile before you copy anything.

Lock the domain, then copy the snippet

Enter the site hostname, for example app.example.com. Generate the token. Copy the script that points at /embed/agent-widget.js and includes data-agent-id and data-token. Theme, icon color, icon shape, and close-icon style are optional attributes on that same script.

Paste on a page you already host

Put the snippet on a page that already explains the offer. If tool calls fail after publish, fix the agent permissions in AshnaAI. Do not treat WhatsApp Business as a second embed channel; that connector sends templates and session messages from an agent, it does not host an inbound WhatsApp inbox.

Try it now

Open AshnaAI and run this in a new chat. New accounts start at app.ashna.ai/signup.

Frequently asked questions

How do I add AshnaAI to my website?
Create and test the agent, open Embed on Website from the agent card, add your domain, generate the token, and paste the script on a page you control.
Can AshnaAI generate the website too?
No. Website and web-app creation are out of scope.
Should I embed before tools are connected?
No. Visitors will hit permission failures. Finish tools first.
Why do I have to enter a domain?
The embed token is bound to the origins you list. The widget will not issue a token until at least one domain is present.
Where do I create the agent?
Follow the create-and-use-agents guide, then return here to publish.

Tags

#embed#how-to#agents

Found this article helpful? Share it with your network.