Class SkillsInterceptor.Builder

java.lang.Object
com.alibaba.cloud.ai.graph.agent.interceptor.skills.SkillsInterceptor.Builder
Enclosing class:
SkillsInterceptor

public static class SkillsInterceptor.Builder extends Object
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • skillRegistry

      public SkillsInterceptor.Builder skillRegistry(SkillRegistry skillRegistry)
      Set a shared SkillRegistry instance. This must be the same instance used by SkillsAgentHook to share skills data.
      Parameters:
      skillRegistry - the SkillRegistry to use (must not be null)
      Returns:
      this builder
    • groupedTools

      public SkillsInterceptor.Builder groupedTools(Map<String,List<org.springframework.ai.tool.ToolCallback>> groupedTools)
      Set grouped tools: map from skill name to the list of tools for that skill. When the interceptor finds "read_skill" tool calls in AssistantMessage with a given skill_name, it adds the corresponding tools to the request's dynamicToolCallbacks.
      Parameters:
      groupedTools - map from skill name to list of ToolCallbacks (can be null or empty)
      Returns:
      this builder
    • build

      public SkillsInterceptor build()