# Sample Codes

## In HTML

In a typical HTML environment, the following code could be used to learn how to enable conversational AI-based sales and customer support assistants.

```html
<!DOCTYPE html>
<html>
<head>
<!-- Your existing code goes here -->


<!-- CleanDesk AI CDN Access -->
<script defer src="https://cdn.cleandesk.co.in/public/build/clean_ai_bot.js"></script>
</head>
<body>

<!-- Your web page content goes here -->

<!-- CleanDesk AI Chat Widget -->
<cleandesk-chat-widget app_id="YOUR_APP_ID" app_secret="YOUR_APP_SECRET" access_by_id="CUSTOMER_ID"></cleandesk-chat-widget>

<!-- Logout script -->
<script defer src="https://cdn.cleandesk.co.in/js/widget_logout.js"></script>
</body>
</html>
```


---

# 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.cleandesk.ai/client-integrations/web-widget/sample-codes.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.
