AgentCardConverterUtil
public class AgentCardConverterUtil
io/agentscope/core/nacos/a2a/utils/AgentCardConverterUtil.java:47–243智能体卡片转换器 Util,支持智能体之间的发现、委派与协作。位于 io.agentscope.core.nacos.a2a.utils 包。核心成员包括 convertToA2aAgentCard、convertToNacosAgentCard。
AgentCard Converter between Nacos AgentCard and A2A specification io.a2a.spec.AgentCard.
This utility also converts sub-specifications when converting AgentCard:
-
Nacos
AgentInterfaceand A2Aio.a2a.spec.AgentInterface. -
Nacos
AgentProviderand A2Aio.a2a.spec.AgentProvider. -
Nacos
AgentCapabilitiesand A2Aio.a2a.spec.AgentCapabilities. -
Nacos
AgentSkilland A2Aio.a2a.spec.AgentSkill.
Unlike the sub-specifications listed above, SecurityScheme is handled differently.
All types of A2A io.a2a.spec.SecurityScheme are serialized and stored as a generic Map
representation, and Nacos does not retain or expose the concrete subtype of io.a2a.spec.SecurityScheme.
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public static io.a2a.spec.AgentCard convertToA2aAgentCard(AgentCard agentCard)static | 转换到 A 2 a 智能体卡片。 Converts Nacos AgentCard object to A2A specification AgentCard object. |
public static AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard)static | 转换 `convertToNacosAgentCard`。 Converts A2A specification AgentCard object to Nacos AgentCard object. |
方法详情Method Detail
convertToA2aAgentCard
public static io.a2a.spec.AgentCard convertToA2aAgentCard(AgentCard agentCard)
转换到 A 2 a 智能体卡片。
Converts Nacos AgentCard object to A2A specification AgentCard object.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。the Nacos AgentCard object |
io.a2a.spec.AgentCardio/agentscope/core/nacos/a2a/utils/AgentCardConverterUtil.java:55–82convertToNacosAgentCard
public static AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard)
转换 convertToNacosAgentCard。
Converts A2A specification AgentCard object to Nacos AgentCard object.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | io.a2a.spec.AgentCard | 智能体卡片(类型 `io.a2a.spec.AgentCard`)。the A2A specification AgentCard object |
AgentCardio/agentscope/core/nacos/a2a/utils/AgentCardConverterUtil.java:159–183