AgentCard

AgentCard 传达关键信息:- 总体详细信息(版本、名称、说明、用途)- 技能;智能体可以执行的一组操作/解决方案 - 智能体支持的默认模态/内容类型。- 身份验证要求。下一个 ID:19

JSON 表示法
{
  "protocolVersion": string,
  "name": string,
  "description": string,
  "url": string,
  "preferredTransport": string,
  "additionalInterfaces": [
    {
      object (AgentInterface)
    }
  ],
  "provider": {
    object (AgentProvider)
  },
  "version": string,
  "documentationUrl": string,
  "capabilities": {
    object (AgentCapabilities)
  },
  "securitySchemes": {
    string: {
      object (SecurityScheme)
    },
    ...
  },
  "security": [
    {
      object (Security)
    }
  ],
  "defaultInputModes": [
    string
  ],
  "defaultOutputModes": [
    string
  ],
  "skills": [
    {
      object (AgentSkill)
    }
  ],
  "supportsAuthenticatedExtendedCard": boolean,
  "signatures": [
    {
      object (AgentCardSignature)
    }
  ],
  "iconUrl": string
}
字段
protocolVersion

string

相应代理支持的 A2A protocol 版本。

name

string

代理的人类可读名称。示例:“食谱代理”

description

string

对代理的操作/解决方案空间的说明。示例:“可帮助用户查找食谱和烹饪的代理。”

url

string

托管代理的地址的网址。表示代理声明的首选端点。

preferredTransport

string

首选端点的传输方式。如果为空,则默认为 JSONRPC。

additionalInterfaces[]

object (AgentInterface)

宣布新增支持的传输方式。客户端可以使用任何受支持的传输方式。

provider

object (AgentProvider)

代理的服务提供商。

version

string

代理的版本。示例:“1.0.0”

documentationUrl

string

用于提供有关代理的其他文档的网址。

capabilities

object (AgentCapabilities)

智能体支持的 A2A 功能集。

securitySchemes

map (key: string, value: object (SecurityScheme))

用于对此代理进行身份验证的安全方案详细信息。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

security[]

object (Security)

protolint:disable REPEATED_FIELD_NAMES_PLURALIZED 联系客服人员的安全要求。此列表可以视为 AND 的 OR。列表中的每个对象都描述了一组必须在请求中存在的可能安全要求。这样一来,您就可以指定“调用方必须使用 OAuth 或 API 密钥和 mTLS”。示例:security { schemes { key: "oauth" value { list: ["read"] } } } security { schemes { key: "api-key" } schemes { key: "mtls" } }

defaultInputModes[]

string

protolint:enable REPEATED_FIELD_NAMES_PLURALIZED 代理在所有技能中支持的一组互动模式。此设置可按技能进行替换。定义为 MIME 类型。

defaultOutputModes[]

string

此代理支持的输出 MIME 类型。

skills[]

object (AgentSkill)

技能是指智能体可以执行的能力单元。这可能有些抽象,但代表了一组更集中的行动,智能体很可能成功完成这些行动。

supportsAuthenticatedExtendedCard

boolean

代理是否支持在用户通过身份验证时提供扩展代理卡,即来自 .well-known 的卡是否与来自 v1.getCard 的卡不同。

signatures[]

object (AgentCardSignature)

为相应 AgentCard 计算的 JSON Web 签名。

iconUrl

string

代理图标的可选网址。

AgentInterface

为代理定义其他运输信息。

JSON 表示法
{
  "url": string,
  "transport": string,
  "tenant": string
}
字段
url

string

相应接口所在的网址。

transport

string

相应网址支持的传输协议。这是一个开放式字符串,可轻松扩展以支持多种传输协议。正式支持的核心协议包括 JSONRPC、GRPC 和 HTTP+JSON。

tenant

string

调用代理时要在请求中设置的租户。实验性,在 1.0 版发布之前可能仍会发生变化。

AgentProvider

表示代理的服务提供商的相关信息。

JSON 表示法
{
  "url": string,
  "organization": string
}
字段
url

string

提供商参考网址示例:“https://ai.google.dev”

organization

string

提供方的组织名称。示例:“Google”

