AS AgentScopeAPI 手册 / API Reference

RemoteSubagentStub

public final class RemoteSubagentStub extends AgentBase
源码Source io/agentscope/harness/agent/subagent/RemoteSubagentStub.java:31–54

远程子智能体存根,支持智能体之间的发现、委派与协作。位于 io.agentscope.harness.agent.subagent 包,继承自 AgentBase。核心成员包括 doCall、handleInterrupt、RemoteSubagentStub。

Placeholder io.agentscope.core.agent.Agent for remote (SubagentDeclaration) subagents. Execution is delegated to a remote task HTTP server; this instance is only used for registry bookkeeping and should not receive synchronous invokeAgent calls in normal async flows.

构造器摘要Constructor Summary

构造器Constructor说明Description
public RemoteSubagentStub(String name, String description)
初始化 `RemoteSubagentStub` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
protected Mono<Msg> doCall(List<Msg> msgs)
执行调用操作。
Performs the do call operation.
protected Mono<Msg> handleInterrupt(InterruptContext context, Msg... originalArgs)
处理中断。
Performs the handle interrupt operation.

构造器详情Constructor Detail

RemoteSubagentStub

public RemoteSubagentStub(String name, String description)

初始化 RemoteSubagentStub 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
nameString名称(类型 `String`)。The name.
descriptionString描述(类型 `String`)。The description.
源码Source io/agentscope/harness/agent/subagent/RemoteSubagentStub.java:33–35

方法详情Method Detail

doCall

protected Mono<Msg> doCall(List<Msg> msgs)

执行调用操作。

Performs the do call operation.

参数Parameters
名称Name类型Type说明Description
msgsList<Msg>消息列表(类型 `List`)。The msgs.
返回Returns Mono<Msg>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/subagent/RemoteSubagentStub.java:37–48

handleInterrupt

protected Mono<Msg> handleInterrupt(InterruptContext context, Msg... originalArgs)

处理中断。

Performs the handle interrupt operation.

参数Parameters
名称Name类型Type说明Description
contextInterruptContext上下文(类型 `InterruptContext`)。The context.
originalArgs varargsMsg...original 参数(类型 `Msg...`)。The original args.
返回Returns Mono<Msg>
返回Mono。Returns mono.
源码Source io/agentscope/harness/agent/subagent/RemoteSubagentStub.java:50–53

继承成员Inherited Members

继承自Methods inherited from Agent
继承自Methods inherited from CallableAgent
继承自Methods inherited from StreamableAgent
基于官方固定版本源码静态生成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.