AS AgentScopeAPI 手册 / API Reference

OutboundController

@RestController @RequestMapping("/api/outbound") public class OutboundController
源码Source io/agentscope/builder/runtime/outbound/OutboundController.java:47–121

出站控制器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.runtime.outbound 包。核心成员包括 send、OutboundController。

HTTP entry point for agent-initiated / external outbound messages.


POST /api/outbound/send
{ "channelId": "dingtalk-prod", "peerKind": "DIRECT", "peerId": "staff_xyz",
"agentId": "support", "markdown": "..." }

This primitive is restricted to the internal service identity. Console users publish through authorized work subscriptions; the 202 response only confirms local submission. When agentId is set on the payload, the caller must hold at least Tier#RUN on that agent — otherwise the request is rejected with 403 before reaching the channel. OutboundService performs a second, channel-routing-based check that prevents one agent from posting through a binding owned by a different agent.

构造器摘要Constructor Summary

构造器Constructor说明Description
public OutboundController(OutboundService outboundService, AgentAccessGuard guard)
初始化 `OutboundController` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public Mono<ResponseEntity<Map<String, Object>>> send(OutboundRequest req, Authentication auth)
执行发送相关操作。
Performs the send operation.

构造器详情Constructor Detail

OutboundController

public OutboundController(OutboundService outboundService, AgentAccessGuard guard)

初始化 OutboundController 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
outboundServiceOutboundService出站服务(类型 `OutboundService`)。The outbound service.
guardAgentAccessGuard守卫(类型 `AgentAccessGuard`)。The guard.
源码Source io/agentscope/builder/runtime/outbound/OutboundController.java:54–57

方法详情Method Detail

send

public Mono<ResponseEntity<Map<String, Object>>> send(OutboundRequest req, Authentication auth)

执行发送相关操作。

Performs the send operation.

参数Parameters
名称Name类型Type说明Description
reqOutboundRequestreq(类型 `OutboundRequest`)。The req.
authAuthentication认证(类型 `Authentication`)。The auth.
返回Returns Mono<ResponseEntity<Map<String, Object>>>
返回Mono>>。Returns mono.
源码Source io/agentscope/builder/runtime/outbound/OutboundController.java:59–120
基于官方固定版本源码静态生成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.