SkillLoadTool
@SuppressWarnings("deprecation") public final class SkillLoadTool implements AgentTool
io/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:54–317技能加载工具,封装可被智能体调用的能力。位于 io.agentscope.harness.agent.skill.runtime 包,实现 AgentTool。核心成员包括 isReadOnly、getName、getDescription、getParameters、callAsync、SkillLoadTool。
The harness-native load_skill_through_path AgentTool.
Query order for any path other than SKILL.md:
-
skill.getResources().get(path)— in-memory map (Layer 1/3 host repositories and marketplace repositories that preload everything) -
entry.lazyResources().read(path)— filesystem fallback for sources that implementio.agentscope.harness.agent.skill.LazyResourceCapable(e.g.WorkspaceSkillRepository) -
Not found → error with a deduped enumeration of
SKILL.md+ in-memory keys + lazy listing
The registered tool resolves the filtered catalog from each tool call's RuntimeContext (ToolCallParam#getRuntimeContext()), keeping concurrent calls and
sessions isolated without re-registering the tool. A legacy catalog reference is consulted only
for deprecated callers that invoke the tool without any RuntimeContext.
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
TOOL_NAMEstaticfinal | String | 工具名称字段。 The TOOL NAME field. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public SkillLoadTool() | 初始化 `SkillLoadTool` 实例。 Creates a context-scoped loader with an empty context-free compatibility catalog. |
public SkillLoadTool(AtomicReference<SkillCatalog> catalogRef)deprecated | 初始化 `SkillLoadTool` 实例。 Creates a loader backed by a legacy context-free catalog reference. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public boolean isReadOnly() | 判断是否 `isReadOnly`。 Returns whether the read only. |
public String getName() | 获取名称。 Returns the name. |
public String getDescription() | 获取 `getDescription`。 Returns the description. |
public Map<String, Object> getParameters() | 获取参数。 Returns the parameters. |
public Mono<ToolResultBlock> callAsync(ToolCallParam param) | 调用异步。 Calls the async. |
字段详情Field Detail
TOOL_NAME
public static final String TOOL_NAME
工具名称字段。声明为 public static final String TOOL_NAME。
The TOOL NAME field.
io/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:57构造器详情Constructor Detail
SkillLoadTool
public SkillLoadTool()
初始化 SkillLoadTool 实例。
Creates a context-scoped loader with an empty context-free compatibility catalog.
io/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:66–68SkillLoadTool
public SkillLoadTool(AtomicReference<SkillCatalog> catalogRef)
初始化 SkillLoadTool 实例。
Creates a loader backed by a legacy context-free catalog reference.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
catalogRef | AtomicReference<SkillCatalog> | 目录引用(类型 `AtomicReference`)。The catalog ref. |
io/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:81–84方法详情Method Detail
isReadOnly
public boolean isReadOnly()
判断是否 isReadOnly。
Returns whether the read only.
booleanio/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:95–98getName
public String getName()
获取名称。
Returns the name.
Stringio/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:100–103getDescription
public String getDescription()
获取 getDescription。
Returns the description.
Stringio/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:105–114getParameters
public Map<String, Object> getParameters()
获取参数。
Returns the parameters.
Map<String, Object>io/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:116–153callAsync
public Mono<ToolResultBlock> callAsync(ToolCallParam param)
调用异步。
Calls the async.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
param | ToolCallParam | 参数(类型 `ToolCallParam`)。The param. |
Mono<ToolResultBlock>io/agentscope/harness/agent/skill/runtime/SkillLoadTool.java:155–185