Tutorial: Creating the Empower agent on Agent builder
The following step-by-step guides you through setting the IBM watsonx Orchestrate Agent builder, creating an agent, adding tools, and other agent to collaborate with your agent on accomplishing tasks.
Before your begin
Before you start to follow this tutorial, you must set up your IBM watsonx Orchestrate ADK environment, where you build agents and tools. It also provides a convenient interface for managing credentials, sending requests, and handling responses from the service’s APIs. See the Installing the watsonx Orchestrate ADK and Installing the watsonx Orchestrate Developer Edition.
Empower: An agent for employee success
This tutorial is based on a scenario called Empower: An agent for employee success. The goal is to create an agent with a key role in assisting employees by answering their questions, providing guidance on supporting tickets, service issues, and referencing FAQs stored in Sharepoint. The following sections walk you through the complete agent building process, from defining the name and description until the deployment process and the agent’s usage on watsonx Orchestrate chat.
ServiceNow and Customer care examples
After setting up the ADK and starting your local orchestrate server, you need to import the ServiceNow and Customer care examples, both agent and tools, once they are used to create the Empower agent. The following sections make available the files that are needed to build the ServiceNow and Customer care examples, and how to install them.
Customer care and ServiceNow agents
The following section guides you to create the Customer care and ServiceNow agents.
-
Create a folder to structure your agents and tools. For instance, name this folder as agents.
-
In the new folder, create a YAML file with a text editor of your preference. Name the file as customer_care_agent.
-
Insert the following code into the
customer_care_agent.yaml
file. -
Save your file.
-
Create another YAML file, but name it as service_now_agent.
-
Insert the following code into the
service_now_agent.yaml
file. -
Save your file.
Up until here, you created the agents that are needed for Customer care and ServiceNow examples.
Creating the Customer care tools
The following section guides you to create the tools for Customer care example.
-
Create a new folder to insert the tools of your examples. For instance, name this folder as tools.
-
In the new folder, create another one to insert the customer care tools. Name this folder as customer_care.
-
In the customer_care folder, create a Python file with a text editor of your preference. Name the file as get_healthcare_benefits.
-
Insert the following code into the
get_healthcare_benefits.py
file.[Python] -
Save your file.
-
In the same folder, create another Python file and name it as get_my_claims.
-
Insert the following code into the
get_my_claims.py
file.[Python] -
Save your file.
-
In the same folder, create another Python file and name it as search_healthcare_providers.
-
Insert the following code into the
search_healthcare_providers.py
file.[Python]
Up until here, you created the tools for the customer care example.
Creating the ServiceNow tools
The following section guides you to create the tools for ServiceNow example.
-
In the tools folder, create a new folder named as servicenow.
-
In the servicenow folder, create a Python file and name it as create_service_now_incident.
-
Insert the following code into the
create_service_now_incident.py
file.[Python] -
Save your file.
-
In the same folder, create another Python file and name it as get_my_service_now_incidents.
-
Insert the following code into the
get_my_service_now_incidents.py
file.[Python] -
Save your file.
-
In the same folder, create another Python file and name as get_service_now_incident_by_number.
-
Insert the following code into the
get_service_now_incident_by_number.py
file.[Python]Up until here, you created the tools for the service now example. Before finishing, you must create the requirements file.
-
Return for the tools folder and create a TXT file named as requirements.
-
Insert the following code into the
requirements.txt
file.
You finished to create the files that are needed to install the Customer care and ServiceNow examples.
Installing ServiceNow and Customer care
The following section guides you to install the ServiceNow and Customer care examples.
-
Start the watsonx Orchestrate Developer Edition local server.
[BASH] -
Signup for a Sevice Now account at
https://developer.servicenow.com/dev.do
. -
Validate your email address (check email).
-
On the landing page, click start building. This allocates a new instance of ServiceNow for you.
-
Back on the landing page, click your profile icon on the upper right. Under “My instance”, click manage instance password.
-
Create an application connection by using these credentials:
[BASH] -
Import the tools for your agent.
[BASH] -
Import each agent created previously.
[BASH] -
Run
orchestrate chat start
.
When you run the chat, you must be able to see a list of agents in your local chat interface.
Agent’s profile
This section shows how to define the name and description of your agent. This step gives your agent a clear purpose and helps guide how it interacts with users.
- From the IBM watsonx Orchestrate chat page, click Manage agents.
- Click Create agent.
- Choose Start from Scratch.
- In the Name field, insert Empower and in the Purpose, insert a text as you prefer to describe the agent. Suggestion: “This agent’s role is to assist employees by answering their questions, providing guidance on supporting tickets, service issues, and referencing FAQs stored in Sharepoint”.
- Click Finish to complete.
You finished working on the profile.
Agent’s tasks
This section guides you through how to equip your agent with tools, and how to add other agents to collaborate in accomplishing tasks.
- From the Empower agent management screen, click Tasks.
- In Tools, click the drop-down list Add tool, and select Add from catalog.
- Search for get_healthcare_benefits, and select it by clicking in the plus icon. Close the tools pop-up.
- In Collaborators, add the agent that collaborates with your agent on running tasks. Click Add collaborator +.
- Select service_now_agent by clicking in the plus icon and close the collaborator agents pop-up.
You finished working on the Toolset.
Chat preview
This section shows how you can see your agent in action before deploying, allowing you to quickly validate that everything works as expected.
- From the Empower agent management screen, type in the chat bar “Show my benefits related to mental health”, and press Enter.
- Wait for the chat response. You can check how your response was generated by clicking How did I get this response.
You finished previewing your chat.
Deploying Empower agent
This final section guides you to deploy your agent and make it available in the IBM watsonx Orchestrate chat.
- Click Deploy.
- Click Home or IBM watsonx Orchestrate to return for the chat page.
- In the Agents list, select the Empower agent, and start by using it directly from the watsonx Orchestrate chat page.
- You can ask about service now issues, as your agent has the Service now agent collaborating on running tasks.
You completed the process of creating and deploying your Empower agent.