Create tools
As mentioned earlier, we’re going to need two tools: one to access the data source of general weather information that we just created, and one to query the Open-Meteo API for real-time weather forecasts. We’ll create the former first.
Click “Tools” on the left sidebar. This will take you to a list of the existing tools for your org. You’ll notice that there are many existing already - this is because Syllable comes with a standard set of tools out of the box. To create a new one, click “New tool” in the top-right corner.
-
Name: The name of the tool is used to reference it elsewhere in Console, including in prompts and agents, so you should pick something that’s easily identifiable. It shouldn’t contain any whitespace. Enter “general_weather_information” here.
-
Service: A service is a grouping of tools. You can select any available service here to add your new tool to that service.
-
Tool schema: A JSON object defining the behavior and capabilities of the tool. For this tool, you can paste the following:
This tool will query Helix, Syllable’s document management and search service, for an answer to the user’s question, using the weather_facts
data source that we created as its knowledge base. Click Save to save this tool.
Now we need to create our second tool to call the Open-Meteo API. You should name this tool “get_weather,” attach it to any service you want, and use the following schema:
Click Save on this tool.
Now that we have our two tools, we can make them available to the prompt that we created earlier, so that any agents using that prompt will have access to the tools. We can do this on the prompt edit screen. Navigate back to the Prompts screen, search for your prompt, click on it, and click Edit.
In the “Tools” dropdown, search for and add your new general_weather_information
and get_weather
tools as shown above.
You also need to update the text of the prompt itself so that it informs the LLM when and how to use the new tools. Update it to match the following:
Now click Save to save the prompt.
We have one more step before we’re able to create the agent, and that’s to add a greeting message for the agent to deliver to the user at the beginning of a conversation. Click “Create a message” below to continue the tutorial.