Class SkillUsageMiddleware
java.lang.Object
io.agentscope.harness.agent.middleware.SkillUsageMiddleware
- All Implemented Interfaces:
io.agentscope.core.middleware.MiddlewareBase,HarnessRuntimeMiddleware
Bumps
SkillUsageStore counters whenever the agent invokes a SkillBox-registered skill
loader (e.g. load_skill_through_path). Provenance gating happens inside the store —
only skills tagged created_by="agent" or "agent-draft" are recorded.
Counter bumping is best-effort and runs eagerly when onActing is entered (before
the actual tool call returns). The semantics are "the model decided to invoke this skill on
this turn" — not "the call succeeded". This matches hermes-agent's telemetry shape and is
cheap to compute.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionreactor.core.publisher.Flux<io.agentscope.core.event.AgentEvent>onActing(io.agentscope.core.agent.Agent agent, io.agentscope.core.agent.RuntimeContext ctx, io.agentscope.core.middleware.ActingInput input, Function<io.agentscope.core.middleware.ActingInput, reactor.core.publisher.Flux<io.agentscope.core.event.AgentEvent>> next) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.agentscope.core.middleware.MiddlewareBase
onAgent, onModelCall, onReasoning, onSystemPrompt, order
-
Constructor Details
-
SkillUsageMiddleware
-
-
Method Details
-
onActing
public reactor.core.publisher.Flux<io.agentscope.core.event.AgentEvent> onActing(io.agentscope.core.agent.Agent agent, io.agentscope.core.agent.RuntimeContext ctx, io.agentscope.core.middleware.ActingInput input, Function<io.agentscope.core.middleware.ActingInput, reactor.core.publisher.Flux<io.agentscope.core.event.AgentEvent>> next) - Specified by:
onActingin interfaceio.agentscope.core.middleware.MiddlewareBase
-