uWebChat Documentation

Setup Virtual Agent for uWebChat

Background

In uWebChat, there are two types of agents:

  1. Human Agent: A regular Teams user who can be assigned to answer chats.
  2. Virtual Agent: Initially set up as a regular user but automatically converted to a Virtual Agent once linked to an AI Bot. The link is created by assigning a Virtual Assistant ID from OpenAI to the Teams user. Virtual Agents can handle chats when human agents are unavailable or act as the first point of contact. They can be added to groups like regular agents and are always "available."

Create OpenAI API Key & Assistant ID

To enable the Virtual Agent feature, follow these steps:

Obtain an OpenAPI Key

  • You can bring your own OpenAI API key OR request the uWebChat team to create one for you (note that a paid Azure subscription is needed). Once you have access to the Azure subscription use the follow Microsoft documentation to create you Virtual Assistant; How to create Assistants with Azure OpenAI Service - Azure OpenAI | Microsoft Learn
  • Choose the appropriate model gpt-4 (1106-preview). Note that this model uses a significant number of tokens due to its context usage. Always set limits (budget) on the use of the API key.

Create a Virtual Agent using the Azure OpenAI studio and Assistants playground

uwebchat_azure_openai_studio.png

Upload relevant information (files), such as PDFs and Word documents. Upload files for the assistant to use. You can upload up to 20 files, with a max size of 512 MB. Restrict its behaviour by providing clear instructions. For example:

uWebChat is a live chat platform based on Microsoft Teams. It is created by Universal.cloud. It can be embedded in a website or use WhatsApp Business as a channel.

Your task is to answer questions about how to use and set up uWebChat. Use your public knowledge first and consult documents only if needed. Prompt the user to contact a live agent if necessary.

Keep responses brief, as users are chatting in a small window, such as an embedded frame on a website or WhatsApp on a mobile device.”

  • Enable Code interpreter
  • Start a new New thread to test your assistant

Securely Share the endpoint, API Key and Virtual Assistant ID

  • Send the API key and Virtual Assistant ID to support@uwebchat.com.
  • Alternatively, replace the API key using the replaceOpenAIKey dialog.

Setup Steps for the New Virtual Agent Teams Account

Create a Regular Teams User

  • Use the Microsoft 365 admin portal to create a regular Teams user and assign a Teams license.
  • Log in with the new user and interact with the uWebChat bot.

Confirm the Creation of a New Agent Profile:

  • An admin must confirm the creation of the new agent profile, a necessary step for all new agents added to uWebChat.
  • The agent should see the following details upon typing the debug command:
    ID: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
    Object ID: xxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxx
    Given Name: Virtual
    Surname: Assistant 1
    Full Name: Virtual Assistant 1
    Agent ID: xxxxx-xxxxx-xxxxx-xxxxx-xxxxxxx
    Customer ID: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx
    Tenant ID: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxx
    User Principal Name: va1@demo.cloud
    Email: va1@demo.cloud
    Role: user
    

Send Details to Support

  • Email support@webchat.com with the debug statement output. Use the subject line: "Convert to Virtual Assistant: Virtual Assistant ID: XXX-XXX-XXXXX" (replace with the real assistant ID from the OpenAI portal).
  • The support team will link the Assistant ID from OpenAI to this agent.

Use the Virtual Agent

After linking the Virtual Agent to an OpenAI Virtual Assistant, you can add this agent to a group like a regular agent. The priority of the group will determine how the Virtual Agents are utilized:

First Point of Contact

  • If the priority (Prio) is set to 1 and no other agents with Prio 1 are members of the group, the Virtual Agent will act as the first point of contact.

Fallback Agent

  • If the priority is the same or lower than other agents, the Virtual Agent will respond when no other agents are available. This occurs when the Virtual Agent has the same priority as unavailable agents or a lower priority when no higher-priority agents are available.

By following these steps, you can configure the Virtual Agent feature in uWebChat to enhance your customer support capabilities. For more detailed instructions or assistance, please consult the online documentation on how to add new members to a group or contact our support team.