You need to enable JavaScript to run this app.
文档中心
数据智能体

数据智能体

复制全文
下载 pdf
A2A
IDA-获取可用 Scene 与 Skill
复制全文
下载 pdf
IDA-获取可用 Scene 与 Skill

获取可用 Scene 与 Skill

发起 A2A OpenAPI 问答前,可先调用本接口查询指定智能体已配置的场景及其技能。返回为树形结构:category=group 表示场景分组,category=scene 表示可用于问答的具体场景。

请求说明

项目

内容

请求方式

GET

请求地址

https://{domain}/dataAgent/llm/openApi/v2/a2a/skills

鉴权方式

Authorization: Bearer <JWT>

默认语言

Content-Language: zh-CN(可选)

鉴权方式:OpenAPI Token,使用 Authorization: Bearer <JWT> 请求头。

请求参数

位置

参数

类型

是否必选

说明

Query

agent_id

int

是

智能体 ID

Query

include_disabled

bool

否

是否返回已禁用节点,默认 false。问答时应选择 isEnabled=true 的节点。

Header

Content-Language

string

否

返回内容语言,例如 zh-CN;默认 zh-CN。

请求示例

curl -X GET \
  "https://${IDA_DOMAIN}/dataAgent/llm/openApi/v2/a2a/skills?agentId=11&page=1&pageSize=100" \
  -H "Authorization: Bearer ${JWT_TOKEN}" \
  -H 'Content-Type: application/json' \
  --silent | jq

如何确定 scene 与 skill

  1. 递归遍历 data.scenes[].children,选择 category=scene 且 isEnabled=true 的节点。
  2. 将场景节点的 id 作为 A2A message.metadata.sceneId。例如下文的“数据速找”的 id=3291,则传入 sceneId:3291。
  3. 如需显式预加载技能,从该场景的 skills 中选择 enable=true 的条目,并将 code 作为 A2A message.metadata.skill。一般只传 sceneId 即可,由场景绑定关系加载对应技能;只有需要强制指定单个技能时才传 skill。

注意:skill 必须使用技能代码,例如 asset-query-after-search;不要传场景名称(如“数据速找”)、技能展示名 displayName、场景别名 scene-5 或数值 skillId。

A2A 参数示例

{
  "message": {
    "metadata": {
      "sceneId": 3291,
      "skill": "asset-query-after-search"
    }
  }
}

返回参数

响应(真实样例,节选):

{
    "JSONIFY_PRETTYPRINT_REGULAR": false,
    "code": "llm/ok",
    "data": {
        "scenes": [
            {
                "builtinSceneCode": "group_search",
                "category": "group",
                "children": [
                    {
                        "builtinSceneCode": "data_find",
                        "category": "scene",
                        "children": [],
                        "config": {
                            "webSearchEnabled": true
                        },
                        "fromBuiltinScene": "data_find",
                        "icon": "",
                        "id": 3291,
                        "isEnabled": true,
                        "isOfficial": true,
                        "modelType": "text",
                        "name": "数据速找",
                        "nameEn": "find data",
                        "order": 2,
                        "parentId": 3285,
                        "placeholder": "",
                        "recommendedQuestions": [
                            {
                                "id": 11736,
                                "question": "「xxx」数据在哪个数据集可以查看到?",
                                "questionEn": "where can i view the “xxx” data – which  dataset contains it?",
                                "resource": {
                                    "datasetList": [],
                                    "fileList": [],
                                    "larkFileList": [],
                                    "reportList": []
                                },
                                "sceneId": 3291
                            },
                            {
                                "id": 11737,
                                "question": "「xxx」指标是什么意思?在什么数据集能查到?",
                                "questionEn": "what does the “xxx” metric mean, and in which dataset can i query it?",
                                "resource": {
                                    "datasetList": [],
                                    "fileList": [],
                                    "larkFileList": [],
                                    "reportList": []
                                },
                                "sceneId": 3291
                            }
                        ],
                        "skills": [
                            {
                                "code": "asset-query-after-search",
                                "displayName": "资产搜索的后续查数策略",
                                "displayNameEn": "",
                                "enable": true,
                                "icon": "",
                                "isBuiltIn": true,
                                "name": "asset-query-after-search",
                                "skillId": 1,
                                "supportCheck": false
                            },
                            {
                                "code": "query_aeolus_report",
                                "displayName": "DataWind图表查询",
                                "displayNameEn": "",
                                "enable": true,
                                "icon": "",
                                "isBuiltIn": true,
                                "name": "query_aeolus_report",
                                "skillId": 12,
                                "supportCheck": true
                            },
                            {
                                "code": "resource-statistics",
                                "displayName": "DataWind资源统计",
                                "displayNameEn": "",
                                "enable": true,
                                "icon": "",
                                "isBuiltIn": true,
                                "name": "resource-statistics",
                                "skillId": 14,
                                "supportCheck": false
                            }
                        ]
                    }
                ],
                "config": {
                    "webSearchEnabled": true
                },
                "fromBuiltinScene": "group_search",
                "icon": "assetssearch",
                "id": 3285,
                "isEnabled": true,
                "isOfficial": true,
                "modelType": "text",
                "name": "知识检索",
                "nameEn": "search",
                "order": 1,
                "parentId": null,
                "placeholder": "",
                "recommendedQuestions": [],
                "skills": []
            }
        ]
    },
    "msg": {}
}
最近更新时间:2026.09.09 14:51:59
这个页面对您有帮助吗?
有用
有用
无用
无用