Skip to main content
Skip table of contents

Tutorial on Your First Tool

In this tutorial, you'll create a tool using HALO to retrieve energy usage data for Dutch households. Please see the assignment below for more details. Try completing the task yourself before consulting the answers in the step-by-step guide provided.

Good luck!

Assignment

Create a tool using HALO to retrieve energy usage data for Dutch households based on a zipcode and house number. Leverage the Assistant for code completion to clean up the zipcode parameter by removing blanks to ensure data accuracy. The tool accesses energy consumption information via an open API (https://commondatafactory.nl/docs/api/energie).

API Details: Use the endpoint 'https://ds.vboenergie.commondatafactory.nl/list/?match-postcode=[ZIPCODE]&match-huisnummer=[HOUSENUMBER]', replacing [ZIPCODE] and [HOUSENUMBER] with the correct parameters.

Steps-by-Step Guide

  1. Initiate Tool Creation

    • Go to the Tools section in HALO.

    • Click the blue plus sign and select ‘Add New Tool’.

    • Name the tool “Retrieve Energy Data Dutch Households”.

    • Set the description as “Accessing government data through an open API.”

  2. Set Up Parameters

    • In the ‘Start’ block, add two parameters:

      • Zipcode: Set as a String data type and include a description.

      • House Number: Set as a String data type with a description.

image-20250312-075736.png
  1. Clean Up Zipcode Input

    • Add a step to clean up the input for the zipcode using the Assistant.

    • Click the plus sign and instruct the Assistant to “Remove Blank Spaces from Zipcode”.

image-20250312-075938.png
image-20250312-075841.png

The Assistant will create a step with Python code.

  1. API Configuration

    • Create the next step for the API call:

      • HTTP Method: Set to "GET".

      • API URL: 'https://ds.vboenergie.commondatafactory.nl/list/?match-postcode=[ZIPCODE]&match-huisnummer=[HOUSENUMBER]

      • Replace parameters:

        • For [ZIPCODE], select cleaned_zipcode via the menu by typing '/'.

        • For [HOUSENUMBER], choose housenumber.

image-20250312-082100.png
  1. Output Verification

    • Verify that the API call results are stored correctly in the resultvariable.

image-20250312-082308.png
  1. Save the Tool

    • Don’t forget to save the tool!

image-20250312-082441.png
  1. Testing the Tool

    • Use the play button at the bottom to test the tool.

    • Input “19” for the house number.

    • Format the zipcode with a space: "4811 AN", and click ‘Run & Debug.’

    • Confirm successful test execution by checking green marks at each step.

    • Utilize arrows in the top right to review the steps. Note the initial and cleaned zipcode formats.

image-20250312-082813.png
  1. Save Tool

    • After a successful test, click save to store the tool.

Conclusion

Congratulations on your first Tool! In the next tutorial, you will learn how to build an AI agent utilizing this tool, enhancing your agent's capabilities!

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.