Skip to content

Lab 2 - Autonomous Agents

Objectives

In this lab, you will learn about Autonomous AI Agents. You will see how to create an Autonomous AI Agent and map it to a knowledge base. You will learn how to do all of the following tasks:

  • Know how to create an Autonomous AI Agent from scratch.
  • Create an agent goal, instructions, and welcome message.
  • Understand where to map a Knowledge Base and how to update the Knowledge Base.
  • See how to integrate the AI Agent into a call studio script.

Explanation of formatting:

  • Italics - This indicates a button, menu option, or object that should be selected.
  • "Quoted Text" - This indicates that the text should be typed exactly as indicated.

Expected Total Time - 60 minutes

Note, you will have about 60 minutes to complete this lab.

Task 1. Create an AI Agent

In this task, we will create the AI Agent and define define the agent's goal, instructions, and welcome message.

  • Goal: What is the primary objective of the AI agent?
  • Instructions: How should your agent interact with customers to perform its task?
  • Welcome Message: How should your agent greet your customer initially?

Step 1.

Log into Webex Control Hub and select Contact Center -> AI Agents -> Build your AI Agent.

Build your AI Agent

Step 2.

Select the Create Agent button to the top right of the screen.

Create agent

Select Start from scratch and then click the Next button to the bottom-right of the screen.

Start from scratch

Step 3.

Select Autonomous in the type of agent box. In the Add the essential details form:

  • Provide an Agent Name of your choice. Ensure that it is unique by including your seat number at the beginning. ex. "S01 - My AI Agent"
  • The System ID is auto-generated.
  • The AI engine should be left as Webex AI Pro 1.0.

In the Agent's goal, type the following text:

You are a polite, professional agent who is an expert in Cisco Headsets. You will help answer customer pre-sales questions on headsets.

After the form is completed, select the Create button.

Autonomous Agent Start

Step 4.

Review the form for the Agent that you have just created. You will notice four configuration sections at the top and four menu options at the left. Let's review each.

Initial Autonomous Agent Form

  • Configuration

    • Profile: This section is where you configure the options that give the guidance to your AI Agent. This form contains the key prompts that you AI Agent will use to perform the task you have for it.

      • Agent name: A human readable name for the AI Agent. This can be updated as required.
      • System ID: Generated, unique ID for the AI agent. This can be changed, but must be unique in your tenant.
      • Agent's goal: This describes what your agent should do at a high level.
      • Instructions: This is the heart of the AI Agent. This should be a full description of what your agent does and how it should do it. Include guardrails, error handling, context, and describe how actions (where applicable) should be used.
      • URL for agent profile image: This is the image used with your agent. You can add your own image if you wish.
      • AI engine: This lets you select which AI engine you wish to use. There are currently two engines available, "Webex AI Pro 1.0", and "Webex AI Pro-US 1.0". As our lab is based in the European data center, you will only see "Webex AI Pro 1.0".
      • Welcome message: This is the first message that your AI Agent will send to the customer.

        You can find the documentation on each option at the following website.

    • Knowledge: This section allows you to select the Knowledge base that the agent will use to fulfil the responses to the customer.

    • Actions: This section defines the actions that you agent can take. You will see one default action included with each agent named "Agent handover". You can create additional actions to fulfill tasks as required.
    • Language: This allows you to select the language used by your AI Agent as well as the voice that will be used. For the Webex AI Pro-US engine, the only language available is English.
  • Sessions: This allows you to see the interactions with your AI Agent. We will look at this in a later section.

  • History: This shows the save history of your agent. As you make changes that are subsequently saved and published, this section will be populated.
  • Analytics: This will show statistics and reporting about the use of your AI Agent.

Step 5.

Let's now update the Instructions field. We have provided an example instruction below. Copy and paste this into the Instructions field to start.

You are an expert customer service representative who can answer any question on the capabilities and features of Cisco headsets. You should answer all questions in the most professional, helpful way possible.

The customers contacting you are potential customers who will need additional information on the features and capabilities of Cisco headsets in order to make and informed purchasing decision.

If the customer is not clear in what they ask, clarify their question and ensure that you have all the information you need. 

Ensure that your only interactions are about Cisco headsets and the knowledge base. You may also provide information about resellers in the knowledge base. If the customer asks a non related question, inform them politely that you cannot help them with that query and suggest that they seek other solutions outside of yourself.

