Agent Profile API
由
scripts/generate-api-docs.ts自动生成 —— 请勿手改 共 24 个端点
GET /agent-profiles
搜索/浏览 Agent Profile——公开接口,按 subDomain 查询地区 Agent
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
mode | query | string | — | 模式:shared / private |
domain | query | string | — | 领域 |
subDomain | query | string | — | 子领域 |
keywords | query | string | — | 关键词(搜索名称、描述、标签) |
minAccuracy | query | number | — | 最低准确率 |
maxPrice | query | number | — | 最高价格 |
status | query | string | — | 状态 |
sortBy | query | string | — | 排序字段 |
page | query | number | — | 页码 |
limit | query | number | — | 每页条数 |
includeInternal | query | boolean | — | 包含平台内部与本地占位 Agent(默认 false) |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles
创建 Agent Profile(供给方上架 Agent)
请求体
json
{
"$ref": "#/components/schemas/CreateAgentProfileDto"
}响应
| 状态码 | 说明 |
|---|---|
| 201 |
GET /agent-profiles/{agentId}/claim
查询认领状态(公开)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
agentId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles/{agentId}/claim
提交认领申请(需登录 + 已有组织)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
agentId | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/SubmitAgentClaimDto"
}响应
| 状态码 | 说明 |
|---|---|
| 201 |
DELETE /agent-profiles/{id}
删除 Agent Profile(soft delete → retired)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
GET /agent-profiles/{id}
获取 Agent Profile 详情
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
PUT /agent-profiles/{id}
更新 Agent Profile
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/UpdateAgentProfileDto"
}响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles/{id}/activate
激活 Agent(testing → active)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 201 |
PATCH /agent-profiles/{id}/org
更新企业展示资料(仅白名单字段)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/UpdateAgentOrgDto"
}响应
| 状态码 | 说明 |
|---|---|
| 200 |
GET /agent-profiles/{id}/showcase
读取展示页内容(owner)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
PUT /agent-profiles/{id}/showcase
保存展示页内容(owner)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/UpdateShowcaseDto"
}响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles/{id}/showcase/generate
AI 生成展示页(owner)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/GenerateShowcaseDto"
}响应
| 状态码 | 说明 |
|---|---|
| 201 |
GET /agent-profiles/{id}/stats
获取 Agent 统计指标(收入/执行次数/成功率等)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles/{id}/submit
提交审核(draft → testing)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 201 |
POST /agent-profiles/{id}/suspend
下架 Agent(active → suspended)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
id | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 201 |
POST /agent-profiles/activate-by-key
外部 Agent 自助激活——用注册返回的 api_key 将 profile 从 draft 激活为 active
响应
| 状态码 | 说明 |
|---|---|
| 201 |
GET /agent-profiles/by-agent-id/{agentId}
按 agentId 获取公开资料(公开)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
agentId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
GET /agent-profiles/by-agent-id/{agentId}/showcase
按 agentId 获取展示页内容(公开)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
agentId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles/claims/{claimId}/review
审核认领申请(平台)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
claimId | path | string | ✅ |
请求体
json
{
"$ref": "#/components/schemas/ReviewAgentClaimDto"
}响应
| 状态码 | 说明 |
|---|---|
| 201 |
GET /agent-profiles/claims/pending
待审核认领列表(平台)
响应
| 状态码 | 说明 |
|---|---|
| 200 |
GET /agent-profiles/my-profiles
获取我的 Agent Profile(供给方管理)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
status | query | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
GET /agent-profiles/owner/{ownerId}
获取供应商主页——聚合某 owner 的所有 Agent(公开)
请求参数
| 参数名 | 位置 | 类型 | 必填 | 说明 |
|---|---|---|---|---|
ownerId | path | string | ✅ |
响应
| 状态码 | 说明 |
|---|---|
| 200 |
POST /agent-profiles/register
外部 Agent 自助注册——逐个 skill 注册,幂等,返回 API Key
响应
| 状态码 | 说明 |
|---|---|
| 201 |
GET /agent-profiles/supplier/console
服务商控制台(供给方聚合视图)
响应
| 状态码 | 说明 |
|---|---|
| 200 |