类 SkillToolGroup

java.lang.Object
io.agentscope.core.tool.ToolGroup
io.agentscope.core.tool.SkillToolGroup

public class SkillToolGroup extends ToolGroup
A ToolGroup that is bound to a specific skill. When the associated skill is in use, this tool group should be activated alongside it.

The getDescription() method appends a reminder to the base description, informing the model that this tool group must be activated whenever the bound skill is active.

Scope defaults to ToolGroupScope.META so the agent can manage it via reset_equipped_tools.

Usage Example:


 SkillToolGroup group = SkillToolGroup.skillBuilder()
     .name("data_analysis_tools")
     .description("Tools for data analysis")
     .activateOnSkill("data_analysis")
     .active(false)
     .build();
 toolkit.registerToolGroup(group);
 
  • 方法详细资料

    • getActivateOnSkill

      public String getActivateOnSkill()
      Returns the name of the skill that this tool group is bound to.
      返回:
      The skill name (never null)
    • getDescription

      public String getDescription()
      Returns the enhanced description that includes a reminder about the skill binding.
      覆盖:
      getDescription 在类中 ToolGroup
      返回:
      The base description plus a skill-activation reminder
    • copy

      public ToolGroup copy()
      从类复制的说明: ToolGroup
      Creates a deep copy of this tool group, preserving the concrete type for subclasses.
      覆盖:
      copy 在类中 ToolGroup
      返回:
      A new ToolGroup (or subclass) instance with the same state
    • skillBuilder

      public static SkillToolGroup.Builder skillBuilder()
      Creates a new builder for constructing SkillToolGroup instances.
      返回:
      A new SkillToolGroup builder instance