AS AgentScopeAPI 手册 / API Reference

AgentCardConverterUtil

public class AgentCardConverterUtil
源码Source io/agentscope/extensions/nacos/a2a/utils/AgentCardConverterUtil.java:38–208

智能体卡片转换器 Util,支持智能体之间的发现、委派与协作。位于 io.agentscope.extensions.nacos.a2a.utils 包。核心成员包括 convertToA2aAgentCard、convertToNacosAgentCard。

AgentCard Converter between Nacos com.alibaba.nacos.api.ai.model.a2a.AgentCard and A2A specification io.a2a.spec.AgentCard.

方法摘要Method Summary

方法Method说明Description
public static io.a2a.spec.AgentCard convertToA2aAgentCard(AgentCard agentCard)
static
转换到 A 2 a 智能体卡片。
Convert Nacos AgentCard object to A2A specification AgentCard object
public static AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard)
static
转换 `convertToNacosAgentCard`。
Convert A2A specification AgentCard object to Nacos AgentCard object

方法详情Method Detail

convertToA2aAgentCard

public static io.a2a.spec.AgentCard convertToA2aAgentCard(AgentCard agentCard)
static

转换到 A 2 a 智能体卡片。

Convert Nacos AgentCard object to A2A specification AgentCard object

参数Parameters
名称Name类型Type说明Description
agentCardAgentCard智能体卡片(类型 `AgentCard`)。the Nacos AgentCard object
返回Returns io.a2a.spec.AgentCard
返回io.A2A.规格.AgentCard。the converted A2A specification AgentCard object, or null if input is null
源码Source io/agentscope/extensions/nacos/a2a/utils/AgentCardConverterUtil.java:46–65

convertToNacosAgentCard

public static AgentCard convertToNacosAgentCard(io.a2a.spec.AgentCard agentCard)
static

转换 convertToNacosAgentCard。

Convert A2A specification AgentCard object to Nacos AgentCard object

参数Parameters
名称Name类型Type说明Description
agentCardio.a2a.spec.AgentCard智能体卡片(类型 `io.a2a.spec.AgentCard`)。the A2A specification AgentCard object
返回Returns AgentCard
返回AgentCard。the converted Nacos AgentCard object
源码Source io/agentscope/extensions/nacos/a2a/utils/AgentCardConverterUtil.java:130–150
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.