SkillCurator
public class SkillCurator
io/agentscope/harness/agent/skill/curator/SkillCurator.java:59–364技能 Curator,让智能体以受控方式调用外部能力。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 config、loadState、saveState、isPaused、setPaused、shouldRunNow。
Background skill maintenance orchestrator. Mirrors hermes-agent's agent/curator.py
lifecycle:
-
Pure-function
applyAutomaticTransitions: walk every agent-tracked skill, transitionACTIVE → STALE → ARCHIVEDbased on the latest activity timestamp from the sidecar. Pinned + DRAFT skills are skipped. -
LLM umbrella pass: produces a markdown report of consolidation candidates; in
DRY_RUN_ONLYmode (default) it does not callskill_manage, just writes the report. Live consolidation (actually invokingskill_manage) is not implemented yet.
Strict invariants:
-
Only touches sidecar entries with
createdBy != null(agent-authored skills). -
Pinned skills bypass every auto-transition.
-
Never deletes — only archives.
-
DRAFTstate is owned by the promotion gate, not the curator.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
TransitionCounts | 记录record | 承载 Transition Counts数据的记录类型。 A record in io.agentscope.harness.agent.skill.curator that carries data used when components lets agents invoke external capabilities under control. |
CuratorRunReport | 记录record | 承载 Curator 运行报告数据的记录类型。 A record in io.agentscope.harness.agent.skill.curator that carries data used when components lets agents invoke external capabilities under control. |
字段摘要Field Summary
| 字段Field | 类型Type | 说明Description |
|---|---|---|
STATE_PATHstaticfinal | String | 状态路径字段。 The STATE PATH field. |
REPORTS_DIRstaticfinal | String | REPORTS 目录字段。 The REPORTS DIR field. |
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public SkillCuratorConfig config() | 返回配置。 Returns the config. |
public SkillCuratorState loadState() | 加载状态。 Loads the state. |
public void saveState(SkillCuratorState state) | 保存状态。 Saves the state. |
public boolean isPaused() | 判断是否 `isPaused`。 Returns whether the paused. |
public void setPaused(boolean paused) | 设置 `setPaused`。 Sets the paused. |
public boolean shouldRunNow(Instant now) | 设置应当运行当前时间。 Interval + periodic-gate. |
public TransitionCounts applyAutomaticTransitions(Instant now) | 应用 `applyAutomaticTransitions`。 Performs the apply automatic transitions operation. |
public String runUmbrellaDryRunReport(Instant now) | 运行 `runUmbrellaDryRunReport`。 Generate a human-readable markdown report listing every agent-created skill grouped by
common name prefix. |
public CuratorRunReport runOnce(Instant now) | 运行 `runOnce`。 Run a full curator pass: phase-1 transitions + phase-2 (dry-run) report. |
字段详情Field Detail
STATE_PATH
public static final String STATE_PATH
状态路径字段。声明为 public static final String STATE_PATH。
The STATE PATH field.
io/agentscope/harness/agent/skill/curator/SkillCurator.java:63REPORTS_DIR
public static final String REPORTS_DIR
REPORTS 目录字段。声明为 public static final String REPORTS_DIR。
The REPORTS DIR field.
io/agentscope/harness/agent/skill/curator/SkillCurator.java:64构造器详情Constructor Detail
SkillCurator
public SkillCurator(AbstractFilesystem filesystem, SkillUsageStore usageStore, WorkspaceSkillRepository mainRepo, SkillCuratorConfig config)
初始化 SkillCurator 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
filesystem | AbstractFilesystem | 文件系统(类型 `AbstractFilesystem`)。The filesystem. |
usageStore | SkillUsageStore | 用量存储(类型 `SkillUsageStore`)。The usage store. |
mainRepo | WorkspaceSkillRepository | 主仓库(类型 `WorkspaceSkillRepository`)。The main repo. |
config | SkillCuratorConfig | 配置对象(类型 `SkillCuratorConfig`)。The config. |
io/agentscope/harness/agent/skill/curator/SkillCurator.java:79–85SkillCurator
public SkillCurator(AbstractFilesystem filesystem, SkillUsageStore usageStore, WorkspaceSkillRepository mainRepo, SkillCuratorConfig config, PeriodicGate periodicGate)
初始化 SkillCurator 实例。
Creates a new instance.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
filesystem | AbstractFilesystem | 文件系统(类型 `AbstractFilesystem`)。The filesystem. |
usageStore | SkillUsageStore | 用量存储(类型 `SkillUsageStore`)。The usage store. |
mainRepo | WorkspaceSkillRepository | 主仓库(类型 `WorkspaceSkillRepository`)。The main repo. |
config | SkillCuratorConfig | 配置对象(类型 `SkillCuratorConfig`)。The config. |
periodicGate | PeriodicGate | periodic Gate(类型 `PeriodicGate`)。The periodic gate. |
io/agentscope/harness/agent/skill/curator/SkillCurator.java:87–98方法详情Method Detail
config
public SkillCuratorConfig config()
返回配置。
Returns the config.
SkillCuratorConfigio/agentscope/harness/agent/skill/curator/SkillCurator.java:100–102loadState
public SkillCuratorState loadState()
加载状态。
Loads the state.
SkillCuratorStateio/agentscope/harness/agent/skill/curator/SkillCurator.java:108–121saveState
public void saveState(SkillCuratorState state)
保存状态。
Saves the state.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
state | SkillCuratorState | 状态对象(类型 `SkillCuratorState`)。The state. |
io/agentscope/harness/agent/skill/curator/SkillCurator.java:123–134isPaused
public boolean isPaused()
判断是否 isPaused。
Returns whether the paused.
booleanio/agentscope/harness/agent/skill/curator/SkillCurator.java:136–138setPaused
public void setPaused(boolean paused)
设置 setPaused。
Sets the paused.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
paused | boolean | paused(类型 `boolean`)。The paused. |
io/agentscope/harness/agent/skill/curator/SkillCurator.java:140–150shouldRunNow
public boolean shouldRunNow(Instant now)
设置应当运行当前时间。
Interval + periodic-gate.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
now | Instant | 当前时间(类型 `Instant`)。The now. |
booleanio/agentscope/harness/agent/skill/curator/SkillCurator.java:159–185applyAutomaticTransitions
public TransitionCounts applyAutomaticTransitions(Instant now)
应用 applyAutomaticTransitions。
Performs the apply automatic transitions operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
now | Instant | 当前时间(类型 `Instant`)。The now. |
TransitionCountsio/agentscope/harness/agent/skill/curator/SkillCurator.java:193–242runUmbrellaDryRunReport
public String runUmbrellaDryRunReport(Instant now)
运行 runUmbrellaDryRunReport。
Generate a human-readable markdown report listing every agent-created skill grouped by common name prefix.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
now | Instant | 当前时间(类型 `Instant`)。The now. |
Stringio/agentscope/harness/agent/skill/curator/SkillCurator.java:258–324runOnce
public CuratorRunReport runOnce(Instant now)
运行 runOnce。
Run a full curator pass: phase-1 transitions + phase-2 (dry-run) report.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
now | Instant | 当前时间(类型 `Instant`)。The now. |
CuratorRunReportio/agentscope/harness/agent/skill/curator/SkillCurator.java:337–363嵌套类详情Nested Class Detail
TransitionCounts
public record TransitionCounts(int checked, int markedStale, int archived, int reactivated)承载 Transition Counts数据的记录类型。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 checked、markedStale、archived、reactivated。
A record in io.agentscope.harness.agent.skill.curator that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.harness.agent.skill.curator.
CuratorRunReport
public record CuratorRunReport( TransitionCounts transitions, String dryRunReportPath, Instant ranAt, long durationMs)承载 Curator 运行报告数据的记录类型。位于 io.agentscope.harness.agent.skill.curator 包。核心成员包括 transitions、dryRunReportPath、ranAt、durationMs。
A record in io.agentscope.harness.agent.skill.curator that carries data used when components lets agents invoke external capabilities under control. Declared in io.agentscope.harness.agent.skill.curator.