Filled Out Instructions

After you have done this, review the text and notice what has been included.

Paragraph 1 – This describes what the Agent should do. It gives the way that the agent should interact with the customer. Note that we tell the agent what voice it should use (most professional, helpful way possible).

Paragraph 2 – This describes what customers will be talking to the AI Agent. This lets the agent format the messages in the proper way.

Paragraph 3 – Here we account for errors where the agent may not understand what the customer asked.

Paragraph 4 – The final paragraph sets guardrails on the interactions. We explicitly tell the agent that it may not answer questions that are outside of the knowledge base.

Step 6.

Next, let's update the Welcome message. As a reminder, this is the first message that the agent will send to the customer. This should greet the customer and describe what to expect from the interaction. Use the sample shown as a starting point and copy/paste it into your agent.

Hello, I am a sales assistant agent and I can help answer questions about Cisco headsets. How can I help you today?

Step 7.

We now have the AI Agent configured but we need to map to to a Knowledge Base. Select the Knowledge tab to configure this. From the Knowledge Base drop-down, select the knowledge base that corresponds to your seat number. You may find it easier to search for the knowledge base instead of scrolling through the entire list.

Knowledge Base Selection

Step 8.

Finally, select the Language tab. If you wish, update the voice to a different option but leave the language set to English.

Language Selection

Step 9.

Now that you have configured the AI Agent, select the Save Changes button at the top of the AI Agent configuration screen.

Save Changes

Step 10.

In this step, we will personalize the Knowledge Base. The current Knowledge Base is just Cisco data sheets. Let's add in some contact information for a reseller, YOU!!

a. Select the Knowledge Base management link at the left.

KB Link

b. Locate the Knowledge Base you used in step 7. As a reminder, this will include your seat number. You can use the search function to locate your Knowledge Base as shown in the image. After locating your Knowledge Base, open it by selecting the box in the search results.

KB Search Area

c. Feel free to review the Knowledge Base area to see what files are already uploaded. Select the Documents menu at the top of the screen to add in the custom content.

Documents Menu in KB

d. Select the + Create Document link in the middle of the page.

Create Document

e. In the Create Document pop-up, provide a name for the document. Provide the name "Headset Resellers" in the document name field. Leave the category option as Add to existing category and the Select existing category dropdown as "Unassigned". Select Save after providing a name.

Create Document Pop-up

f. In the text area, use the example shown in the image to add your own company name and information (or make one up). Feel free to be creative here. Once you have filled this out, select the Save button at the top of the document.

Filled Out Document

g. After a few seconds to a minute, you should see a message that the document was successfully added. After you see this message, select the Information menu at the top of the page. You should see that the custom document in the history. If you do not see this immediately, select the Refresh icon at the top of the Activity History.

Information Menu

You are now ready to test the agent.

Task 2. Test AI Agent and Review Session History

In this task, you will test the AI Agent that you created above. This will let you validate that everything is working correctly. Cisco supports testing with both text and voice.

Step 1. Text Preview

Select the Preview button at the top of the screen. Note that you do not need to publish the agent to preview.

Preview Button

The preview interface pops up at the bottom. Select, Start a chat to begin testing.

Start a chat

Step 2. Chat with Agent

You will see your Welcome message come up on the screen. To begin testing, type the question, "What type of headsets does Cisco sell?". You can see the example response that was generated when the lab guide was built. Because this is an LLM generated AI Agent, the result that you receive, may be different. Select the Read More link in the response to read the entire response. This will let you read the full response that was generated.

First Response from Agent

Continue to interact with the agent and ask questions. You may want to ask which headsets are bluetooth enabled or which ones have boom mics. To test the guardrails, ask it a non-related question such as, "What is the weather in San Diego today?" To see the custom information you added to the agent, ask, "Which partner can sell this to me?" You should see the information you added.

Step 3. Review Session History

After you have done testing the Agent are are satisfied with the results, select the Sessions menu at the left. This opens the sessions list and allows you to see the messages sent and responses that were generated.

Sessions Menu Location

Locate the session record for the test session and click on it.

List of Sessions

You will see the agents message, the customer's response to the message, then the agents reply to that message. Select the first response to the "What type of headsets does Cisco sell?". Note that you may select either the agent's message or the customer's message. In the right side, notice that you can see the specific knowledge base used as well as the detected language and the AI Engine.

