Class AgentCardConverterUtil
java.lang.Object
io.agentscope.core.nacos.a2a.utils.AgentCardConverterUtil
AgentCard Converter between Nacos
AgentCard and A2A specification AgentCard.
This utility also converts sub-specifications when converting AgentCard:
- Nacos
AgentInterfaceand A2AAgentInterface. - Nacos
AgentProviderand A2AAgentProvider. - Nacos
AgentCapabilitiesand A2AAgentCapabilities. - Nacos
AgentSkilland A2AAgentSkill.
Unlike the sub-specifications listed above, SecurityScheme is handled differently.
All types of A2A SecurityScheme are serialized and stored as a generic Map
representation, and Nacos does not retain or expose the concrete subtype of SecurityScheme.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic io.a2a.spec.AgentCardconvertToA2aAgentCard(com.alibaba.nacos.api.ai.model.a2a.AgentCard agentCard) Converts Nacos AgentCard object to A2A specification AgentCard object.static com.alibaba.nacos.api.ai.model.a2a.AgentCardconvertToNacosAgentCard(io.a2a.spec.AgentCard agentCard) Converts A2A specification AgentCard object to Nacos AgentCard object.
-
Constructor Details
-
AgentCardConverterUtil
public AgentCardConverterUtil()
-
-
Method Details
-
convertToA2aAgentCard
public static io.a2a.spec.AgentCard convertToA2aAgentCard(com.alibaba.nacos.api.ai.model.a2a.AgentCard agentCard) Converts Nacos AgentCard object to A2A specification AgentCard object.- Parameters:
agentCard- the Nacos AgentCard object- Returns:
- the converted A2A specification AgentCard object, or null if input is null
-
convertToNacosAgentCard
public static com.alibaba.nacos.api.ai.model.a2a.AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard) Converts A2A specification AgentCard object to Nacos AgentCard object.- Parameters:
agentCard- the A2A specification AgentCard object- Returns:
- the converted Nacos AgentCard object
-