# AI Lens

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FNCQPN1V60luNGiXYt2TC%2Fperm_note.png?alt=media&#x26;token=65f4eded-e7f9-44a1-a058-bc6dfb3c91e3" alt=""><figcaption></figcaption></figure>

## Simulation with AI Lens

Aisera AI Lens is a tool that allows Administrators to simulate their conversational bot with a webchat channel.\
\
**NOTE:** If you are a user with a custom role, make sure your role has at least the following permissions, which are required to view conversations with AI Lens:

* `intent` – **Read**
* `channels` – **Read**
* `AiseraGPT` – **Read**

### Getting Started <a href="#getting-started-pre-reqs-general-intro" id="getting-started-pre-reqs-general-intro"></a>

* Webchat channel is the default channel associated with the bot
* Select correct bot
* Login with a user

### Conversation Window <a href="#conversation-window" id="conversation-window"></a>

AI Lens lets you simulate the interaction with your bot. The simulated input **Requests** are not captured within the **Request Details** page. AI Lens is similar to runtime analysis.&#x20;

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2FEW4A9n7vRzbP1woDbIM3%2Fai_lens3.png?alt=media&#x26;token=88d4fd25-72c3-4c8a-8192-e69d03f27913" alt="" width="563"><figcaption></figcaption></figure>

**To use AI Lens:**

1. Choose **AI Lens** in your Aisera Admin UI.
2. Select your bot from the pull-down list at the top of the **AI Lens** window. You will see a bot interface on the AI Lens window.
3. Add a **Request**. (AI Lens requests will not be recorded in Aisera analytics.)\
   \
   ![](https://support.aisera.com/hc/article_attachments/36681664138637)
4. After you add a **Request**, you will see the bot functions on the right side of your window.

<figure><img src="https://3281977978-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FvBFXjH9S1CAy9f5hzg5Q%2Fuploads%2Fg6JUdiMYnsoKw9aX9Xhx%2Fai_lens2.png?alt=media&#x26;token=66ed129c-d342-49bb-bdf0-eb12c08ca01d" alt=""><figcaption><p>Bot Functions Show Up on the Right Side</p></figcaption></figure>

#### Debug Workflows and Hyperflows Using AI Lens <a href="#h_01jvdp4syxhjhbrgnempxzmq0w" id="h_01jvdp4syxhjhbrgnempxzmq0w"></a>

You can use **AI Lens** to see the debug information for your bot **Workflows** and **Hyperflows** while the bot is running.

<div align="left"><figure><img src="https://support.aisera.com/hc/article_attachments/36681664138381" alt="" width="563"><figcaption><p>Viewing flowDebugInfo While Bot is Running</p></figcaption></figure></div>

&#x20;Choose the **Show More** link to see the **flowDebugInfo** and **flowDebugInfo2** methods as they are running.

<div align="left"><figure><img src="https://support.aisera.com/hc/article_attachments/36681664139533" alt="" width="563"><figcaption><p>Show More Button</p></figcaption></figure></div>

{% hint style="warning" %}
You can also test Workflows and Hyperflows using the [**Test the Node**](https://docs.aisera.com/aisera-platform/ai-automation-optimize-flow/ai-workflow-studio/testing-workflows#pdf-page-bwlrvkqhijiqw0zetekc-best-practices) button on the AI **Automation > AI Workflow Studio window.**
{% endhint %}

<br>