Session Details

Click the down arrow next to the Knowledge Base to review the documents and pages where the agent generated the information. Notice as you scroll down, you can see each document which information was pulled from and the specific page and content.

Knowledge Used

Step 4. Publish the AI Agent

If you are not already on the Configuration page, select the Configuration menu at the left. Select Publish at the top of the page. In the Publish and track changes box, enter a comment about this publication. In the example, we have entered "Initial publication". These comments will help you identify what has changed later so ensure that these are meaningful to you.

Publication Screen

Before we go any further, Select the History menu. Here, you can see the history of the publications and once there are more than one version, you can select the drop-down in the controls column to revert to a previous release. You will also see that you can export a specific version of the agent if you need to fork the development for some reason.

History Page

Task 3. Integrate to Call Flow

We have now created an AI Agent and have tested it to ensure it's working. We are now ready to integrate into a call flow. You will download a shell application that we have created for you. You will import this, then modify it to call the Agent that you created above.

Step 1. Open mRemoteNG on WKST1 if you do not already have mRemote open, then login to CVP. Once you have logged in to CVP, locate the Call Studio icon on the desktop and double-click it to open Call Studio.

Open Studio

Step 2. Open a browser on the CVP server and download the application copying the link below and pasting it into the browser.

https://webexcc-sa.github.io/LAB-2356/downloads/NativeAI_Autonomous.zip

Remember where you download this (it will default to the Downloads folder for the Administrator) to as you will need it in step 3. You do not need to extract the zip.

Step 3. Import the application you have downloaded.

  • Select the File menu, then select Import.

    Import Menu Option

  • In the box that pops up, select Projects from Folder or Archive, then select Next.

    Import Dialog Box

  • In the Import Projects from Folder or Archive dialog box, select the Archive button at the top of the box, then navigate to where you downloaded the example application and select it. Once you are back at the import dialog, ensure that you uncheck the folder "NativeAI_Autonomous.zip_expanded" and leave the "NativeAI_Autonomous.zip_expanded\NativeAI_Auto" selected. Refer to the image and once all options are set, select Finish.

    Import Application Dialog

Step 4. In the Project Explorer, locate the NativeAI_Auto project. Expand this and double-click on the app.callflow to open the example application.

Project Explorer

Step 5. Review the application that you have imported. You will see that we have already added the required elements to the canvas.

Imported Application

Refer to the table for what each element is used for.

Element Name Element Type Element Function
CVP Subdialog Start_01 CVP Subdialog Start Mandatory element for all Comprehensive Call Flows to receive data from CCE.
CVP Subdialog End_01 CVP Subdialog End Mandatory element for all Comprehensive Call Flows to return data to CCE.
HeadsetAgent VirtualAgentVoice VAV element which allows CCE to interact with the Native AI agent.
HeadsetAgentDecision Decision Decision elements allow the user to take different outcomes based on the output of a previous element. This decision element handles the output from the HeadsetAgent VAV element.
ErrorMessage Audio Audio elements allow script to play either static audio files or play text to speech files through an ASR/TTS server.
AgentFlag Flag Flag elements can be added to scripts to help with tracking calls through the logs and indicating what path a script has taken. This Flag will indicate that the customer requested to speak to an agent.
ErrorFlag Flag Flag elements can be added to scripts to help with tracking calls through the logs and indicating what path a script has taken. This flag will indicate that the AI Agent encountered an error.
SessionEndFlag Flag Flag elements can be added to scripts to help with tracking calls through the logs and indicating what path a script has taken. This flag will indicate that the AI Agent completed and no agent was requested.

Once you have imported the app, you are ready to start configuring the elements required to interact with the agent.

Step 6. Update the VAV Element with the Agent ID from AI Agent Studio.

a. Select the HeadsetAgent VAV element, then select the Settings tab. The Webex AI Agent setting allows you to select which type of VAV bot you will be working with. Notice that we have selected the value, Autonomous from the dropdown.

Webex AI Agent Dropdown

b. Immediately under the Webex AI Agent setting, you will see the Bot ID setting. The value you see is the ID of the agent that was used to create this lab and will not be in the tenant you are using.

Bot ID Field

To find the value you need to use, go to the Webex AI Studio tab and select the AI Agent you created above. Select the 3 dots at the top, right-hand side of the screen, and in the drop-down, select Copy agent ID.

