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 |
|---|---|---|
curator | SkillCurator | curator(类型 `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 |
|---|---|---|
agent | Agent | 智能体(类型 `Agent`)。The agent. |
ctx | RuntimeContext | 运行时上下文(类型 `RuntimeContext`)。The ctx. |
input | AgentInput | 输入消息(类型 `AgentInput`)。The input. |
next | Function<AgentInput, Flux<AgentEvent>> | 下一个(类型 `Function >`)。The next. |
Flux<AgentEvent>返回Flux。Returns flux.
源码Source
io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:55–62close
public void close()
关闭连接并释放相关资源。
Stop accepting new background work; idempotent.
源码Source
io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:92–95curator
public SkillCurator curator()
返回 curator 结果。
Direct access to the underlying curator (for agent.runCuratorOnce).
SkillCurator返回SkillCurator。Returns skill curator.
源码Source
io/agentscope/harness/agent/middleware/SkillCuratorMiddleware.java:98–100