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 |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
description | String | 描述(类型 `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 |
|---|---|---|
msgs | List<Msg> | 消息列表(类型 `List`)。The msgs. |
Mono<Msg>返回Mono。Returns mono.
源码Source
io/agentscope/harness/agent/subagent/RemoteSubagentStub.java:37–48handleInterrupt
protected Mono<Msg> handleInterrupt(InterruptContext context, Msg... originalArgs)
处理中断。
Performs the handle interrupt operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
context | InterruptContext | 上下文(类型 `InterruptContext`)。The context. |
originalArgs varargs | Msg... | original 参数(类型 `Msg...`)。The original args. |
Mono<Msg>返回Mono。Returns mono.
源码Source
io/agentscope/harness/agent/subagent/RemoteSubagentStub.java:50–53继承成员Inherited Members
AgentBasegetAgentId, getName, getDescription, isCheckRunning, call, callInternal, interruptRunning, runLifecycle, callSerializationKey, call, call, doCall, doCall, addSystemHook, removeSystemHook, interrupt, interrupt, interrupt, checkInterruptedAsync, resetInterruptFlag, getInterruptFlag, getInterruptSource, doObserve, getAgentState, beforeAgentExecution, afterAgentExecution, getHooks, addHook, removeHook, getSortedHooks, seedSystemMsg, stateForCall, consumeSystemMsgAfterPreCall, removeSubscribers, resetSubscribers, hasSubscribers, getSubscriberCount, observe, observe, stream, stream, stream, toString, CALL_SCOPE_KEY, RUNTIME_CONTEXT_KEY, SHUTDOWN_REQUEST_ID_KEY