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

> ## Agent Instructions
> Dappier has three product areas. Publishers: Ask AI 2.0 (an AI agent trained on the publisher's own content, deployed as a hosted AI Mode page or an embed), the AI Recommendations API, and analytics APIs. Advertisers: Brand Agents (a conversational AI ad format), AI Brand Builder (creates a Brand Agent from a prompt), the Sales Agent MCP at https://sales-agent.dappier.com/mcp, and the Brand Agents Analytics API. Developers and AI agents: the Real Time Search API, marketplace data models, the Dappier MCP server, Python and Go SDKs, and framework integrations.
> Start at /introduction for a map of every product. A full index of pages is at /llms.txt, and any page is available as Markdown by adding .md to its URL.

# Deploy Ask AI as a hosted page or an embed

> Launch your agent as a hosted AI Mode page on a Dappier URL or your own domain, or embed Ask AI on your site with two code snippets.

You can put an Ask AI 2.0 agent in front of readers in two ways: as **AI Mode**, a full answer page hosted on its own URL, or as an **embed** inside your existing pages. Both are set up in the **Deploy** section of your agent's **Brand & Deploy** tab.

To get there, open **My AI Agents**, select your agent, make sure **Ask AI 2.0** is selected at the top right, select **Brand & Deploy**, then select **Deploy**.

![Brand and Deploy tab with the Deploy section selected, showing the AI Mode live site](https://mintcdn.com/dappier-20/sng7l6SGGO95ZK0d/images/platform/brand-deploy-deploy.png?fit=max\&auto=format\&n=sng7l6SGGO95ZK0d\&q=85\&s=d39ed9a9a7660285bfc9196703185d80)

The panel on the right of the tab links to both live versions of your agent: **View your AI mode** and **View your embed on Dappier's hosted URL**. Use them to preview changes.

## AI Mode

AI Mode is a hosted answer page for your agent.

| Setting | What it does |
| - | - |
| Live Site | The Dappier hosted URL where your agent is deployed and accessible to users. |
| Add Existing Domain | Connects your own custom domain to the agent. Select **Add Domain** to start. |
| SEO Settings | Optimizes search engine visibility for your answer page. |
| Answer Page Theme | Sets the hosted answer page to Light, Dark, or Device. Select **Update Theme** to save. |

## Embed Ask AI

Use an embed to place Ask AI inside your own pages.

### Configure the embed

| Setting | What it does |
| - | - |
| Embed Type | The kind of embed, such as In Article / Side Rail. Height is configured separately for each type. |
| Height | How the widget height behaves on mobile and on desktop. For example, a fixed height sets a specific height, and a max height sets a maximum with flexible content. |
| Allowed Domains Support | The domains where the agent is allowed to load. Only these domains are authorized. Use full domains such as `mydomain.com`, or wildcard subdomains such as `*.example.com`. |
| Version | The widget version to load. |

Select **Update Agent** to save.

### Choose a placement

A placement is a deployment configuration for a specific location or use case of your agent. Under **Placement**, select an existing placement or create a new one.

### Add the code to your site

The Deploy section generates both snippets with your widget ID filled in. Copy them from the platform.

**1. Add the script to the head tag**

This script loads the Dappier widget on your page.

```html theme={null}
<!-- Add to the head tag -->
<script
  src="https://assets.dappier.com/widget/dappier-loader.min.js"
  widget-id="YOUR_WIDGET_ID"
>
</script>
```

**2. Add the widget tag to the body**

Place this tag wherever you want the widget to appear within the `<body>` of your HTML document.

```html theme={null}
<div id="dappier-ask-ai-widget">
  <dappier-ask-ai-widget
    widgetId="YOUR_WIDGET_ID"
  />
</div>
```

Widget IDs start with `wd_`.

## Related

> [card] [Customize Ask AI](https://docs.dappier.com/publishers/customize-ask-ai.md)
>
> Set welcome text, branding, and behavior, including dockable mode.

> [card] [Create your AI agent](https://docs.dappier.com/publishers/create-agent.md)
>
> Connect content and set the agent's persona.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.