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

# Testing and Deploying

> Test your agent before going live, then embed it on your website with a widget or iframe.

# Testing and Deploying

Before putting your agent in front of customers, use the built-in test page to verify it works correctly. Then deploy with a single code snippet.

## Testing Your Agent

Every agent has a **Test** page in the dashboard. This gives you a live chat interface connected to your agent — identical to what your customers will see.

### What to Check

* **Common questions** — Ask the questions your customers ask most. Are the answers accurate and helpful?
* **Edge cases** — Try vague or unusual questions. Does the agent handle them gracefully or give confusing responses?
* **Actions** — If you've enabled actions (like ticket creation or appointment booking), test each one by using natural trigger phrases
* **Out-of-scope questions** — Ask something unrelated to your business. The agent should politely redirect rather than making up an answer
* **Tone and style** — Make sure the responses match the tone you configured

<Tip>After testing, if answers aren't good enough, go back and add more source material. More specific content leads to better responses.</Tip>

## Deploying Your Agent

Once you're satisfied with testing, deploy your agent by embedding it on your website. You have two options.

### Option 1: Chat Widget (Recommended)

The chat widget adds a floating chat bubble to the bottom-right corner of your site. Customers click it to open a conversation.

To embed the widget, copy the script tag from your agent's **Deploy** section and paste it before the closing `</body>` tag of your website:

```html theme={null}
<script
  src="https://agntlabs.ai/embed/widget.js"
  data-bot-id="YOUR_BOT_ID"
  defer>
</script>
```

Replace `YOUR_BOT_ID` with your actual bot ID from the dashboard.

The widget works on any website — WordPress, Shopify, Squarespace, Webflow, or any custom-built site.

### Option 2: Iframe Embed

If you want to embed the chat directly into a page (instead of a floating bubble), use an iframe:

```html theme={null}
<iframe
  src="https://agntlabs.ai/chat/YOUR_BOT_ID"
  width="400"
  height="600"
  style="border: none;">
</iframe>
```

This is useful for dedicated support pages or help centers where you want the chat to be a visible part of the page layout.

### Choosing Between Widget and Iframe

| Feature    | Widget                            | Iframe                       |
| ---------- | --------------------------------- | ---------------------------- |
| Placement  | Floating bubble (bottom-right)    | Inline on a specific page    |
| Visibility | Always available across your site | Only where you place it      |
| Best for   | General website support           | Dedicated help/support pages |
| Setup      | Single script tag, site-wide      | Placed per page as needed    |

<Note>Both embed options connect to the same agent and use the same knowledge base and configuration. Choose based on where and how you want the chat to appear.</Note>

## After Deploying

* Monitor your agent's performance from the [Analytics dashboard](/analytics/overview)
* Update sources and Q\&A pairs as your product evolves
* Review conversations periodically to spot areas where your agent could improve
