Skip to main content
The XUNA AI Conversational AI widget is the fastest way to deploy a voice agent on the web. Paste the snippet into any HTML page and the widget handles the microphone, audio playback, and conversation UI automatically.

Add the widget

Copy your agent ID from the Agents dashboard, then paste the following snippet into your HTML:
<xuna-ai-convai agent-id="YOUR_AGENT_ID"></xuna-ai-convai>
<script src="https://unpkg.com/@xuna-ai/convai-widget-embed" async type="text/javascript"></script>
Replace YOUR_AGENT_ID with the ID shown on your agent’s overview page. The widget loads asynchronously and does not block page rendering.
Place the snippet anywhere in your <body> tag. The widget renders as a floating button by default and does not require a specific container element.

Where to find your agent ID

1

Open the dashboard

Go to the Agents section in your XUNA AI dashboard.
2

Select your agent

Click the agent you want to deploy.
3

Copy the agent ID

The agent ID appears on the Overview tab. It looks like agent_7101k5zvyjhmfg983brhmhkd98n6.

Example: static HTML page

Here is a minimal complete HTML page with the widget embedded:
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <title>My Voice Agent</title>
  </head>
  <body>
    <h1>Talk to our assistant</h1>

    <xuna-ai-convai agent-id="YOUR_AGENT_ID"></xuna-ai-convai>
    <script
      src="https://unpkg.com/@xuna-ai/convai-widget-embed"
      async
      type="text/javascript"
    ></script>
  </body>
</html>

Example: WordPress or CMS

If your CMS lets you inject HTML into the <body> or use a custom HTML block, paste the same two-line snippet. No server-side code is needed.

Private agents

By default, the widget uses the public agent endpoint. If your agent is private, you must supply a signed URL instead of an agent-id. Generate the signed URL on your server (see Authentication) and pass it to the widget:
<xuna-ai-convai signed-url="YOUR_SIGNED_URL"></xuna-ai-convai>
<script src="https://unpkg.com/@xuna-ai/convai-widget-embed" async type="text/javascript"></script>
Never expose your XUNA AI API key in client-side code. Always generate signed URLs on your server.

Next steps

  • Customize your agent’s voice, language, and persona in Configure.
  • For deeper UI control, use the React SDK instead of the widget.