On this page we will see how to set up the Airport lookup tool we used on the previous page. Basically it is just a workflow (screenshot below)
This is basically a very simple workflow, with some extra nodes added to it. The data will be read from a Data warehouse implemented in Postgres we created in these pages .
The PostgreSql Connector, DB Table Selector and DB Reader nodes connect to the database and read the SCD_Airports table (actually a Slowly Changing Dimension ).
In the String Configuration node we describe the parameter our Tool will receive (the IATA code of the airport we want to search for. This is passed to the Row Filter node thru a flow variable.
In the Column filter we only keep the data our Tool needs to return, in this case the Airport name.
This is passed on to the final Tool Message Output node, and that is it for the Workflow.
IMPORTANT: Two things:
It is important to enter a as clear as possible description of our workflow (see red part of image below). This is what will allow the LLM of the Agent to pick the correct tool
You have to save this workflow into the Tools subfolder of the workflow folder, as we have configured our Agent to look for the Tools in that location.
On the next page we will create a new Tool to do the inverse lookup (i.e., input an Airport name and return its IATA code) and then extend our Agent to allow the user to search for flights between 2 locations.