Annotation Interface ToolSearchStrategySupplier


@Retention(RUNTIME) @Target(METHOD) public @interface ToolSearchStrategySupplier
Marks a method as a supplier of the tool search strategy that an agent uses to discover its tools. The annotated method must be static, with no arguments other than the ones resolved through a SupplierParameterResolver, and return an instance of ToolSearchStrategy.

Example:


    public interface BankAgent {
        @Agent("A banker agent")
        String credit(@V("user") String user, @V("amountInUSD") Double amount);

        @ToolProviderSupplier
        static ToolProvider toolProvider() {
            return ToolProviders.from(bankTool, currencyConverterTool);
        }

        @ToolSearchStrategySupplier
        static ToolSearchStrategy toolSearchStrategy() {
            return new SimpleToolSearchStrategy();
        }
    }