公开智能体发现
用这些示例来塑造另一个 A2A 客户端在决定你的智能体能否完成任务之前会获取的 JSON。
用这些示例来塑造另一个 A2A 客户端在决定你的智能体能否完成任务之前会获取的 JSON。
改写提供方、技能、标签、能力和安全元数据,让审核人员理解这个智能体做什么、由谁运营。
在团队将内部智能体集成到工作流之前,统一它们描述端点、身份验证和技能的方式。
JSON 模板
处理产品咨询、订单查询、退货,以及升级转接。
为什么这样设计
{
"name": "客服智能体",
"description": "回答客户支持问题、获取订单上下文,并将未解决的问题升级给人工团队。",
"supportedInterfaces": [
{
"url": "https://api.example.com/a2a/customer-support",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "示例公司",
"url": "https://example.com"
},
"version": "1.0.0",
"capabilities": {
"streaming": true,
"pushNotifications": true,
"extendedAgentCard": false
},
"defaultInputModes": [
"text/plain",
"application/json"
],
"defaultOutputModes": [
"text/plain",
"application/json"
],
"skills": [
{
"id": "resolve-customer-support-request",
"name": "处理客户支持请求",
"description": "对客户支持请求进行分类、收集所需上下文、提出解决方案,并在置信度较低时升级处理。",
"tags": [
"support",
"orders",
"returns"
],
"examples": [
"帮我退掉这个订单。"
]
}
],
"securitySchemes": {
"oauth2": {
"oauth2SecurityScheme": {
"flows": {
"clientCredentials": {
"tokenUrl": "https://api.example.com/a2a/customer-support/oauth/token",
"scopes": {
"agent.invoke": "Invoke agent skills"
}
}
}
}
}
},
"security": [
{
"oauth2": [
"agent.invoke"
]
}
]
}查找可用的预约时段,并准备预订确认。
为什么这样设计
{
"name": "预订智能体",
"description": "搜索可用时间、提出预订选项,并准备待确认的预约。",
"supportedInterfaces": [
{
"url": "https://api.example.com/a2a/booking",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "示例公司",
"url": "https://example.com"
},
"version": "1.0.0",
"capabilities": {
"streaming": false,
"pushNotifications": true,
"extendedAgentCard": false
},
"defaultInputModes": [
"text/plain",
"application/json"
],
"defaultOutputModes": [
"application/json"
],
"skills": [
{
"id": "find-and-prepare-booking",
"name": "查找并准备预订",
"description": "检查资源可用性、比较预订时段,并返回结构化的预订提案。",
"tags": [
"booking",
"calendar",
"availability"
],
"examples": [
"帮我找明天下午 30 分钟的预约。"
]
}
],
"securitySchemes": {
"apiKey": {
"apiKeySecurityScheme": {
"location": "header",
"name": "X-API-Key"
}
}
},
"security": [
{
"apiKey": []
}
]
}比较商品、库存、价格和购买限制条件。
为什么这样设计
{
"name": "购物智能体",
"description": "根据用户限制条件比较商品,并返回附有取舍说明的排序购买选项。",
"supportedInterfaces": [
{
"url": "https://api.example.com/a2a/shopping",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "示例公司",
"url": "https://example.com"
},
"version": "1.0.0",
"capabilities": {
"streaming": true,
"pushNotifications": false,
"extendedAgentCard": false
},
"defaultInputModes": [
"text/plain",
"application/json"
],
"defaultOutputModes": [
"application/json"
],
"skills": [
{
"id": "compare-shopping-options",
"name": "比较购物选项",
"description": "评估候选商品、按限制条件筛选,并返回附带理由的排序推荐。",
"tags": [
"shopping",
"commerce",
"recommendations"
],
"examples": [
"比较价格低于 1,200 美元的轻薄笔记本电脑。"
]
}
],
"securitySchemes": {
"oauth2": {
"oauth2SecurityScheme": {
"flows": {
"clientCredentials": {
"tokenUrl": "https://api.example.com/a2a/shopping/oauth/token",
"scopes": {
"agent.invoke": "Invoke agent skills"
}
}
}
}
}
},
"security": [
{
"oauth2": [
"agent.invoke"
]
}
]
}审阅编码任务,提出补丁,并解释实现决策。
为什么这样设计
{
"name": "编程智能体",
"description": "通过分析代码、提出修改建议并返回实现说明来协助软件工程任务。",
"supportedInterfaces": [
{
"url": "https://api.example.com/a2a/coding",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "示例公司",
"url": "https://example.com"
},
"version": "1.0.0",
"capabilities": {
"streaming": true,
"pushNotifications": true,
"extendedAgentCard": true
},
"defaultInputModes": [
"text/plain",
"application/json"
],
"defaultOutputModes": [
"text/plain",
"application/json"
],
"skills": [
{
"id": "implement-code-change",
"name": "实现代码变更",
"description": "读取编码请求、检查相关文件、返回补丁建议,并总结验证步骤。",
"tags": [
"coding",
"review",
"patches"
],
"examples": [
"为用户 API 添加分页。"
]
}
],
"securitySchemes": {
"apiKey": {
"apiKeySecurityScheme": {
"location": "header",
"name": "X-API-Key"
}
}
},
"security": [
{
"apiKey": []
}
]
}收集资料来源,提取证据,并返回结构化的调研笔记。
为什么这样设计
{
"name": "调研智能体",
"description": "收集来源材料、提取证据,并产出带引文的结构化调研笔记。",
"supportedInterfaces": [
{
"url": "https://api.example.com/a2a/research",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "示例公司",
"url": "https://example.com"
},
"version": "1.0.0",
"capabilities": {
"streaming": true,
"pushNotifications": false,
"extendedAgentCard": false
},
"defaultInputModes": [
"text/plain"
],
"defaultOutputModes": [
"text/plain",
"application/json"
],
"skills": [
{
"id": "prepare-research-brief",
"name": "准备调研简报",
"description": "检索已批准的来源、提取主张和证据,并返回简明的调研简报。",
"tags": [
"research",
"evidence",
"citations"
],
"examples": [
"准备一份关于可再生能源政策的带引文简报。"
]
}
]
}协调审批、状态检查,以及后台工作流更新。
为什么这样设计
{
"name": "内部工作流智能体",
"description": "协调内部审批、检查系统状态,并为运营团队准备工作流更新。",
"supportedInterfaces": [
{
"url": "https://api.example.com/a2a/workflow",
"protocolBinding": "JSONRPC",
"protocolVersion": "1.0"
}
],
"provider": {
"organization": "示例公司",
"url": "https://example.com"
},
"version": "1.0.0",
"capabilities": {
"streaming": false,
"pushNotifications": true,
"extendedAgentCard": true
},
"defaultInputModes": [
"application/json"
],
"defaultOutputModes": [
"application/json"
],
"skills": [
{
"id": "coordinate-internal-workflow",
"name": "协调内部工作流",
"description": "接收工作流意图、检查策略要求、收集审批,并报告最终状态。",
"tags": [
"workflow",
"operations",
"approval"
],
"examples": [
"申请批准部署薪资系统更新。"
]
}
],
"securitySchemes": {
"oauth2": {
"oauth2SecurityScheme": {
"flows": {
"clientCredentials": {
"tokenUrl": "https://api.example.com/a2a/workflow/oauth/token",
"scopes": {
"agent.invoke": "Invoke agent skills"
}
}
}
}
}
},
"security": [
{
"oauth2": [
"agent.invoke"
]
}
]
}自信地改写
每个 Agent Card 示例都刻意做到足够完整以便直接复制,但 Agent Card 不应原封不动地发布。把它当作你自己 A2A 服务器的字段映射表:用生产环境的值替换身份、端点、提供方、身份验证、能力、模式和技能细节。
最出色的 Agent Card 会用通俗语言和机器可读的元数据来解释智能体的任务边界。客户端应该能够判断这个智能体能做什么、不能做什么、该调用哪个 URL,以及是否需要凭据。
把每一个 example.com URL 替换成你已部署的 A2A 端点和提供方网站。
针对实际的任务边界重写技能名称、描述、标签(v1.0 中为必填)和示例。
设置 provider.organization,并在 Agent Card 内容变化时提升顶层 version。
只有当端点是刻意公开时,才移除身份验证字段。
保持 defaultInputModes 和 defaultOutputModes 与你的服务器实际接受和返回的内容一致。
校验最终的 JSON,并将其发布在你服务域名下的 /.well-known/agent-card.json。
来自博客
Learn how to create an agent.json file for A2A v1.0, including required Agent Card fields, the well-known URL, response headers, and common mistakes.
11 min read阅读指南IntegrationLearn how to publish an A2A Agent Card from Google ADK, LangGraph, CrewAI, or Semantic Kernel by mapping framework concepts to standard discovery fields.
10 min read阅读指南ComparisonCompare A2A vs MCP: what each protocol connects, where they overlap, and why production AI agent systems often use both for tools and agent collaboration.
9 min read阅读指南文章以英文发布。