AS AgentScopeAPI 手册 / API Reference

SchedulerGateway

@Component public class SchedulerGateway implements Gateway
源码Source io/agentscope/builder/runtime/SchedulerGateway.java:30–66

调度器网关,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime 包,实现 Gateway。核心成员包括 bindMainAgent、run、SchedulerGateway。

Scheduler transport gateway. The control plane owns identity, routing and durable work intake.

构造器摘要Constructor Summary

构造器Constructor说明Description
public SchedulerGateway(io.agentscope.builder.web.managed.ChannelWorkBridge work)
初始化 `SchedulerGateway` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public void bindMainAgent(HarnessAgent agent)
设置该参数。
No-op: the scheduler runs no local agents.
public Mono<Msg> run(MsgContext context, List<Msg> messages)
执行运行相关操作。
Performs the run operation.
public Mono<Msg> run(MsgContext context, List<Msg> messages, OutboundAddress outboundAddress)
执行运行相关操作。
Performs the run operation.
public Mono<Msg> run(MsgContext context, List<Msg> messages, OutboundAddress address, io.agentscope.core.agent.RuntimeContext callerContext, io.agentscope.harness.agent.gateway.channel.InboundMessage inbound)
执行运行相关操作。
Performs the run operation.

构造器详情Constructor Detail

SchedulerGateway

public SchedulerGateway(io.agentscope.builder.web.managed.ChannelWorkBridge work)

初始化 SchedulerGateway 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
workio.agentscope.builder.web.managed.ChannelWorkBridgework(类型 `io.agentscope.builder.web.managed.ChannelWorkBridge`)。The work.
源码Source io/agentscope/builder/runtime/SchedulerGateway.java:37–39

方法详情Method Detail

bindMainAgent

public void bindMainAgent(HarnessAgent agent)

设置该参数。

No-op: the scheduler runs no local agents.

参数Parameters
名称Name类型Type说明Description
agentHarnessAgent智能体(类型 `HarnessAgent`)。The agent.
源码Source io/agentscope/builder/runtime/SchedulerGateway.java:42–45

run

public Mono<Msg> run(MsgContext context, List<Msg> messages)

执行运行相关操作。

Performs the run operation.

参数Parameters
名称Name类型Type说明Description
contextMsgContext上下文(类型 `MsgContext`)。The context.
messagesList<Msg>消息列表(类型 `List`)。The messages.
返回Returns Mono<Msg>
返回Mono。Returns mono.
源码Source io/agentscope/builder/runtime/SchedulerGateway.java:47–50

run

public Mono<Msg> run(MsgContext context, List<Msg> messages, OutboundAddress outboundAddress)

执行运行相关操作。

Performs the run operation.

参数Parameters
名称Name类型Type说明Description
contextMsgContext上下文(类型 `MsgContext`)。The context.
messagesList<Msg>消息列表(类型 `List`)。The messages.
outboundAddressOutboundAddress出站 Address(类型 `OutboundAddress`)。The outbound address.
返回Returns Mono<Msg>
返回Mono。Returns mono.
源码Source io/agentscope/builder/runtime/SchedulerGateway.java:52–55

run

public Mono<Msg> run(MsgContext context, List<Msg> messages, OutboundAddress address, io.agentscope.core.agent.RuntimeContext callerContext, io.agentscope.harness.agent.gateway.channel.InboundMessage inbound)

执行运行相关操作。

Performs the run operation.

参数Parameters
名称Name类型Type说明Description
contextMsgContext上下文(类型 `MsgContext`)。The context.
messagesList<Msg>消息列表(类型 `List`)。The messages.
addressOutboundAddressaddress(类型 `OutboundAddress`)。The address.
callerContextio.agentscope.core.agent.RuntimeContextcaller 上下文(类型 `io.agentscope.core.agent.RuntimeContext`)。The caller context.
inboundio.agentscope.harness.agent.gateway.channel.InboundMessage入站(类型 `io.agentscope.harness.agent.gateway.channel.InboundMessage`)。The inbound.
返回Returns Mono<Msg>
返回Mono。Returns mono.
源码Source io/agentscope/builder/runtime/SchedulerGateway.java:57–65

继承成员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.