AS AgentScopeAPI 手册 / API Reference

SkillCatalog

public final class SkillCatalog
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:30–75

技能目录,让智能体以受控方式调用外部能力。位于 io.agentscope.harness.agent.skill.runtime 包。核心成员包括 empty、of、get、all、ids、isEmpty。

Immutable snapshot of the skills visible to a single onSystemPrompt pass.

Keyed by skillId (the AgentSkill's name + "_" + source), insertion-order preserved so the prompt renders skills in compose order.

方法摘要Method Summary

方法Method说明Description
public static SkillCatalog empty()
static
返回 `empty` 结果。
Returns the empty.
public static SkillCatalog of(List<HarnessSkillEntry> orderedEntries)
static
创建并返回实例。
Creates and returns an instance.
public HarnessSkillEntry get(String skillId)
按条件读取数据。
Lookup by `skillId` (name_source).
public Collection<HarnessSkillEntry> all()
返回所有。
All entries in compose order (low-to-high priority).
public List<String> ids()
返回 `ids` 结果。
All skillIds, in compose order.
public boolean isEmpty()
判断是否 `isEmpty`。
Returns whether the empty.
public int size()
返回大小。
Returns the size.

方法详情Method Detail

empty

public static SkillCatalog empty()
static

返回 empty 结果。

Returns the empty.

返回Returns SkillCatalog
返回SkillCatalog。Returns skill catalog.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:38–40

of

public static SkillCatalog of(List<HarnessSkillEntry> orderedEntries)
static

创建并返回实例。

Creates and returns an instance.

参数Parameters
名称Name类型Type说明Description
orderedEntriesList<HarnessSkillEntry>ordered 条目(类型 `List`)。The ordered entries.
返回Returns SkillCatalog
返回SkillCatalog。Returns skill catalog.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:42–51

get

public HarnessSkillEntry get(String skillId)

按条件读取数据。

Lookup by skillId (name_source).

参数Parameters
名称Name类型Type说明Description
skillIdString技能标识(类型 `String`)。The skill id.
返回Returns HarnessSkillEntry
返回HarnessSkillEntry。Returns harness skill entry.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:54–56

all

public Collection<HarnessSkillEntry> all()

返回所有。

All entries in compose order (low-to-high priority).

返回Returns Collection<HarnessSkillEntry>
返回集合。Returns collection.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:59–61

ids

public List<String> ids()

返回 ids 结果。

All skillIds, in compose order.

返回Returns List<String>
返回列出。Returns list.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:64–66

isEmpty

public boolean isEmpty()

判断是否 isEmpty。

Returns whether the empty.

返回Returns boolean
返回布尔值,表示判断结果。Returns a boolean result.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:68–70

size

public int size()

返回大小。

Returns the size.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/harness/agent/skill/runtime/SkillCatalog.java:72–74
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.