OutboundRequest
@JsonIgnoreProperties(ignoreUnknown = true) public record OutboundRequest( String channelId, String peerKind, String peerId, String accountId, String threadId, String text, String markdown, String agentId)
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63承载出站请求数据的记录类型。位于 io.agentscope.builder.runtime.outbound 包。核心成员包括 channelId、peerKind、peerId、accountId、threadId、text。
Agent-initiated outbound message request.
A request describes where the message should be delivered (channel + peer kind +
peer id, plus optional account/thread context) and what the message says (text or
markdown). The OutboundService translates this into a io.agentscope.harness.agent.gateway.channel.OutboundAddress and delegates to the matching channel.
记录组件摘要Record Component Summary
| 组件Component | 类型Type | 说明Description |
|---|---|---|
channelId | String | 执行渠道标识相关操作。 target channel id (must match a registered `io.agentscope.harness.agent.gateway.channel.Channel`); required |
peerKind | String | 执行对端种类相关操作。 one of `DIRECT`, `CHANNEL`, `GROUP`, `THREAD`; required |
peerId | String | 执行对端标识相关操作。 provider-specific peer id (user id, group/conversation id, ...); required |
accountId | String | 执行 `accountId` 方法。 optional multi-account dimension (corp id, app instance); nullable |
threadId | String | 执行会话线程标识相关操作。 optional thread anchor for threaded replies; nullable |
text | String | 执行文本相关操作。 plain-text message body; either `text` or `markdown` must be set |
markdown | String | 执行 `markdown` 方法。 markdown message body; either `text` or `markdown` must be set |
agentId | String | 执行智能体标识相关操作。 optional caller-supplied agent id. When set, the service verifies that the
channel's routing for `peerId` resolves to the same agent and refuses delivery
otherwise. Use this to prevent one agent from posting into a channel/peer that is bound to
a different agent. Skipped when `null` or blank. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public OutboundRequest(String channelId, String peerKind, String peerId, String accountId, String threadId, String text, String markdown) | 初始化 `OutboundRequest` 实例。 Convenience constructor without `agentId` (no caller-side routing check). |
记录组件详情Record Component Detail
channelId
String channelId执行渠道标识相关操作。
target channel id (must match a registered io.agentscope.harness.agent.gateway.channel.Channel); required
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63peerKind
String peerKind执行对端种类相关操作。
one of DIRECT, CHANNEL, GROUP, THREAD; required
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63peerId
String peerId执行对端标识相关操作。
provider-specific peer id (user id, group/conversation id, ...); required
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63accountId
String accountId执行 accountId 方法。
optional multi-account dimension (corp id, app instance); nullable
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63threadId
String threadId执行会话线程标识相关操作。
optional thread anchor for threaded replies; nullable
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63text
String text执行文本相关操作。
plain-text message body; either text or markdown must be set
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63markdown
String markdown执行 markdown 方法。
markdown message body; either text or markdown must be set
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63agentId
String agentId执行智能体标识相关操作。
optional caller-supplied agent id. When set, the service verifies that the
channel's routing for peerId resolves to the same agent and refuses delivery
otherwise. Use this to prevent one agent from posting into a channel/peer that is bound to
a different agent. Skipped when null or blank.
io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63构造器详情Constructor Detail
OutboundRequest
public OutboundRequest(String channelId, String peerKind, String peerId, String accountId, String threadId, String text, String markdown)
初始化 OutboundRequest 实例。
Convenience constructor without agentId (no caller-side routing check).
| 名称Name | 类型Type | 说明Description |
|---|---|---|
channelId | String | 渠道标识(类型 `String`)。The channel id. |
peerKind | String | 对端种类(类型 `String`)。The peer kind. |
peerId | String | 对端标识(类型 `String`)。The peer id. |
accountId | String | account 标识(类型 `String`)。The account id. |
threadId | String | 会话线程标识(类型 `String`)。The thread id. |
text | String | 文本(类型 `String`)。The text. |
markdown | String | markdown(类型 `String`)。The markdown. |
io/agentscope/builder/runtime/outbound/OutboundRequest.java:53–62