Components of tools

Agent Studio automatically generates a template (tool.py & requirements.txt) with appropriate comments for each component of the tool.

The following components of a tool exist:
  • class UserParameters: This class is used to define the configuration parameters for a tool that interacts with an external system, for example, URLs, API keys. It specifically holds parameters that the Large Language Model (LLM) cannot determine on its own.
  • class ToolParameters: This class defines the parameters that can be determined by the LLM. The LLM utilizes the provided type and descriptive annotations for each parameter to suggest accurate values. This parameter-defining class must be nested within the main tool-defining class.
  • class <tool-name>: The core tool is defined by a class that must inherit from StudioBaseTool. This class includes the tool's name and description, both of which must be type-annotated as str. The tool's operational logic is contained within its _run method.