You need to enable JavaScript to run this app.
文档中心
AgentKit

AgentKit

复制全文
下载 pdf
A2A
CreateA2aAgent - 创建A2A智能体
复制全文
下载 pdf
CreateA2aAgent - 创建A2A智能体
创建A2A智能体。​
请求参数​
下方仅列出该接口特有的请求参数和部分公共参数。更多信息请见公共参数。​
Action string 必选 示例值:CreateA2aAgent​
要执行的操作,取值:CreateA2aAgent。​
​
Version string 必选 示例值:2025-10-30​
API的版本,取值:2025-10-30。​
​
Source string 必选 示例值:Runtime​
A2A智能体的注册来源。​
  • Runtime:通过智能体运行时的地址,将智能体运行时中的A2A智能体注册至A2A智能体空间,创建智能体运行时的操作参见创建运行时(控制台)。​
  • Standard:通过导入注册A2A智能体的JSON文件或者AgentCard地址,将A2A智能体注册至A2A智能体空间。​
  • JSON文件:通过导入符合A2A协议规范的JSON文件,将A2A智能体注册至A2A智能体空间。请提前准备好满足A2A协议规则的JSON文件,JSON文件各字段的具体定义、取值范围及校验规则等规范要求,参见A2A协议官网文档;JSON文件示例参见A2A智能体JSON文件示例。​
  • AgentCard地址:通过A2A智能体的AgentCard地址,将A2A智能体注册至A2A智能体空间。请提前获取A2A智能体的AgentCard地址。​
​
A2aSpaceId string 必选 示例值:as-yeglyhjytc3srhse****​
A2A智能体空间的ID。​
​
AgentCard string 可选 示例值:ei6****​
AgentCard的ID,Source选择Standard时必填。​
​
RuntimeConfig object 可选 示例值:-​
待注册A2A智能体所属智能体运行时的配置信息,Source选择Runtime时必填。​
RuntimeId string 必选 示例值:r-yeh6nlafwgo2eybt****​
待注册A2A智能体对应的运行时ID。Source选择Runtime时必填。​
​
NetworkType string 必选 示例值:private​
选择智能体运行时后,自动匹配智能体运行时的服务地址,支持根据业务需求选择公网或私网地址。​
  • private:如果只需要私有网络内部通信,选择私网地址即可,私网连通不收取费用。​
  • public:如果需要从互联网访问云资源,必须使用公网地址。​
​
​
ProjectName string 可选 示例值:default​
A2A智能体所属项目的名称。​
​
Tags object[] 可选 示例值:-​
A2A智能体的标签。​
Key string 必选 示例值:key1​
标签的键。​
​
Value string 必选 示例值:value1​
标签的值。​
​
​
SetDefaultVersion boolean 可选 示例值:true​
是否设置为默认版本,智能体默认调用A2A智能体的默认版本。A2A智能体支持版本生命周期管理,可对不同版本进行创建、查看与删除,满足智能体迭代与兼容需求。​
  • true:设置为默认版本。​
  • false:不设置为默认版本。​
​
StandardConfig object 可选 示例值:-​
从外部导入A2A智能体的配置,Source选择Runtime时必填。​
ImportType string 必选 示例值:json​
Source选择Standard是支持。通过导入注册A2A智能体的JSON文件或者AgentCard地址,将A2A智能体注册至A2A智能体空间。​
  • json:通过导入符合A2A协议规范的JSON文件,将A2A智能体注册至A2A智能体空间。请提前准备好满足A2A协议规则的JSON文件,JSON文件各字段的具体定义、取值范围及校验规则等规范要求,参见A2A协议官网文档;JSON文件示例参见A2A智能体JSON文件示例。​
  • url:通过A2A智能体的AgentCard地址,将A2A智能体注册至A2A智能体空间。请提前获取A2A智能体的AgentCard地址。​
​
AgentCardUrl string 可选 示例值:http://api.example.com/a2a/v1​
注册A2A智能体的AgentCard地址。ImportType为json时需要填写。​
​
​
EnableProxy boolean 可选 示例值:false​
是否开启代理。​
  • true:开启。​
  • false:不开启。​
​
ProxyConfig object 可选 示例值:-​
代理配置。​
NetworkConfiguration object 必选​
网络配置​
NetworkType string 必选 示例值:private​
选择智能体运行时后,自动匹配智能体运行时的服务地址,支持根据业务需求选择公网或私网地址。​
  • private:如果只需要私有网络内部通信,选择私网地址即可,私网连通不收取费用。​
  • public:如果需要从互联网访问云资源,必须使用公网地址。​
