Task 2 - Autonomous Webex AI Agent Actions
Please use the following credentials to connect to Control Hub and configure Webex Contact Center:
Control Hub URL |
https://admin.webex.com |
Username |
wxccemealabs+adminID@gmail.com (where ID is your assigned pod number; this ID will be provided by your proctor) |
Password |
ciscoliveAMER25! |
Objective
In this lab, audience will learn to explore and set up Autonomous Webex AI Agent actions using Webex Connect flows. They will also learn how to configure these flows to interact with external APIs, allowing the AI Agent to handle data and fulfill requests by connecting to other services.
Section 1 : Create a Webex Connect Flow for Car Order
-
Action fulfillment for the agent is always handled via Webex Connect flows.
-
Lets begin by creating a Webex Connect flow, which can later be selected to a specific Webex AI action.
-
Navigate to the Webex Connect portal through the 'Quick Links' section in the Webex Contact Center area of Control Hub.
- Create a new service by clicking 'Create New Service' and providing a name (i.e. Webexone_carorderservice_Name_).
- Navigate to 'Flows' section and click 'Create Flow'.
- Proivde a 'Flow Name' (i.e. carcreateorder_name), ensure that 'Start from Scrach' is selected, and click 'Create'.
Info
This flow will interact with external database using API to create a car order.
- In the next menu, select 'AI Agent' under 'Integrations'.
- 'Configure AI Agent Event' is displayed. Under 'Provide sample Json' provide the variables that will be passed from the Webex AI Agent. For a new car order, use the following:
{ "model": "", "color": "", "engine": "", "customer": "" }
- Click 'Parse' and 'Save'.
- Drag the 'HTTP Request' node from the left-hand side menu, place it next to the 'AI Agent' node, and connect them by clicking and holding the green dot on the 'AI Agent' node and dragging it to the 'HTTP Request' node.
- Double click on the 'HTTP Request' node and fill the fields as follows:
Field name | Value |
---|---|
Method |
POST |
Endpoint URL |
https://68085a3f942707d722ddf6a8.mockapi.io/api/cars |
Header |
Content-Type |
Value |
application/json |
Output Variable Name (click '+Add Variable') |
orderid |
Response Entity |
Body |
Response Path |
$.orderid |
For 'Body' section use:
{
"color": "$(n2.aiAgent.color)",
"engine": "$(n2.aiAgent.engine)",
"model": "$(n2.aiAgent.model)",
"customer": "$(n2.aiAgent.customer)"
}
- Click 'Save'.
- Configure 'HTTP Request' node outcomes by dragging the orange, green, and red outcome dots to empty space on the canvas and selecting appropriate outcomes (e.g., 'onTimeout' - Error, 'onSuccess' - Success, 'onError' - Error).
- Next, click 'Flow Settings' (gear icon), navigate to 'Flow Outcomes', and expand 'Last Execution Status' outcome.
- Click 'Add New', use 'orderid' under 'Key' and '$(n3.orderid)' under 'Value'.
- Click 'Save'.
- Make the flow live by clicking 'Make Live' (top right corner) and then clicking 'Make Live' again in the next dialog box.
Section 2 - Configure AI Agent Car Order Action
-
Navigate back to the AI Agent Studio and to your Autonomous Webex AI Agent.
-
Select 'Actions' and click 'New Action'.
- Provide an 'Action Name' (use carordercreate).
- Provide the following 'Action description':
Submit a car order when the customer chooses a model and all other customization options. Provide orderid after a successful order.
- Under 'Action scope', select 'Slot filling and fulfillment'.
- Select the service you created in the previous task under 'Select service' and the flow created above under 'Select a flow'.
- Click 'New input entity'.
- Add four entities for the Webex AI Agent to pass to the Webex Connect flow with the following parameters:
Entity name | Entity type | Entity description | Entity examples | Required |
---|---|---|---|---|
model | String | Car model that the customer chose | NovaTerra | Yes |
color | String | Car color that the customer chose | Ruby Red | Yes |
engine | String | Engine type that the customer chose | gas, electric | Yes |
customer | String | Customer's name | Jack, Nick | Yes |
- Click 'Add'.
Section 3 - Car Order Actions with Webex AI Agent
To make the Agent more capable, additional bot actions are needed. The configuration process is very similar to the one completed above for order creation. For simplicity, Webex Connect flows for these next actions are already prebuilt and will not require manual configuration.
Car order check action
- In the AI Agent Studio, navigate to your Autonomous Webex AI Agent.
- Select 'Actions' and click 'New Action'.
- Provide 'Action Name' (use carordercheck).
- Provide the follwoing 'Action description':
Check an existing car order and provide details about the order - model, color, engine type, and orderid.
- Under 'Action scope', select 'Slot filling and fulfillment'.
- Select the prebuilt service CiscoLive25AIAgentFlows under 'Select service' and the carordercheck flow under 'Select a flow'.
- Click 'New input entity'.
Entity name | Entity type | Entity description | Entity examples | Required |
---|---|---|---|---|
orderid | String | orderid provided by the customer | 5345321 | Yes |
- Click 'Add'.
Car order modify action
- In the AI Agent Studio, navigate to your Autonomous Webex AI Agent.
- Select 'Actions' and click 'New Action'.
- Provide 'Action Name' (use carordermodify).
- Provide the following 'Action description':
Collect the orderid and modify the order as per the customer's request.
- Under 'Action scope', select 'Slot filling and fulfillment'.
- Select the prebuilt service CiscoLive25AIAgentFlows under 'Select service' and the carordermodify flow under 'Select a flow'.
- Add five entities for the Webex AI Agent to pass to the Webex Connect flow.
- Click 'New input entity'.
Entity name | Entity type | Entity description | Entity examples | Required |
---|---|---|---|---|
orderid | String | Order Id of the existing order | 5345321 | Yes |
model | String | Car model that the customer chose | NovaTerra | No |
color | String | Car color that the customer chose | Ruby Red | No |
engine | String | Engine type that the customer chose | gas, electric | No |
customer | String | Customer's name | Jack, Nick | No |
- Click 'Add'.
Car order delete action
- In the AI Agent Studio, navigate to your Autonomous Webex AI Agent.
- Select 'Actions' and click 'New Action'.
- Provide 'Action Name' (use carorderdelete).
- Provide the follwoing 'Action description':
Delete the order when requested.
- Under 'Action scope', select 'Slot filling and fulfillment'.
- Select the prebuilt service CiscoLive25AIAgentFlows under 'Select service' and the carorderdelete flow under 'Select a flow'.
- Click 'New input entity'.
Entity name | Entity type | Entity description | Entity examples | Required |
---|---|---|---|---|
orderid | String | Orderid provided by the customer | 5345321 | Yes |
- Click 'Add'.
- Save the Webex AI Agent configuration by clicking 'Save Changes', and publish by clicking 'Publish' (provide comments for version tracking purposes).
- Congratulations! You have completed this task.