RouteResult
public record RouteResult( String agentId, MsgContext context, String matchedBy, OutboundAddress outboundAddress)
io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35承载路由结果数据的记录类型。位于 io.agentscope.harness.agent.gateway.channel 包。核心成员包括 agentId、context、matchedBy、outboundAddress。
Output of ChannelRouter#resolveRoute: the resolved agent id, the MsgContext to
pass to io.agentscope.harness.agent.gateway.Gateway#run, a diagnostic matchedBy
label indicating which binding tier (or fallback) produced the result, and the OutboundAddress for delivering replies back to the originating channel/peer.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
agentId | String | 已解析目标智能体标识。 the resolved target agent id |
context | MsgContext | 执行上下文相关操作。 the routing context (channel, session scope keys, agentId extra) ready for
gateway execution |
matchedBy | String | 执行 `matchedBy` 方法。 human-readable label of the binding tier that matched (e.g. `"peer"`,
`"guild+roles"`, `"default"`); useful for debugging and logging |
outboundAddress | OutboundAddress | 执行 `outboundAddress` 方法。 delivery target for proactive replies (e.g. subagent announces); derived
from the inbound message's channel and peer metadata |
记录组件详情Record Component Detail
agentId
String agentId已解析目标智能体标识。
the resolved target agent id
io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35context
MsgContext context执行上下文相关操作。
the routing context (channel, session scope keys, agentId extra) ready for gateway execution
io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35matchedBy
String matchedBy执行 matchedBy 方法。
human-readable label of the binding tier that matched (e.g. "peer",
"guild+roles", "default"); useful for debugging and logging
io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35outboundAddress
OutboundAddress outboundAddress执行 outboundAddress 方法。
delivery target for proactive replies (e.g. subagent announces); derived from the inbound message's channel and peer metadata
io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35