Copy BotID

Paste the agent ID you copied into the value for Bot ID.

Step 7. Deploy the Application

a. If you have not saved your application, do so now by selecting the save icon in the toolbar.

b. Validate the application. Right-click the NativeAI_Auto application and select Validate.

ValidateApplication

Check the errors grid at the bottom of the screen to ensure nothing is shown. If you do see any errors, review the error and resolve the issue by referring back to the portion of the lab where that item was configured.

c. Deploy the application to the VXML Server (located on the CVP server you are logged into). Right-click on the NativeAI_Auto application and select Deploy.

Deploy Application

d In the window that pops-up, leave the values at their defaults. The NativeAI_Auto application checked and the folder left as "C:\Cisco\CVP\VXMLServer" and click Finish.

e. On the CVP server, deploy the application. Navigate to "C:\Cisco\CVP\VXMLServer\applications\NativeAI_Auto\admin". Double-click deployApp.bat.

f. In the command window that pops up, type "yes" to confirm that you want to deploy the application. Hit enter one more time after the application has been deployed to close the command prompt window.

Step 8. Update CCE Script to use the new application

a. In your mRemote window, locate the AW-HDS-DDS server and login.

AWHDS Server

b. Open the Script Editor by opening the Unified CCE Administration Tools folder on the desktop, then opening the Script Editor link.

Unified CCE Admin Tools

Script Editor

c. Open the script named, CumulusInbound.

CumulusInbound Script

Select the Edit button in the toolbar.

Script Editor Edit Button

d. Locate the Set Variable node which sets the VXML Application name (the fourth node from the top left).

VXML Application Set Variable

Open it and update the name of the script (currently HelloWorld) to "NativeAI_Auto".

VXML Application Name Set

e. Select the Save button in the toolbar to make this change live, then select the Monitor Script button.

Monitor Script Button

After a moment, you will see green boxes between each of the nodes. This will let you see the call's progress through the script visually. It is expected that all the green boxes show 0 as we have not placed any calls to this script yet.

Script Monitoring Indicators

Task 4. Test Call Flow

In this task, we will test the Native AI agent that you created and see how the human agent sees the call.

Step 1. If you are not already logged in to Finesse on WKST1, open the Chrome browser, open a new tab and enter the URL below:

https://finesse1.dcloud.cisco.com

Login with the following details:

  • Username: sjeffers
  • Password: C1sco12345
  • Extension: 1080

Note, that this is an SSO agent so you should only need to enter the username in the Finesse login screen. The ADFS page should have the agent credentials saved.

Once you have logged in to Finesse, select Ready from the drop-down -> Next, click the Agent Answers tab from the left side menu. (Note: The name of the tab in the image does not match the document as it was taken from a slightly different version of this lab. The feature, however is the same.)

Finesse Login

Step 2. Use your mobile phone to call into the number.

a. Locate the Main phone number for your session. On WKST1 open a browser and open a new tab, then in the default page that appears, select Demo Links -> Demo Website.

Demo Site Location

b. In the Cumulus Finance website that is shown, select the blue box on the right-hand side that reads Talk to an Expert.

Talk to Expert Button

c. In the box that pops out, select the Call Us link. In the box that pops up, note the Main number, this is what you will use to test your lab.

IMPORTANT: THE NUMBER SHOWN IN THE IMAGE IS NOT THE NUMBER YOU WILL USE FOR YOUR LAB. ENSURE THAT YOU FIND THE NUMBER FOR YOUR SESSION!

Main Phone Number

Step 3. Use your mobile phone to call into the number. You should hear the bot greet you by name and your town, then ask how to help.

Step 4. Recommended ways to test the agent.

  1. After the agent answers and greets you, ask which headsets support bluetooth.
  2. Ask which headsets have boom mics.
  3. Feel free to ask other questions about headsets.
  4. Try out the guardrails by asking a non-related question like "What is the weather in San Diego today?"

Step 5.

When you are done testing the AI Agent, ask to speak to a human agent. You should then see the call arrive at the Finesse desktop. Answer the call and notice that the transcript (1) shows up. Select the AI Assistant button (2) at the top to show the AI Assistant. Here (3), you will see a summary of the call. Finally, notice the call variable "Call Reason" (4) which gives a one sentence summary of what the customer called about.

Finesse After Call Received

This now completes lab 2