接口描述
分页查询外部 Agent 列表,可按已绑定 / 未绑定过滤。
GET /v2/enterprises/{enterpriseId}/managedagent/agents/{agentId}/external-agents输入参数
路径参数
参数 | 类型 | 说明 |
enterpriseId | string | WorkBuddy 企业 ID |
agentId | string | 等价于请求体字段 AgentId |
查询参数
参数 | 类型 | 说明 |
page | integer | 页码,从 1 开始,缺省 1 |
pageSize | integer | 每页条数,缺省 20,上限 100 |
Bound | string | 过滤参数(云 API 字段 Bound) |
versionId | string | 等价于请求体字段 VersionId |
请求体
无(GET / DELETE 不带请求体,条件走路径与查询参数)
输出参数
(
200,业务出参包装在 code / data / msg / requestId 中)ListExternalAgentsResponse DescribeExternalAgentList 响应体。
字段 | 类型 | 说明 |
totalCount | integer | TotalCount 符合条件的外部 Agent 总数(过滤后、分页前)。 |
externalAgentSet | ExternalAgentSet 当前页的外部 Agent 列表。 |
示例
输入示例
GET /v2/enterprises/{enterpriseId}/managedagent/agents/{agentId}/external-agents?page=1&pageSize=20Authorization: Bearer pt_<YOUR_APP_KEY>
输出示例
{"code": 0,"data": {"externalAgentSet": [{"a2aAgentId": "ref_7f3c1a2b9d","a2aSkillSet": [{"a2aSkillId": "skill_order_query","description": "负责每日数据汇总","name": "数据分析助手"}],"a2aVersion": "1.0.0","bindingId": "1200345678901234567","bound": true,"description": "负责每日数据汇总","endpoint": "https://a2a.example.com/inventory","iconUrl": "https://example.com/avatar/agent-001.png","latestVersionName": "prod","name": "数据分析助手"}],"totalCount": 1},"msg": "OK","requestId": "3c6d138e-1234-5678-9abc-def012345678"}
错误码
错误码 | 说明 |
FailedOperation.ExternalOperationFailed | 外部 Agent 操作失败 |
InvalidParameter.AgentIDRequired | 缺少 AgentId |
InvalidParameter.EndpointInvalid | Endpoint 必须是绝对的 http(s) URL |
InvalidParameter.EndpointRequired | 缺少 Endpoint |
InvalidParameter.ExternalAgentIDRequired | 缺少 A2AAgentId |
InvalidParameter.InvalidRequestBody | 请求体不合法 |
InvalidParameter.Pagination | 分页参数不合法 |
InvalidParameterValue.InvalidBindingID | BindingId 必须是正整数形式的字符串 |
InvalidParameterValue.InvalidVersionID | VersionId 必须是正整数形式的字符串 |
MissingParameter.UinRequired | 公共参数中缺少 Uin |
ResourceNotFound.Agent | Agent 不存在 |
ResourceNotFound.ExternalAgent | 该外部 Agent 未绑定到当前 Agent |
ResourceNotFound.Version | 版本不存在 |
ResourceUnavailable.A2ANotConfigured | 未配置 A2A 网关 |
UnauthorizedOperation.UnprovisionedTenant | 租户未开通,或企业不存在 |