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 |
|---|---|---|
outboundService | OutboundService | 出站服务(类型 `OutboundService`)。The outbound service. |
guard | AgentAccessGuard | 守卫(类型 `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 |
|---|---|---|
req | OutboundRequest | req(类型 `OutboundRequest`)。The req. |
auth | Authentication | 认证(类型 `Authentication`)。The auth. |
Mono<ResponseEntity<Map<String, Object>>>返回Mono>>。Returns mono.
源码Source
io/agentscope/builder/runtime/outbound/OutboundController.java:59–120