> ## Documentation Index
> Fetch the complete documentation index at: https://docs.xuna.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Embed the conversational AI widget on any website

> Add a fully functional XUNA AI voice agent to any website with two lines of HTML — no build step, no dependencies, no JavaScript required.

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:

```html theme={null}
<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.

<Tip>
  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.
</Tip>

## Where to find your agent ID

<Steps>
  <Step title="Open the dashboard">
    Go to the **Agents** section in your XUNA AI dashboard.
  </Step>

  <Step title="Select your agent">
    Click the agent you want to deploy.
  </Step>

  <Step title="Copy the agent ID">
    The agent ID appears on the **Overview** tab. It looks like `agent_7101k5zvyjhmfg983brhmhkd98n6`.
  </Step>
</Steps>

## Example: static HTML page

Here is a minimal complete HTML page with the widget embedded:

```html theme={null}
<!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](/configure/authentication)) and pass it to the widget:

```html theme={null}
<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>
```

<Warning>
  Never expose your XUNA AI API key in client-side code. Always generate signed URLs on your server.
</Warning>

## Next steps

* Customize your agent's voice, language, and persona in [Configure](/configure/overview).
* For deeper UI control, use the [React SDK](/deploy/react-sdk) instead of the widget.
