AS AgentScopeAPI 手册 / API Reference

OutboundRequest

@JsonIgnoreProperties(ignoreUnknown = true) public record OutboundRequest( String channelId, String peerKind, String peerId, String accountId, String threadId, String text, String markdown, String agentId)
源码Source 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
channelIdString
执行渠道标识相关操作。
target channel id (must match a registered `io.agentscope.harness.agent.gateway.channel.Channel`); required
peerKindString
执行对端种类相关操作。
one of `DIRECT`, `CHANNEL`, `GROUP`, `THREAD`; required
peerIdString
执行对端标识相关操作。
provider-specific peer id (user id, group/conversation id, ...); required
accountIdString
执行 `accountId` 方法。
optional multi-account dimension (corp id, app instance); nullable
threadIdString
执行会话线程标识相关操作。
optional thread anchor for threaded replies; nullable
textString
执行文本相关操作。
plain-text message body; either `text` or `markdown` must be set
markdownString
执行 `markdown` 方法。
markdown message body; either `text` or `markdown` must be set
agentIdString
执行智能体标识相关操作。
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

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

peerKind

String peerKind

执行对端种类相关操作。

one of DIRECT, CHANNEL, GROUP, THREAD; required

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

peerId

String peerId

执行对端标识相关操作。

provider-specific peer id (user id, group/conversation id, ...); required

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

accountId

String accountId

执行 accountId 方法。

optional multi-account dimension (corp id, app instance); nullable

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

threadId

String threadId

执行会话线程标识相关操作。

optional thread anchor for threaded replies; nullable

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

text

String text

执行文本相关操作。

plain-text message body; either text or markdown must be set

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

markdown

String markdown

执行 markdown 方法。

markdown message body; either text or markdown must be set

源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:41–63

agentId

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.

源码Source 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).

参数Parameters
名称Name类型Type说明Description
channelIdString渠道标识(类型 `String`)。The channel id.
peerKindString对端种类(类型 `String`)。The peer kind.
peerIdString对端标识(类型 `String`)。The peer id.
accountIdStringaccount 标识(类型 `String`)。The account id.
threadIdString会话线程标识(类型 `String`)。The thread id.
textString文本(类型 `String`)。The text.
markdownStringmarkdown(类型 `String`)。The markdown.
源码Source io/agentscope/builder/runtime/outbound/OutboundRequest.java:53–62
基于官方固定版本源码静态生成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.