AS AgentScopeAPI 手册 / API Reference

RouteResult

public record RouteResult( String agentId, MsgContext context, String matchedBy, OutboundAddress outboundAddress)
源码Source 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
agentIdString
已解析目标智能体标识。
the resolved target agent id
contextMsgContext
执行上下文相关操作。
the routing context (channel, session scope keys, agentId extra) ready for gateway execution
matchedByString
执行 `matchedBy` 方法。
human-readable label of the binding tier that matched (e.g. `"peer"`, `"guild+roles"`, `"default"`); useful for debugging and logging
outboundAddressOutboundAddress
执行 `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

源码Source io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35

context

MsgContext context

执行上下文相关操作。

the routing context (channel, session scope keys, agentId extra) ready for gateway execution

源码Source io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35

matchedBy

String matchedBy

执行 matchedBy 方法。

human-readable label of the binding tier that matched (e.g. "peer", "guild+roles", "default"); useful for debugging and logging

源码Source io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35

outboundAddress

OutboundAddress outboundAddress

执行 outboundAddress 方法。

delivery target for proactive replies (e.g. subagent announces); derived from the inbound message's channel and peer metadata

源码Source io/agentscope/harness/agent/gateway/channel/RouteResult.java:34–35
基于官方固定版本源码静态生成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.