Skip to content

Tools

Tools are the predefined actions that can be called by the task, human, or agents and provide basic building blocks for interactions, like accessing the content of the web page, interacting with forms, or making HTTP requests. The difference from task is that tools encapsulate a part of the particular workflow and they can be used in tasks or by AI agents. Any task can be exposed as a tool and used by other tasks or agents, so tasks and tools are often interchangeable concepts.

Creation

Create a task and define Options / Tool name to make the task available as a tool.

Parameters

Each tool has parameters. User-defined tools can use parameters anywhere in the subsequent tools calls using the special value $harmony.args.parameter_name. For example, the tool get_google_response can be defined as get_page_content, url: https://www.google.com/search?q=$harmony.args.query and called as get_google_response, query: "colors of the rainbow".

Invoking by agents

The tools can be called by agents using prompts like “Use the tool get_google_response with argument query: "colors of the rainbow" and summarize the found information” (the tool get_google_response is described in the example above). Sometimes, agents may decide to execute the tools on their own, for example, an Open AI executes the tool get_current_time for the prompt “What time it is now?”. Agents may be instructed to use or not use tools in the system prompts, with a default prompt “Use the tools only when absolutely sure they are relevant”.

The AI should be specifically trained to call tools, so some agent architectures do not support tool calling. Test your tools with OpenAI’s ChatGPT to validate the default behavior if you use the custom AIs.