Class SubAgentSpec.Builder

java.lang.Object
com.alibaba.cloud.ai.graph.agent.extension.interceptor.SubAgentSpec.Builder
Enclosing class:
SubAgentSpec

public static class SubAgentSpec.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public SubAgentSpec.Builder name(String name)
      Set the name of the subagent (required).
    • description

      public SubAgentSpec.Builder description(String description)
      Set the description of the subagent (required). This is used by the main agent to decide whether to call the subagent.
    • systemPrompt

      public SubAgentSpec.Builder systemPrompt(String systemPrompt)
      Set the system prompt for the subagent (required). This is used as the instruction when the subagent is invoked.
    • model

      public SubAgentSpec.Builder model(org.springframework.ai.chat.model.ChatModel model)
      Set a custom model for this subagent. If not set, the default model from SubAgentInterceptor will be used.
    • tools

      public SubAgentSpec.Builder tools(List<org.springframework.ai.tool.ToolCallback> tools)
      Set custom tools for this subagent. If not set, the default tools from SubAgentInterceptor will be used.
    • interceptors

      public SubAgentSpec.Builder interceptors(List<ModelInterceptor> interceptors)
      Set custom interceptors for this subagent. These will be applied after the default interceptors from SubAgentInterceptor.
    • enableLoopingLog

      public SubAgentSpec.Builder enableLoopingLog(boolean enableLoopingLog)
    • build

      public SubAgentSpec build()