接口描述
分页查询本企业下的 Agent 列表,支持按名称 / 状态等条件过滤。
GET /v2/enterprises/{enterpriseId}/managedagent/agents输入参数
路径参数
参数 | 类型 | 说明 |
enterpriseId | string | WorkBuddy 企业 ID |
查询参数
参数 | 类型 | 说明 |
page | integer | 页码,从 1 开始,缺省 1 |
pageSize | integer | 每页条数,缺省 20,上限 100 |
agentName | string | 按 Agent 名称过滤(模糊匹配) |
keyword | string | 关键字搜索(模糊匹配) |
model | string | 按绑定的模型标识过滤 |
accountId | string | 按账号 ID 过滤 |
agentSource | string | 按 Agent 来源过滤(wb 自建 / wma 推送) |
请求体
无(GET / DELETE 不带请求体,条件走路径与查询参数)
输出参数
(
200,业务出参包装在 code / data / msg / requestId 中)DescribeAgentListResponse 对应 /DescribeAgentList 响应体。
字段 | 类型 | 说明 |
totalCount | integer | TotalCount 符合条件的 Agent 总数(过滤后、分页前)。 |
agentSet | AgentSet 当前页的 Agent 列表。 |
示例
输入示例
GET /v2/enterprises/{enterpriseId}/managedagent/agents?page=1&pageSize=20Authorization: Bearer pt_<YOUR_APP_KEY>
输出示例
{"code": 0,"data": {"agentSet": [{"a2aEnabled": true,"a2aEndpoint": "https://a2a.example.com/card/736918300000000001","a2aStatus": "DRAFT","accountId": "1200345678901234567","agentId": "736918300000000001","agentName": "数据分析助手","agentSource": "string","avatarUrl": "https://example.com/avatar/agent-001.png","clientEnabled": true,"clientVisibility": {"scopes": [{"scopeId": "1200345678901234567","scopeName": "数据分析助手","scopeType": "user"}],"visibilityType": "none"},"createdTime": "2026-10-20T09:30:00Z","creatorId": "<REDACTED_USER>","creatorName": "<REDACTED_USER>","description": "负责每日数据汇总","latestVersionId": "2087791755109965825","latestVersionName": "prod","model": "hunyuan-turbos-latest","modifiedTime": "2026-10-20T09:30:00Z","ownership": {"enforceMode": "default_off","ownershipType": "all","scopes": [{"scopeId": "1200345678901234567","scopeName": "数据分析助手","scopeType": "user"}]},"publicApiEnabled": true,"publicApiUrl": "https://736918300000000001.example.com","sessionCount": 2,"syncToWma": false}],"totalCount": 1},"msg": "OK","requestId": "3c6d138e-1234-5678-9abc-def012345678"}
错误码
说明:
错误码 | 说明 |
InternalError.AgentOperationFailed | Agent 操作失败 |
InvalidParameter.InvalidRequestBody | 请求体不合法 |
InvalidParameterValue.InvalidSource | Source 取值不合法 |
MissingParameter.UinRequired | 公共参数中缺少 Uin |
UnauthorizedOperation.UnprovisionedTenant | 租户未开通,或企业不存在 |