2026-05-20 21:39:12 +08:00

109 lines
3.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
name: oem-audit-router
description: TYCM OEM审核子Agent路由。根据输入参数中的oemId选择并调用对应审核子AgentoemId=2长安新车审核agent_c020c385oemId=11赛力斯审核agent_6a442e52oemId=16阿维塔审核agent_7d380038返回子Agent响应。
license: MIT
metadata:
version: "1.1.0"
category: orchestration
skillType: compute-entry
tags: ["tycm", "oem", "router", "agent", "投保审核"]
---
# TYCM OEM审核子Agent路由
当最外层 Agent 收到 TYCM 订单/理赔审核请求,需要根据 `oemId` 决定交给哪个品牌审核子 Agent 时,直接调用本技能。本技能只负责选择并调用子 Agent不调用 TYCM 回调接口;默认转发给子 Agent 的消息会移除 `callbackUrl`,避免子 Agent 触发 TYCM 回调。
路由规则固定如下:
- `oemId = 2`: 长安新车审核子Agent`agentId=6``agentName=agent_c020c385`
- `oemId = 11`: 赛力斯审核子Agent`agentId=9``agentName=agent_6a442e52`
- `oemId = 16`: 阿维塔审核子Agent`agentId=10``agentName=agent_7d380038`
## 推荐用法
直接调用子 Agent
```json
{
"name": "oem-audit-router",
"input": {
"message": {
"orderNo": "20260427093006929543",
"oemId": 16,
"orderType": "insure",
"data": {},
"callbackUrl": "http://127.0.0.1:5610/system/order/agent-invoke-callback?orderNo=20260427093006929543"
},
"chatUrl": "http://127.0.0.1:8003/open/netaclaw/chat"
}
}
```
只做路由判断:
```json
{
"name": "oem-audit-router",
"input": {
"message": {
"orderNo": "20260427093006929543",
"oemId": 16,
"orderType": "insure",
"data": {}
}
}
}
```
## 输入
- `message`: 必填,原始业务消息对象或 JSON 字符串;通常就是 TYCM 传给最外层 Agent 的 message。
- `oemId`: 可选,显式 OEM ID优先级高于 `message.oemId``message.data.oemId`
- `invoke`: 可选,默认 `true`。为 `true` 时,本技能会调用选中的子 Agent`false` 时只返回路由结果。
- `chatUrl`: 可选AIflow `/open/netaclaw/chat` 地址。`invoke:true` 时必填;也可通过环境变量 `AIFLOW_NETACLAW_CHAT_URL` 提供。
- `stripCallbackUrl`: 可选,默认 `true`。调用子 Agent 前从转发消息中移除 `callbackUrl`
- `sessionId`: 可选,转发给 `/open/netaclaw/chat`
- `userId`: 可选,转发给 `/open/netaclaw/chat`
- `timeoutMs`: 可选,默认 `300000`
- `retries`: 可选,默认 `0`
- `headers`: 可选,额外 HTTP header。
- `dryRun`: 可选,`true` 时只返回路由和请求体,不发 HTTP 请求。
- `agentNames``agentName2``agentName11``agentName16`: 可选覆盖项。正常不要传,默认使用本技能内置子 Agent 内部名称。
## 输出
只做路由时:
```json
{
"success": true,
"routed": true,
"invoked": false,
"oemId": 16,
"brand": "阿维塔",
"subAgentKey": "avatr_new_car_audit",
"subAgentId": 10,
"subAgentName": "agent_7d380038",
"reason": "oemId=16 routed to 阿维塔审核子Agent"
}
```
调用子 Agent 时:
```json
{
"success": true,
"routed": true,
"invoked": true,
"oemId": 16,
"brand": "阿维塔",
"subAgentId": 10,
"subAgentName": "agent_7d380038",
"response": {}
}
```
不支持的 `oemId` 会返回 `success:false``routed:false` 和错误原因。本技能不回调 TYCM。
详细契约见 `references/router_contract.md`