Package io.agentscope.harness.agent.tool
Class SkillManageTool
java.lang.Object
io.agentscope.harness.agent.tool.SkillManageTool
- All Implemented Interfaces:
io.agentscope.core.tool.AgentTool
Agent-callable tool that lets a
ReActAgent create, edit, patch, and archive skills in
its workspace. Ported from the hermes-agent skill_manage tool surface so existing skill
authoring prompts stay portable.
Six actions, dispatched on the action parameter:
create— write a brand-newSKILL.md(frontmatter required)edit— full-rewrite theSKILL.mdof an existing skillpatch— targeted find-and-replace withinSKILL.mdor a support filewrite_file— add/overwrite a single file underreferences//templates//scripts//assets/remove_file— delete a single support filedelete— archive the entire skill directory (non-destructive)
Staging: by default (SkillManageConfig.autoPromote() = false), create
writes to skills/_drafts/<name>/; edit/patch/write_file/
remove_file/delete resolve the skill by name across both draft and main directories
(drafts win on collision). Set autoPromote=true to write straight to skills/.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSkillManageTool(WorkspaceSkillRepository mainRepo, WorkspaceSkillRepository draftsRepo, SkillManageConfig config) SkillManageTool(WorkspaceSkillRepository mainRepo, WorkspaceSkillRepository draftsRepo, SkillManageConfig config, SkillUsageStore usageStore) SkillManageTool(WorkspaceSkillRepository mainRepo, WorkspaceSkillRepository draftsRepo, SkillManageConfig config, SkillUsageStore usageStore, SkillAuditLog auditLog) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.agentscope.core.tool.AgentTool
getOutputSchema, getStrict, isReadOnly
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
SkillManageTool
public SkillManageTool(WorkspaceSkillRepository mainRepo, WorkspaceSkillRepository draftsRepo, SkillManageConfig config) -
SkillManageTool
public SkillManageTool(WorkspaceSkillRepository mainRepo, WorkspaceSkillRepository draftsRepo, SkillManageConfig config, SkillUsageStore usageStore) -
SkillManageTool
public SkillManageTool(WorkspaceSkillRepository mainRepo, WorkspaceSkillRepository draftsRepo, SkillManageConfig config, SkillUsageStore usageStore, SkillAuditLog auditLog)
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceio.agentscope.core.tool.AgentTool
-
getDescription
- Specified by:
getDescriptionin interfaceio.agentscope.core.tool.AgentTool
-
getParameters
- Specified by:
getParametersin interfaceio.agentscope.core.tool.AgentTool
-
callAsync
public reactor.core.publisher.Mono<io.agentscope.core.message.ToolResultBlock> callAsync(io.agentscope.core.tool.ToolCallParam param) - Specified by:
callAsyncin interfaceio.agentscope.core.tool.AgentTool
-