Products

Explore live avatars
How it Works?PricingContact Us

Developers3 min read

Add an AI avatar to your website with one snippet

From sign-up to a live agent on your page: the snippet, the security headers, the mobile SDK and the REST API.

A laptop screen showing source code
Photo by Mohammad Rahmani on Unsplash
On this page
  1. Step 1: create an agent
  2. Step 2: paste the snippet
  3. Step 3: check your security headers
  4. Step 4: turn on Site Navigation
  5. Step 5: measure it
  6. Mobile apps and back ends
  7. Go-live checklist
  8. Frequently asked questions

Key takeaways

  • The website widget is one script tag before the closing body tag, with your agent's embed key and ID.
  • If your site sets a Content Security Policy, allow the Avarole hosts for scripts, frames, media and connections.
  • The same agent runs in iOS and Android apps through the React Native SDK and in your own product through the REST API.

Adding an Avarole agent to a site takes a few minutes and one line of HTML. This guide covers the widget first, then what to check in production, then the options for apps and back ends.

Step 1: create an agent

Sign up at app.avarole.com, create or pick an avatar and give it your knowledge. The free plan is enough to try the full flow. Copy the agent ID and the agent's embed key from your agent in the app.

Step 2: paste the snippet

Add this before the closing </body> tag on every page where the agent should appear.

HTML
<script
  src="https://app.avarole.com/widget.js"
  data-api-key="YOUR_AGENT_EMBED_KEY"
  data-agent-id="YOUR_AGENT_ID"></script>

Use the agent's embed key in client code. Keep any other API key on your server.

Step 3: check your security headers

If your site sends a Content Security Policy, the widget needs to load its script, open its frame and connect for audio and video. Allow the Avarole hosts in the matching directives.

  • script-src and frame-src: https://app.avarole.com
  • connect-src: https://app.avarole.com, https://ai.avarole.com, https://livekit.avarole.com and, for sockets, wss://app.avarole.com and wss://livekit.avarole.com
  • media-src: blob: and https:

Voice conversations need the visitor's microphone, so the browser asks for permission the first time. If you send a Permissions-Policy header, make sure it does not block the microphone on your own pages.

Step 4: turn on Site Navigation

Switch Site Navigation on for the agent from the Build page. The embed code does not change. You then choose where the agent may go: block or allow paths, add data-agent-skip to hide an element, data-agent-risky to force a confirmation and data-agent-label to give a link a friendlier name. To keep it off on one page, add data-guided-nav="false" to the script tag.

Step 5: measure it

Name the steps that matter with an HTML attribute or one line of code, and Avarole Insights shows the funnel, the pages visitors leave from and where they struggle. It records page paths only, never what visitors type.

Mobile apps and back ends

The React Native SDK adds the agent to iOS and Android apps. Install the package, run setupAvarole() once before anything renders, and mount the component.

React Native
import { setupAvarole } from '@avarole/react-native';
setupAvarole();

import { AvaroleAgent } from '@avarole/react-native';

export default function App() {
  return (
    <>
      <YourApp />
      <AvaroleAgent agentId="YOUR_AGENT_ID" apiKey="YOUR_AGENT_EMBED_KEY" name="Assistant" />
    </>
  );
}

For your own back end, the REST API covers agents, Gmail and CRM connections, email, Site Navigation and Page Insights, authenticated with an X-API-Key header. Full details, including the package download, are in the developer docs, the SDK page and the list of integrations: Gmail, IMAP and SMTP mailboxes, Zoho CRM and Desk, Calendly and a generic CRM.

Go-live checklist

  1. The snippet is on every page where the agent should appear, and nowhere it should not.
  2. Your CSP allows the Avarole hosts and the microphone prompt works.
  3. You tested on a phone, with the sound on and with it off.
  4. The knowledge base answers your top 50 questions. See how to prepare it.
  5. Funnel steps are named in Insights, so day one already gives you a baseline.

Frequently asked questions

Do I need a developer to add the agent?

Not for a website. Paste one snippet before the closing body tag. A developer helps for the React Native SDK, custom actions and the API.

Will the widget slow my page down?

The script is added at the end of the page so it does not block your content. Measure your own pages as you would after adding any third-party script.

Does it work on phones?

Yes. On websites the agent appears as a small floating window on phones, and the React Native SDK covers native apps.

Build with the Avarole SDK and API.

The widget, the React Native SDK and the REST API share one agent. Read the docs or download the package.

Keep reading

Related articles

  • A humanoid robot with a digital face

    Guides3 min read

    Agentic AI avatars, explained

    The difference between an avatar that answers and one that acts, the four capabilities to look for and the guardrails that keep it safe.

    22 October 2026Read