​
VpcConfiguration object 可选 示例值:-​
私有网络配置​
VpcId string 可选 示例值:vpc-257gqcdfvx6n****​
私有网络的ID。​
​
SubnetIds string[] 可选 示例值:subnet-****​
子网的ID。​
​
​
​
InboundAuthorizerConfiguration object 必选​
Inbound鉴权配置​
AuthorizerType string 必选​
鉴权类型(KEY_AUTH/OAUTH/NONE)​
​
Authorizer object 可选​
鉴权器​
KeyAuth object 可选​
KeyAuth​
ApiKeys string[] 必选​
ApiKey值​
​
ApiKeyLocation string 可选​
位置(HEADER/URL)​
​
ApiKeyLocationKey string 可选​
当ApiKeyLocation为HEADER时表示请求头名称,当为URL时表示查询参数名称​
​
​
JWTAuthorizer object 可选​
JWTAuthorizer​
DiscoveryUrl string 可选​
Url​
​
AllowedClients string[] 可选​
允许的客户端列表​
​
​
​
​
​
​
​
返回参数​
下方仅列出本接口特有的返回参数。更多信息请参见返回结构。​
Id string 示例值:a-yeglyhjytc3srhse****​
A2A智能体的ID。​
​
Tags object[] 示例值:-​
A2A智能体的标签。​
Key string 示例值:key1​
标签的键。​
​
Value string 示例值:value1​
标签的值。​
​
​
​
​
请求示例​
​
POST /?Action=CreateA2aAgent&Version=2025-10-30 HTTP/1.1​
Host: agentkit.cn-beijing.volcengineapi.com​
Content-Type: application/json; charset=UTF-8​
X-Date: 20260306T082624Z​
X-Content-Sha256: 287e874e******d653b44d21e​
Authorization: HMAC-SHA256 Credential=Adfks******wekfwe/20260306/cn-beijing/agentkit/request, SignedHeaders=host;x-content-sha256;x-date, Signature=47a7d934ff7b37c03938******cd7b8278a40a1057690c401e92246a0e41085f​
​
{​
"Source": "Runtime",​
"A2aSpaceId": "as-yeglyhjytc3srhse****",​
"AgentCard": "ei6pEUe",​
"RuntimeConfig": {​
"RuntimeId": "r-yeh6nlafwgo2eybt****",​
"NetworkType": "Private"​
},​
"ProjectName": "default",​
"Tags": [​
{​
"Key": "g7r",​
"Value": "YooJCJgTX5w"​
}​
],​
"SetDefaultVersion": true,​
"StandardConfig": {​
"ImportType": "json",​
"AgentCardUrl": "KNML7Fh6"​
},​
"EnableProxy": true,​
"ProxyConfig": {​
"NetworkConfiguration": {​
"NetworkType": "private",​
"VpcConfiguration": {​
"VpcId": "vpc-257gqcdfvx6n****",​
"SubnetIds": [​
"subnet-xxxxxxxxxxxxxxxxxxxxxxxxx"​
]​
}​
},​
"InboundAuthorizerConfiguration": {​
"AuthorizerType": "apv4VtAW",​
"Authorizer": {​
"KeyAuth": {​
"ApiKeys": [​
"1Mw9"​
],​
"ApiKeyLocation": "nBp88b",​
"ApiKeyLocationKey": "toAXHdW"​
},​
"JWTAuthorizer": {​
"DiscoveryUrl": "YbOAks7f",​
"AllowedClients": [​
"rrkHLEX1BP"​
]​
}​
}​
}​
}​
}​
​
返回示例​
​
{​
"ResponseMetadata": {​
"RequestId": "202603061626360340790610086D****",​
"Action": "CreateA2aAgent",​
"Version": "2025-10-30",​
"Service": "agentkit",​
"Region": "cn-beijing"​
},​
"Result": {​
"Id": "a-yeglyhjytc3srhse****",​
"Tags": [​
{​
"Key": "g7r",​
"Value": "YooJCJgTX5w"​
}​
]​
}​
}​
​
错误码​
下表为您列举了该接口与业务逻辑相关的错误码。公共错误码请参见公共错误码文档。​
​
状态码​
错误码​
错误信息​
说明​
403​
AccessDenied​
You are not authorized to perform this action.​
没有执行操作的权限。​
500​
InternalError​
The request has failed due to an unknown error.​
内部错误。​
​
​
最近更新时间:2026.03.12 11:19:34
这个页面对您有帮助吗?
有用
有用
无用
无用