# Installation

Add the Alhena chat widget to your website with a simple JavaScript snippet.

<figure><img src="https://2864633804-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKZ3bWFAIdLAqpW2uafZ4%2Fuploads%2Fgit-blob-e10ac7efec1047f946ae3b6b28d4e5b0d951eeb9%2Fchat-widget.png?alt=media" alt="" width="375"><figcaption><p>Example Alhena AI Widget</p></figcaption></figure>

## Quick Start

Add this code to your website, just before the closing `</body>` tag:

```html
<script>
document.gleenConfig = {
    company: 'YOUR_COMPANY_KEY',
    apiBaseUrl: 'https://app.alhena.ai'
};
</script>
<script src="https://app.alhena.ai/sdk/gleenWidget.js"></script>
```

{% hint style="info" %}
Replace `YOUR_COMPANY_KEY` with your company key. Find it in your dashboard URL: if your dashboard is `https://app.alhena.ai/dashboard/acme/` then your company key is `acme`.
{% endhint %}

## Finding Your Snippet

You can also copy your pre-configured snippet from the Alhena dashboard:

**Integrations > Website > Installation**

## Regional URLs

Use the API base URL for your region:

| Region | API Base URL            |
| ------ | ----------------------- |
| US     | `https://app.alhena.ai` |
| EU     | `https://eu.alhena.ai`  |

Example for EU region:

```html
<script>
document.gleenConfig = {
    company: 'YOUR_COMPANY_KEY',
    apiBaseUrl: 'https://eu.alhena.ai'
};
</script>
<script src="https://eu.alhena.ai/sdk/gleenWidget.js"></script>
```

## Next Steps

Once installed, you can:

* [Customize the widget appearance](https://alhena.gitbook.io/docs/features/chat-widget/customization) in the dashboard
* Set up [icebreakers](https://alhena.gitbook.io/docs/features/chat-widget/icebreakers) and [nudges](https://alhena.gitbook.io/docs/features/chat-widget/nudges)
* Configure [human handoff](https://alhena.gitbook.io/docs/features/chat-widget/human-handoff)

## Developer Reference

For programmatic control and advanced integrations, see the [SDK documentation](https://alhena.gitbook.io/docs/developer-reference/website-sdk):

* [JavaScript API](https://alhena.gitbook.io/docs/developer-reference/website-sdk/javascript-api) - Control widget programmatically (open, close, toggle, send messages)
* [Events](https://alhena.gitbook.io/docs/developer-reference/website-sdk/events) - Listen for widget events
* [Styles API](https://alhena.gitbook.io/docs/developer-reference/website-sdk/styles-api) - Customize appearance via code
* [Code Examples](https://alhena.gitbook.io/docs/developer-reference/website-sdk/examples) - Common integration patterns


---

# 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://alhena.gitbook.io/docs/features/chat-widget/installation.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.
