> For the complete documentation index, see [llms.txt](https://docs.maiagent.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/conversations/web-chat/website.md).

# Integrate with Platform: Website

## <mark style="color:blue;">I. Access the Settings Page</mark>

### 1. Path 1: Add a New Website Chat

Click "<mark style="color:blue;">Customer Service > Chat Platforms</mark>" in the left menu, click "<mark style="color:blue;">+ Connect Chat Platform</mark>" in the upper right corner, and select "<mark style="color:blue;">Website</mark>"

### 2. Path 2: AI Assistant Associated Chat Platform

Go to "<mark style="color:blue;">AI Features > AI Assistant</mark>" in the left menu, select an AI Assistant, click the "<mark style="color:blue;">Operations</mark>" icon, then click "<mark style="color:blue;">Associated Chat Platform</mark>" and select "<mark style="color:blue;">Web XX Assistant</mark>"

### 3. Path 3: Chat Platform Operations

Go to "<mark style="color:blue;">Customer Service > Chat Platforms</mark>" in the left menu, select the AI Assistant you want to configure, and click the "<mark style="color:blue;">Operations</mark>" icon to enter the chat platform configuration.

## <mark style="color:blue;">II. Basic Settings</mark>

### 1. Basic Settings

**Set Platform Name**

* Enter the AI Assistant name you want to display on the website in the "<mark style="color:blue;">Platform Name</mark>" field
* For example: "Customer Service Helper", "Smart Assistant", etc.

**Select AI Assistant**

* Choose the AI Assistant to use from the "<mark style="color:blue;">AI Assistant</mark>" dropdown menu
* This determines which AI Assistant answers questions in the chat room

**Set Return URL**

* Enter your company website URL in the "<mark style="color:blue;">Return URL</mark>" field
* When users click the back button in the chat room, they will be redirected to this URL

**Obtain and Use the Public URL**

* The system automatically generates a "<mark style="color:blue;">Public Access URL</mark>"
* You can:
  * Click the "<mark style="color:blue;">Copy</mark>" button to copy the URL
  * Click the "<mark style="color:blue;">Visit</mark>" button to open the chat room in a new window
  * Click the "<mark style="color:blue;">Embed</mark>" button to get the embed code
  * Click the "<mark style="color:blue;">Embed Preview</mark>" button to preview the embed effect

**Embed Script Optimization**

When you choose the embed method, the system provides an optimized embed.js script with the following features:

* **Duplicate execution prevention**: Even if the script is loaded multiple times, it only initializes once to avoid conflicts
* **Better error handling**: Clear error messages are provided when loading fails, making debugging easier
* **Optimized loading performance**: The script is optimized to not affect website loading speed
* **Improved compatibility**: More compatible with various website environments and frameworks

**Embed Best Practices:**

1. Place the embed script before the `</body>` tag to ensure main page content loads first
2. Only include the embed script once on the page to avoid duplication
3. For SPA (Single Page Application) usage, refer to the technical documentation for advanced settings

### 2. Appearance Settings

**Upload Company Logo**

* Click the upload button in the "<mark style="color:blue;">Logo</mark>" area
* Select your company logo image file
* After uploading, a preview is displayed; click delete to re-upload

**Upload AI Assistant Avatar**

* Click the upload button in the "<mark style="color:blue;">Avatar</mark>" area
* Select an appropriate avatar image
* After uploading, a preview is displayed; click delete to re-upload

**Set Color Theme**

* Click the "<mark style="color:blue;">Theme Color</mark>" picker to choose the chat window header color
* Click the "<mark style="color:blue;">Title Text Color</mark>" picker to set the title text color
* Click the "<mark style="color:blue;">AI Assistant Response Background Color</mark>" picker to set the background color for AI reply messages

**Enable Theme Switching**

* Toggle the "<mark style="color:blue;">Theme Mode Switch</mark>" to the on position
* Users can switch between light and dark themes

### 3. Feature Settings

**Set Enable/Disable**

* Configure whether the chat service is active

**Set File Upload**

* Toggle "<mark style="color:blue;">Allow File Upload</mark>" to the on position
* Users can then upload files for AI analysis, such as images, documents, etc.

**Set Citation Display**

* Toggle "<mark style="color:blue;">Show Citations</mark>" to the on position
* AI responses will display source reference documents

**Set Allow Citation Download**

* Toggle "<mark style="color:blue;">Allow Citation Download</mark>" to the on position
* Users can download the files cited by the AI Assistant in conversations

**Set Show Tool Usage and Results**

* Toggle "<mark style="color:blue;">Show Tool Usage and Results</mark>" to the on position
* The system will indicate when processing is underway via MCP or API

### 4. Interaction Settings

**Set Welcome Message**

* Enter a welcome message in the welcome message input box
* For example: "Hello! I'm your smart assistant. How can I help you?"
* Click the "<mark style="color:blue;">Add</mark>" button to add the welcome message to the list
* You can add multiple welcome messages; the system will randomly select one
* To delete, click the delete button on the right side of the corresponding item

**Set Conversation Starter Questions**

* Enter preset questions in the "Conversation Starter Questions" input box
* For example: "How do I apply for a return?" or "What are your business hours?"
* Click the "<mark style="color:blue;">Add</mark>" button to add the question to the list
* These questions appear as quick options for users to click
* To delete, click the delete button on the right side of the corresponding item

### 5. Login Settings

**Set SSO Login Source**

* MaiAgent currently supports SSO (Single Sign-On) integration through Keycloak
* Switch the authentication method in the "<mark style="color:blue;">Login Source</mark>" dropdown menu
* Choose between MaiAgent or Keycloak as the identity provider

## <mark style="color:blue;">III. Auto-Reply Settings</mark>

Configure the bot reply time slots here.

* Click the toggle next to each day: Select which days of the week to enable replies.
* Set time slots: Select the start and end times.
* Add time slots: If you need to configure multiple time slots, click "<mark style="color:blue;">+ Add Time Slot</mark>" and set the times.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.maiagent.ai/maiagent-user-guide/maiagent-user-guide-en/conversations/web-chat/website.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
