AS AgentScopeAPI 手册 / API Reference

SkillCuratorMiddleware

public class SkillCuratorMiddleware implements HarnessRuntimeMiddleware
源码Source io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:36–101

技能 Curator 中间件,在智能体执行流程中提供横切扩展。位于 io.agentscope.harness.agent.middleware 包,实现 HarnessRuntimeMiddleware。核心成员包括 onAgent、close、curator、SkillCuratorMiddleware。

Schedules SkillCurator runs after the main call() completes. Gates on the curator's interval + PeriodicGate, and runs on a single-thread daemon executor so the agent loop is never blocked.

构造器摘要Constructor Summary

构造器Constructor说明Description
public SkillCuratorMiddleware(SkillCurator curator)
初始化 `SkillCuratorMiddleware` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Flux<AgentEvent> onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, Flux<AgentEvent>> next)
处理智能体事件。
Performs the on agent operation.
public void close()
关闭连接并释放相关资源。
Stop accepting new background work; idempotent.
public SkillCurator curator()
返回 `curator` 结果。
Direct access to the underlying curator (for `agent.runCuratorOnce`).

构造器详情Constructor Detail

SkillCuratorMiddleware

public SkillCuratorMiddleware(SkillCurator curator)

初始化 SkillCuratorMiddleware 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
curatorSkillCuratorcurator(类型 `SkillCurator`)。The curator.
源码Source io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:44–53

方法详情Method Detail

onAgent

public Flux<AgentEvent> onAgent(Agent agent, RuntimeContext ctx, AgentInput input, Function<AgentInput, Flux<AgentEvent>> next)

处理智能体事件。

Performs the on agent operation.

参数Parameters
名称Name类型Type说明Description
agentAgent智能体(类型 `Agent`)。The agent.
ctxRuntimeContext运行时上下文(类型 `RuntimeContext`)。The ctx.
inputAgentInput输入消息(类型 `AgentInput`)。The input.
nextFunction<AgentInput, Flux<AgentEvent>>下一个(类型 `Function >`)。The next.
返回Returns Flux<AgentEvent>
返回Flux。Returns flux.
源码Source io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:55–62

close

public void close()

关闭连接并释放相关资源。

Stop accepting new background work; idempotent.

源码Source io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:92–95

curator

public SkillCurator curator()

返回 curator 结果。

Direct access to the underlying curator (for agent.runCuratorOnce).

返回Returns SkillCurator
返回SkillCurator。Returns skill curator.
源码Source io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:98–100

继承成员Inherited Members

基于官方固定版本源码静态生成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.