Annotation Interface ToolsSupplier
Marks a method as a supplier of tools that an agent can utilize during its operation.
The annotated method must be static on the agent type, with no arguments other than the ones resolved through a
SupplierParameterResolver, and return a single Object, an array of Objects,
or a Map<ToolSpecifications, ToolExecutors>.
Example:
public interface BankAgent {
@Agent("A banker agent")
String credit(@V("user") String user, @V("amountInUSD") Double amount);
@ToolsSupplier
static Object[] tools() {
return new Object[] { bankTool, currencyConverterTool };
}
}
Like every helper method, it can be an instance method of a helper object of the agent instead of a static method
of the agent type: see the "Helper objects" section of the agentic tutorial and
AgenticServices.AgentConfigurator.