# Deploying

## Embed on your website

Copy the embed snippet and paste it into your website's HTML, just before the closing `</body>` tag:

```html
<script src="https://app.knowbase.ai/assets/widget.js"></script>
<script>
  KnowbaseChat.init({ token: 'YOUR_TOKEN' });
</script>
```

That's it — the widget will appear on your website.

## Preview

Click **Open demo page** to see your assistant in action before deploying. This opens a test page with the widget loaded.

{% hint style="warning" %}
If your assistant is **hidden** (toggled off on the Overview page), it won't appear in the preview or on your website. Make sure it's set to "Visible on website".
{% endhint %}

## Publishing

If you used the setup wizard, click **Publish** on the last step to set your assistant to "Live" status.

## Updating

All configuration changes (behavior, appearance, sources) **apply instantly** to deployed widgets. No need to update the embed code.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.knowbase.ai/ai-assistants/deploying.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
