- CDN (Recommended)
- npm
Include a script tag and the custom element. No build step required.The script auto-registers the
<anam-agent> custom element. Place it anywhere in your HTML. The async attribute ensures it doesn’t block page rendering.Framework-specific setup
- Plain HTML
- Next.js
Add the snippet before the closing
</body> tag:Domain allowlisting
To allowlist your domain:- Open your persona in the Anam Lab editor.
- Select Embed and choose Widget.
- Under Allowed Domains, enter your website origin (e.g.,
https://example.com) and select the + button. - Select Publish before testing the embed.
https:// if you omit the scheme and removes paths, query strings, and fragments. For example, https://example.com/store is saved as https://example.com.
Origins are matched exactly, ignoring case. Add https://example.com and https://www.example.com separately; allowing one does not allow the other or any other subdomain. HTTP and HTTPS origins differ, as do different non-default ports. Wildcard patterns do not match subdomains.
Add each production, staging, or development origin you need. Alternatively, enable Allow everywhere to allow embeds on any domain. Only use this if unrestricted embedding is intentional.
These are persona embed settings, not the separate origin restrictions on share-link embeds. Changing Allowed Domains here does not update an existing share link.

