SubagentGatewayBridge
@FunctionalInterface public interface SubagentGatewayBridge
源码Source
io/agentscope/harness/agent/gateway/SubagentGatewayBridge.java:29–50定义子智能体网关 Bridge契约的接口。位于 io.agentscope.harness.agent.gateway 包。核心成员包括 expose。
Bridge between io.agentscope.harness.agent.tool.AgentSpawnTool and the gateway layer.
Allows spawned subagents to be exposed as user-addressable entry points without the spawn tool
needing to know about channels, routers, or the gateway implementation.
When a subagent is exposed, the gateway assigns it a subagentId that the user can
use to send messages directly to that subagent, bypassing normal binding-based routing.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
ExposeResult | 记录record | 承载 Expose 结果数据的记录类型。 Result of exposing a subagent to the user. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public ExposeResult expose(String agentId, String sessionId, Agent agent, OutboundAddress replyTo) | 执行 `expose` 方法。 Exposes a spawned subagent as a user-addressable entry point in the gateway. |
方法详情Method Detail
expose
public ExposeResult expose(String agentId, String sessionId, Agent agent, OutboundAddress replyTo)
执行 expose 方法。
Exposes a spawned subagent as a user-addressable entry point in the gateway.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentId | String | 智能体标识(类型 `String`)。the subagent type identifier |
sessionId | String | 会话标识(类型 `String`)。the session id assigned to the subagent |
agent | Agent | 智能体实例。the agent instance |
replyTo | OutboundAddress | 回复到(类型 `OutboundAddress`)。the outbound address for delivering replies back to the user's channel; may be null if no outbound channel context is available |
ExposeResult返回ExposeResult。the expose result containing the subagentId handle
源码Source
io/agentscope/harness/agent/gateway/SubagentGatewayBridge.java:49嵌套类详情Nested Class Detail
ExposeResult
record ExposeResult(String subagentId)承载 Expose 结果数据的记录类型。位于 io.agentscope.harness.agent.gateway 包。核心成员包括 subagentId。
Result of exposing a subagent to the user.