SecurityScheme

JSON 表示法
{

  // Union field scheme can be only one of the following:
  "apiKeySecurityScheme": {
    object (APIKeySecurityScheme)
  },
  "httpAuthSecurityScheme": {
    object (HTTPAuthSecurityScheme)
  },
  "oauth2SecurityScheme": {
    object (OAuth2SecurityScheme)
  },
  "openIdConnectSecurityScheme": {
    object (OpenIdConnectSecurityScheme)
  },
  "mtlsSecurityScheme": {
    object (MutualTlsSecurityScheme)
  }
  // End of list of possible types for union field scheme.
}
字段

联合字段 scheme

scheme 只能是下列其中一项:

apiKeySecurityScheme

object (APIKeySecurityScheme)

httpAuthSecurityScheme

object (HTTPAuthSecurityScheme)

oauth2SecurityScheme

object (OAuth2SecurityScheme)

openIdConnectSecurityScheme

object (OpenIdConnectSecurityScheme)

mtlsSecurityScheme

object (MutualTlsSecurityScheme)

HTTPAuthSecurityScheme

JSON 表示法
{
  "description": string,
  "scheme": string,
  "bearerFormat": string
}
字段
description

string

相应安全方案的说明。

scheme

string

要在授权标头中使用的 HTTP 身份验证方案的名称,如 RFC7235 中所定义。所用的值应在 IANA 身份验证方案注册表中注册。该值不区分大小写,如 RFC7235 中所定义。

bearerFormat

string

向客户端提供提示,以确定不记名令牌的格式。不记名令牌通常由授权服务器生成,因此此信息主要用于文档记录。

OAuth2SecurityScheme

JSON 表示法
{
  "description": string,
  "flows": {
    object (OAuthFlows)
  },
  "oauth2MetadataUrl": string
}
字段
description

string

相应安全方案的说明。

flows

object (OAuthFlows)

一个对象,包含支持的流量类型的配置信息

oauth2MetadataUrl

string

指向 OAuth2 授权服务器元数据 RFC8414 的网址。需要使用 TLS。

OAuthFlows

JSON 表示法
{

  // Union field flow can be only one of the following:
  "authorizationCode": {
    object (AuthorizationCodeOAuthFlow)
  },
  "clientCredentials": {
    object (ClientCredentialsOAuthFlow)
  },
  "implicit": {
    object (ImplicitOAuthFlow)
  },
  "password": {
    object (PasswordOAuthFlow)
  }
  // End of list of possible types for union field flow.
}
字段

联合字段 flow

flow 只能是下列其中一项:

authorizationCode

object (AuthorizationCodeOAuthFlow)

clientCredentials

object (ClientCredentialsOAuthFlow)

implicit

object (ImplicitOAuthFlow)

password

object (PasswordOAuthFlow)

AuthorizationCodeOAuthFlow

JSON 表示法
{
  "authorizationUrl": string,
  "tokenUrl": string,
  "refreshUrl": string,
  "scopes": {
    string: string,
    ...
  }
}
字段
authorizationUrl

string

此流程要使用的授权网址。此网址必须采用网址形式。OAuth2 标准要求使用 TLS

tokenUrl

string

要用于此流程的令牌网址。必须采用网址形式。OAuth2 标准要求使用 TLS。

refreshUrl

string

用于获取刷新令牌的网址。此网址必须采用网址形式。OAuth2 标准要求使用 TLS。

scopes

map (key: string, value: string)

OAuth2 安全方案的可用范围。范围名称与相应简短说明之间的映射。该映射可能为空。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

ClientCredentialsOAuthFlow

JSON 表示法
{
  "tokenUrl": string,
  "refreshUrl": string,
  "scopes": {
    string: string,
    ...
  }
}
字段
tokenUrl

string

要用于此流程的令牌网址。必须采用网址形式。OAuth2 标准要求使用 TLS。

refreshUrl

string

用于获取刷新令牌的网址。此网址必须采用网址形式。OAuth2 标准要求使用 TLS。

scopes

map (key: string, value: string)

OAuth2 安全方案的可用范围。范围名称与相应简短说明之间的映射。该映射可能为空。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

