类 AgentSkillPromptProvider

java.lang.Object
io.agentscope.core.skill.AgentSkillPromptProvider

@Deprecated(since="2.0.0") public class AgentSkillPromptProvider extends Object
已过时。
since 2.0.0. The skill package is removed; manage markdown skill catalogs in application code.
Generates skill system prompts for agents to understand available skills.

This provider creates system prompts containing information about available skills that the LLM can dynamically load and use.

Usage example:


 AgentSkillPromptProvider provider = new AgentSkillPromptProvider(registry);
 String prompt = provider.getSkillSystemPrompt();
 
  • 字段详细资料

    • DEFAULT_AGENT_SKILL_INSTRUCTION

      public static final String DEFAULT_AGENT_SKILL_INSTRUCTION
      已过时。
      另请参阅:
    • DEFAULT_CODE_EXECUTION_INSTRUCTION

      public static final String DEFAULT_CODE_EXECUTION_INSTRUCTION
      已过时。
      另请参阅:
    • DEFAULT_PER_SKILL_CODE_EXECUTION_INSTRUCTION

      public static final String DEFAULT_PER_SKILL_CODE_EXECUTION_INSTRUCTION
      已过时。
      Code-execution instruction used when every visible skill carries its own <files-root> (e.g. FileSystemSkillRepository). No single root path to substitute — the LLM reads each skill's <files-root> directly from the <available_skills> block.
      另请参阅:
  • 构造器详细资料

    • AgentSkillPromptProvider

      public AgentSkillPromptProvider(io.agentscope.core.skill.SkillRegistry registry)
      已过时。
      Creates a skill prompt provider.
      参数:
      registry - The skill registry containing registered skills
    • AgentSkillPromptProvider

      public AgentSkillPromptProvider(io.agentscope.core.skill.SkillRegistry registry, String instruction)
      已过时。
      Creates a skill prompt provider with custom instruction.
      参数:
      registry - The skill registry containing registered skills
      instruction - Custom instruction header (null or blank uses default)
  • 方法详细资料

    • getSkillSystemPrompt

      public String getSkillSystemPrompt()
      已过时。
      Gets the skill system prompt for the agent with all skills included.
      返回:
      The skill system prompt, or empty string if no skills exist
    • getSkillSystemPrompt

      public String getSkillSystemPrompt(SkillFilter filter)
      已过时。
      Gets the skill system prompt filtered by the given SkillFilter.
      参数:
      filter - the filter deciding which skills to include (null treated as all)
      返回:
      The skill system prompt, or empty string if no skills pass the filter
    • setCodeExecutionEnable

      public void setCodeExecutionEnable(boolean codeExecutionEnabled)
      已过时。
      Sets whether code execution instructions are included in the skill system prompt.
      参数:
      codeExecutionEnabled - true to append code execution instructions
    • setUploadDir

      public void setUploadDir(Path uploadDir)
      已过时。
      Sets the upload directory whose absolute path replaces every %s placeholder in the code execution instruction template.
      参数:
      uploadDir - the upload directory path, or null to disable path substitution
    • setCodeExecutionInstruction

      public void setCodeExecutionInstruction(String codeExecutionInstruction)
      已过时。
      Sets a custom code execution instruction template.

      Every %s placeholder in the template will be replaced with the uploadDir absolute path. Pass null or blank to fall back to DEFAULT_CODE_EXECUTION_INSTRUCTION.

      参数:
      codeExecutionInstruction - the custom template, or null/blank for default
    • setExposeAllMetadata

      public void setExposeAllMetadata(boolean exposeAllMetadata)
      已过时。
      Sets whether all metadata fields are exposed to the LLM.

      When disabled, only name, description, and skill-id are rendered into the skill prompt.

      参数:
      exposeAllMetadata - true to expose all metadata, false to expose only the core fields