类 AgentSkillPromptProvider
java.lang.Object
io.agentscope.core.skill.AgentSkillPromptProvider
已过时。
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();
-
字段概要
字段 -
构造器概要
构造器构造器说明AgentSkillPromptProvider(io.agentscope.core.skill.SkillRegistry registry) 已过时。Creates a skill prompt provider.AgentSkillPromptProvider(io.agentscope.core.skill.SkillRegistry registry, String instruction) 已过时。Creates a skill prompt provider with custom instruction. -
方法概要
修饰符和类型方法说明已过时。Gets the skill system prompt for the agent with all skills included.getSkillSystemPrompt(SkillFilter filter) 已过时。Gets the skill system prompt filtered by the givenSkillFilter.voidsetCodeExecutionEnable(boolean codeExecutionEnabled) 已过时。Sets whether code execution instructions are included in the skill system prompt.voidsetCodeExecutionInstruction(String codeExecutionInstruction) 已过时。Sets a custom code execution instruction template.voidsetExposeAllMetadata(boolean exposeAllMetadata) 已过时。Sets whether all metadata fields are exposed to the LLM.voidsetUploadDir(Path uploadDir) 已过时。Sets the upload directory whose absolute path replaces every%splaceholder in the code execution instruction template.
-
字段详细资料
-
DEFAULT_AGENT_SKILL_INSTRUCTION
已过时。- 另请参阅:
-
DEFAULT_CODE_EXECUTION_INSTRUCTION
已过时。- 另请参阅:
-
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 skillsinstruction- Custom instruction header (null or blank uses default)
-
-
方法详细资料
-
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
已过时。Gets the skill system prompt filtered by the givenSkillFilter.- 参数:
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-trueto append code execution instructions
-
setUploadDir
已过时。Sets the upload directory whose absolute path replaces every%splaceholder in the code execution instruction template.- 参数:
uploadDir- the upload directory path, ornullto disable path substitution
-
setCodeExecutionInstruction
已过时。Sets a custom code execution instruction template.Every
%splaceholder in the template will be replaced with theuploadDirabsolute path. Passnullor blank to fall back toDEFAULT_CODE_EXECUTION_INSTRUCTION.- 参数:
codeExecutionInstruction- the custom template, ornull/blank for default
-
setExposeAllMetadata
public void setExposeAllMetadata(boolean exposeAllMetadata) 已过时。Sets whether all metadata fields are exposed to the LLM.When disabled, only
name,description, andskill-idare rendered into the skill prompt.- 参数:
exposeAllMetadata-trueto expose all metadata,falseto expose only the core fields
-