Class DefaultBuilder

java.lang.Object
com.alibaba.cloud.ai.graph.agent.Builder
com.alibaba.cloud.ai.graph.agent.DefaultBuilder

public class DefaultBuilder extends Builder
  • Field Details

    • POSSIBLE_LLM_TOOL_NAME_CHANGE_WARNING

      public static final String POSSIBLE_LLM_TOOL_NAME_CHANGE_WARNING
      See Also:
  • Constructor Details

    • DefaultBuilder

      public DefaultBuilder()
  • Method Details

    • build

      public ReactAgent build()
      Specified by:
      build in class Builder
    • separateInterceptorsByType

      protected void separateInterceptorsByType()
      Separate unified interceptors by type into modelInterceptors and toolInterceptors.
    • gatherLocalTools

      protected List<org.springframework.ai.tool.ToolCallback> gatherLocalTools()
      Collect all tools from various sources.

      This method gathers tools from multiple sources in the following order:

      1. Direct tools provided via tools
      2. Tools from toolCallbackProviders
      3. Tools resolved by name via toolNames
      4. Tools extracted from resolver (if no regular tools collected yet)
      5. Tools from interceptors (modelInterceptors)
      6. Tools from hooks (hooks)

      The final combined list prioritizes hook tools first, then interceptor tools, followed by regular tools.

      Returns:
      a combined list of all tools from hooks, interceptors and user-provided sources