Adding tools to an agent
Tools can be used to enhance your agent's capabilities and allow them to perform more complex operations. Tools can be added to your agent from the catalog, from your local instance, or by importing an OpenAPI specification.
In the Technology preview, you can also create OpenAPI and Python tools using the Agent Development Kit (ADK). To learn more, see Creating agents with the ADK.
To add a tool to your agent, from the agent's toolset in the Toolset section, click Add tool.
The following options are available:
Add tool from catalog
This option enables you to add tools from the catalog.
- From the Add a new tool menu, select the Add from catalog option.
- Find and select the tool that you want to add and click Add to agent.
Add tool from a local instance
This option enables you to add tools from a local instance. Tools in the local isntance can include any previously imported tools, any tools that were previously added from the catalog, or any tools that were created and uploaded using the CLI.
- From the Add a new tool menu, select the Add from local instance option.
- Select the tool that you want to add and click Add to agent.
Import tools from an OpenAPI
To import tools from an OpenAPI specification, you can upload your OpenAPI specification and select the operations that you want to import as tools. Each operation is created as a separate tool.
- From the Add a new tool menu, select the Import option.
- Drag and drop your file to upload. After the file is uploaded, click Next.
- Select the operations that you want to create as tools and click Add to agent.
Create a new tool
Creating a new tool using the tool builder is currently unavailable in the Technology preview.
To create a tool in the Technology preview, you can import an OpenAPI specification, or use the ADK to upload OpenAPI or Python tools. The ADK provides a set of libraries that you can use to develop agents and tools.
What to do next
Once a tool is added to the toolset, an agent can start using it. After adding your tools to your agent's toolset, consider the following:
- Update the tool's description. The agent uses the tool description field to determine whether it will use the tool and how it will use the tool. Make sure to provide a detailed description for how the agent can use the tool. To update the tool description, click the tool menu and select Edit details. When you are satisfied with your description, click Save. You can continue to iterate on the description, as you test the tool.
- Test the tool. To test your tool, use the prompt in the Preview chat window to invoke your tool.