Class AbstractAgentCreatedFilter

java.lang.Object
io.agentscope.harness.agent.skill.curator.AbstractAgentCreatedFilter
All Implemented Interfaces:
SkillVisibilityFilter
Direct Known Subclasses:
AllowListFilter, CanaryFilter

public abstract class AbstractAgentCreatedFilter extends Object implements SkillVisibilityFilter
Base class for visibility filters that should ONLY constrain agent-authored skills. User- authored / hub-installed / pre-existing skills (those with createdBy == null in the sidecar) pass through untouched, so a CanaryFilter doesn't accidentally hide the hand-crafted skills the agent's owners shipped.

Subclasses implement shouldPassForAgentCreated(io.agentscope.core.skill.AgentSkill, io.agentscope.harness.agent.skill.curator.SkillUsageRecord, io.agentscope.core.agent.RuntimeContext) for the agent-tracked skills.

  • Field Details

  • Constructor Details

    • AbstractAgentCreatedFilter

      protected AbstractAgentCreatedFilter(SkillUsageStore usageStore)
  • Method Details

    • filter

      public final List<io.agentscope.core.skill.AgentSkill> filter(List<io.agentscope.core.skill.AgentSkill> all, io.agentscope.core.agent.RuntimeContext ctx)
      Description copied from interface: SkillVisibilityFilter
      Filter the skill list down to those visible for the current runtime context.
      Specified by:
      filter in interface SkillVisibilityFilter
    • shouldPassForAgentCreated

      protected abstract boolean shouldPassForAgentCreated(io.agentscope.core.skill.AgentSkill skill, SkillUsageRecord rec, io.agentscope.core.agent.RuntimeContext ctx)
      Return true to keep an agent-authored skill visible for this context, false to filter it out. rec is guaranteed non-null with createdBy == "agent".