You can use Agents as Tools with a model. Each Agent can have it’s own persona/prompt, Tools, Data Sources and other components, and can be used to hand-off complex workflows for additional capabilities. Agents as Tools can also be used to set Prompt Variables in the inner agent and pass run-time values for the Agent to execute.

Before you start

Make sure you have an Agent you want to use, and an API Key that is scoped to your project. To create an API Key, go to Settings -> API Key, and save it before starting.

Setting up an Agent as a Tool

To add an Agent as a Tool, look for it in the Tool Library.

The Tool can be added via finding it from the library listing.

Add the Tool to your library.

Provide an Agent by selecting it from the available options.

Once saved, add the tool to an agent by following the Tools setup guide.

Prompt Variables

Agents as Tools support passing of values to Prompt Variables to the inner Agent. When adding an Agent with Prompt Variables as a Tool, you’ll see that the Tool will automatically fetch the variables associated with this Agent.

The model will set these variables when it’s being called, and set them from the user’s response.

For improved responses, it is recommended that you add a prompt to your model as well, providing details of your Agentic use case.