Lab 1 - Build Your Own AI Agent
Context
Agentic AI is transforming customer service by enabling systems to proactively resolve issues, deliver personalized assistance, and automate repetitive tasks, boosting efficiency and satisfaction. Despite the complexity behind Agentic AI, Webex AI Agent is designed to be intuitive and easy to use, making it accessible even for IT professionals just beginning their AI journey.
Let us prove it to you in this 20 minute lab!
High Level Explanation 
- You will upload a knowledge base, and by using Retrieval-Augmented Generation (RAG), the AI Agent ensures its responses are grounded in accurate and relevant data.
- You will build your own AI Agent, this will require you to configure the agent's goal.
- Once the agent is created, you will update the instructions field and setup a fulfillment action.
- Once this is done, everything will be ready to test your AI Agent using our Preview feature.
Important
We have 2 options available for the creation of the AI agent:
- Use an AI Agent template and generic knowledge base.
- Build your AI Agent from scratch and upload your own knowledge base.
Build 
Creating a Knowledge Base
As mentioned before, we have two options for you to create a knowledge base:
a. Create your own KB by collecting information from your company's website (e.g., an FAQ, product guide, etc) and adding it as a document inside a KB.
b. Upload a generic KB file available in this PC station.
Select one of the options and follow the instructions:
Use a generic KB
- From the AI Agent Studio, select the notebook icon on the left navigation menu. This is where you will manage your Knowledge Bases.
- Click Create Knowledge Base, provide Knowledge base name as ---_AI_KB, then click Create.
- Go to the Files tab and select the option Add File. You will find a generic KBs in the Desktop folder, DrJames_KB.txt.
- Upload the generic KB and select the option Process Files.

Create your own KB
- Navigate to your company's website and find the information you would like to include, e.g., FAQ, company policies, PDF with information about a product your company offers, etc.
- From the AI Agent Studio, select the notebook icon on the left navigation menu. This is where you will manage your Knowledge Bases.
- Click Create Knowledge Base, provide Knowledge base name as ---_AI_KB, then click Create.
- Select the Documents tab and click the option + Create Document.
- Enter the Document name ---_AI_DOC. Select the option Add to new category, name the category anything that matches the information you are adding eg FAQ, product information, etc.
- Copy the content you want to use for your KB from your company's website and paste it in the document you created. If you are copying the content from a website, make sure you only paste the text. Click Save on the top right corner.
- You could also upload a document with public information of your company, simply go to the Files tab and select the option Add File. Once you upload the file, select the option Process Files.

Creating an Autonomous AI Agent
Create your own AI Agent
- Navigate to Dashboard from the right-hand side menu panel and click Create Agent
- Select Start from Scratch and click Next
- On Create an AI agent page select the type of agent: Autonomous
- A new section called Add the essential details will appear. Provide the following information:
Agent Name: ---_AutoAgent
System ID is created automatically
AI engine: Webex AI Pro-US 1.0
- The Agent's goal section depends on what you want your AI Agent to do, but here's a recommended template:
You are a <Personality Prompt> <Agent Type> for <Company Name> in the <Industry> industry. You are especially skilled at <Agent Purpose> for <Audience>.
Example: You are a professional FAQ and Knowledge Base Assistant for Webex in the Customer Experience industry. You are specially skilled at answering questions relevant to our Contact Center and CPaaS solutions for our customers.
- Once the agent is created, you need to add Instructions to orchestrate how the AI Agent will execute an action. There's a pre-configured action that will authenticate you via OTP to your mobile device (US numbers only), these are the instructions:
##Tasks ### Authenticate the user via OTP with the action \[generate_OTP\] and \[validate_OTP\]. Execute the step \[validate_OTP\] a maximum of 3 times for every OTP generated. ## Response Guidelines Formatting Rules: Provide clear, concise responses. Use bullet points or short paragraphs for clarity. Language Style: Keep a polite and professional tone. ##Completion: Ask if the user needs additional help before ending. - Switch to Knowledge tab and from Knowledge base drop-down list select ---_AI_KB
- Click Save Changes, then click Publish. Provide any version name in popped up window (ex. "1.0").
- Switch to the Actions tab and click the New action button. Proceed to name the action generate_OTP, add a description and select the action scope option called Slot filling and fulfillment.
- Create new input entities for the data required to authenticate, these are the details for each entity:
Entity Name Type Value Description name string - Customer name phone_number Phone Use default regex A valid phone number with country code. - In the Webex Connect Flow Builder Fulfillment section, select the CCW_Admin_Flows service and the flow generate_OTP. Click the "Add" button.
- click the New action button again, and proceed to name the action validate_OTP, add a description and select the action scope option called Slot filling and fulfillment.
- Create new input entities for the data required to authenticate, these are the details for each entity:
Entity Name Type Value Description otp string - The 6 digit OTP given by the customer phone_number Phone Use default regex A valid phone number with country code. transaction string - transid received in the authenticate_generate_OTP response. Do not ask the user for this - In the Webex Connect Flow Builder Fulfillment section, select the CCW_Admin_Flows service and the flow validate_OTP. Click the "Add" button.
- You are ready to test your AI Agent.
Create Autonomous AI Agent using a template
- Navigate to Dashboard from the right-hand side menu panel and click Create Agent.
- Select the Autonomous AI Agent template called Doctor's appointment.
- A new section called Add the essential details will appear. Add your attendee ID at the end of the AI agent name Doctor's appointment - --- and edit the AI engine field to Webex AI Pro-US 1.0.
- Click the option Create.
- Switch to Knowledge tab and from Knowledge base drop-down list select ---_AI_KB.
- Go to the actions tab and click on each action (except Agent Handover and send_sms) to assign the Webex Connect flow that will execute the action. On the section Webex Connect Flow Builder Fulfillment, select the service CCW_Admin_Flows and select the flow with the matching name for each action.
- Save your changes on each action and select the option Publish when you update all the actions.
- You are ready to test your AI Agent.
Testing 
- Click on Preview to test your AI Agent.
- If you created you own AI Agent, confirm the authentication via OTP is working and ask questions relevant to the KB you created.
- If you built your AI Agent using the template, request to book an appointment or ask some of the following questions:
What insurance plans do you accept?
How can I book an appointment?
Do you offer virtual consultations?
what are some of the health services you offer?
Do you want to take your AI Agent with you?
- Go to the Webex AI Agent studio, locate your AI Agent, click the 3 dots in the top right corner of your AI Agent card.
- Select the option to Copy access token.
- Fill out this FORM with your details and the access token.
- Scan the following QR code and start chatting to your AI Agent via SMS.
