AS AgentScopeAPI 手册 / API Reference

AgentScopeAgentCardConverter

public class AgentScopeAgentCardConverter
源码Source io/agentscope/core/a2a/server/card/AgentScopeAgentCardConverter.java:57–184

用于智能体范围 A2A 服务端的智能体卡片构建器。位于 io.agentscope.core.a2a.server.card 包。核心成员包括 createAgentCard。

Agent Card Builder For Agent Scope A2A Server.

The Converter will convert input ConfigurableAgentCard to an AgentCard instance, available TransportProperties and AgentRunner.

Attributes of AgentCard build rules:

  • name: first from ConfigurableAgentCard, default from AgentRunner#getAgentName().

  • description: first from ConfigurableAgentCard, default from AgentRunner#getAgentDescription() ()}.

  • provider: only from ConfigurableAgentCard, default null.

  • version: only from ConfigurableAgentCard, default 1.0.0

  • documentationUrl: only from ConfigurableAgentCard, default null.

  • capabilities: only from agentscope implementation, not supported to config.

  • defaultInputModes/defaultOutputModes: first from ConfigurableAgentCard, default ["text"].

  • skills: first from ConfigurableAgentCard, default empty list.

  • supportsAuthenticatedExtendedCard: only false for now.

  • securitySchemes: only from ConfigurableAgentCard, default null.

  • security: only from ConfigurableAgentCard, default null.

  • iconUrl: only from ConfigurableAgentCard, default null.

  • additionalInterfaces: first from ConfigurableAgentCard, default from availableTransports.

  • preferredTransport: first from ConfigurableAgentCard, default is JSONRPC, if not found in availableTransports, will random one from availableTransports.

  • url: first from ConfigurableAgentCard, default from JSONRPC transportProperties, if not found in availableTransports, will random one from availableTransports.

  • protocolVersion: only from agentscope implementation, not supported to config. current version is 0.3.0

方法摘要Method Summary

方法Method说明Description
public AgentCard createAgentCard(ConfigurableAgentCard agentCard, AgentRunner agentRunner, Set<TransportProperties> availableTransports)
创建智能体卡片。
Creates the agent card.

方法详情Method Detail

createAgentCard

public AgentCard createAgentCard(ConfigurableAgentCard agentCard, AgentRunner agentRunner, Set<TransportProperties> availableTransports)

创建智能体卡片。

Creates the agent card.

参数Parameters
名称Name类型Type说明Description
agentCardConfigurableAgentCard智能体卡片(类型 `ConfigurableAgentCard`)。The agent card.
agentRunnerAgentRunner智能体运行器(类型 `AgentRunner`)。The agent runner.
availableTransportsSet<TransportProperties>可用 Transports(类型 `Set`)。The available transports.
返回Returns AgentCard
返回AgentCard。Returns agent card.
源码Source io/agentscope/core/a2a/server/card/AgentScopeAgentCardConverter.java:69–100
基于官方固定版本源码静态生成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.