Class SkillCurator

java.lang.Object
io.agentscope.harness.agent.skill.curator.SkillCurator

public class SkillCurator extends Object
Background skill maintenance orchestrator. Mirrors hermes-agent's agent/curator.py lifecycle:
  • Pure-function applyAutomaticTransitions: walk every agent-tracked skill, transition ACTIVE → STALE → ARCHIVED based 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_ONLY mode (default) it does not call skill_manage, just writes the report. Live consolidation (actually invoking skill_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.
  • DRAFT state is owned by the promotion gate, not the curator.
  • Field Details

  • Constructor Details

  • Method Details

    • config

      public SkillCuratorConfig config()
    • loadState

      public SkillCuratorState loadState()
    • saveState

      public void saveState(SkillCuratorState state)
    • isPaused

      public boolean isPaused()
    • setPaused

      public void setPaused(boolean paused)
    • shouldRunNow

      public boolean shouldRunNow(Instant now)
      Interval + periodic-gate. Returns true iff the curator should fire now: enabled, not paused, last_run_at older than intervalHours, and the injected PeriodicGate grants the claim. First-run behaviour seeds last_run_at without firing — a fresh deployment doesn't get LLM'd until at least one interval has elapsed.
    • applyAutomaticTransitions

      public SkillCurator.TransitionCounts applyAutomaticTransitions(Instant now)
    • runUmbrellaDryRunReport

      public String runUmbrellaDryRunReport(Instant now)
      Generate a human-readable markdown report listing every agent-created skill grouped by common name prefix. This is a stub for the LLM-powered umbrella consolidation pass: the prompt + LLM call require an auxiliary model and are deferred to a future version. In DRY_RUN_ONLY mode this method writes a report to skills/.curator_reports/<ts>/REPORT.md; in DISABLED mode it returns null without writing.
      Returns:
      path of the report relative to the workspace, or null when disabled
    • runOnce

      public SkillCurator.CuratorRunReport runOnce(Instant now)
      Run a full curator pass: phase-1 transitions + phase-2 (dry-run) report.