ImplicitOAuthFlow

JSON 表示法
{
  "authorizationUrl": string,
  "refreshUrl": string,
  "scopes": {
    string: string,
    ...
  }
}
字段
authorizationUrl

string

此流程要使用的授权网址。此网址必须采用网址形式。OAuth2 标准要求使用 TLS

refreshUrl

string

用于获取刷新令牌的网址。此网址必须采用网址形式。OAuth2 标准要求使用 TLS。

scopes

map (key: string, value: string)

OAuth2 安全方案的可用范围。范围名称与相应简短说明之间的映射。该映射可能为空。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

PasswordOAuthFlow

JSON 表示法
{
  "tokenUrl": string,
  "refreshUrl": string,
  "scopes": {
    string: string,
    ...
  }
}
字段
tokenUrl

string

要用于此流程的令牌网址。必须采用网址形式。OAuth2 标准要求使用 TLS。

refreshUrl

string

用于获取刷新令牌的网址。此网址必须采用网址形式。OAuth2 标准要求使用 TLS。

scopes

map (key: string, value: string)

OAuth2 安全方案的可用范围。范围名称与相应简短说明之间的映射。该映射可能为空。

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

OpenIdConnectSecurityScheme

JSON 表示法
{
  "description": string,
  "openIdConnectUrl": string
}
字段
description

string

相应安全方案的说明。

openIdConnectUrl

string

用于发现 [[OpenID-Connect-Discovery]] 提供方元数据的知名网址。

MutualTlsSecurityScheme

JSON 表示法
{
  "description": string
}
字段
description

string

相应安全方案的说明。

安全

JSON 表示法
{
  "schemes": {
    string: {
      object (StringList)
    },
    ...
  }
}
字段
schemes

map (key: string, value: object (StringList))

包含一系列 "key": value 对的对象。示例:{ "name": "wrench", "mass": "1.3kg", "count": "3" }

StringList

protolint:disable REPEATED_FIELD_NAMES_PLURALIZED

JSON 表示法
{
  "list": [
    string
  ]
}
字段
list[]

string

AgentSkill

AgentSkill 表示智能体可以执行的操作/解决方案单元。您可以将此视为代理可以提供的一种高度可靠的解决方案。智能体有权自主选择如何以及何时使用特定技能,但客户端应确信,如果定义了技能,则可以可靠地执行该技能。

JSON 表示法
{
  "id": string,
  "name": string,
  "description": string,
  "tags": [
    string
  ],
  "examples": [
    string
  ],
  "inputModes": [
    string
  ],
  "outputModes": [
    string
  ],
  "security": [
    {
      object (Security)
    }
  ]
}
字段
id

string

相应代理中技能的唯一标识符。

name

string

技能的人类可读名称。

description

string

技能详细信息和行为的人类(或 LLM)可读说明。

tags[]

string

技能的一组标记,用于增强分类/利用率。示例:["烹饪"、"客户支持"、"账单"]

examples[]

string

该技能旨在处理的一组示例查询。这些示例应有助于来电者了解如何向智能体提出请求以实现特定目标。示例:[“我需要一个面包食谱”]

inputModes[]

string

支持的可能输入模态。

outputModes[]

string

可能产生的输出模态

security[]

object (Security)

protolint:disable REPEATED_FIELD_NAMES_PLURALIZED 智能体利用此技能所需的安全方案。与整个 AgentCard.security 类似,此列表表示安全要求对象的逻辑 OR。每个对象都是一组必须一起使用的安全方案(逻辑 AND)。protolint:enable REPEATED_FIELD_NAMES_PLURALIZED

AgentCardSignature

AgentCardSignature 表示 AgentCard 的 JWS 签名。此签名遵循 RFC 7515 JSON Web Signature (JWS) 的 JSON 格式。

JSON 表示法
{
  "protected": string,
  "signature": string,
  "header": {
    object
  }
}
字段
protected

string

必需。签名的受保护 JWS 标头。这始终是一个 base64url 编码的 JSON 对象。必填。

signature

string

必需。计算出的签名(采用 base64url 编码)。必填。

header

object (Struct format)

未受保护的 JWS 标头值。