AS AgentScopeAPI 手册 / API Reference

NacosA2aRegistry

public class NacosA2aRegistry
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistry.java:41–126

Nacos A 2 a 注册表,支持智能体之间的发现、委派与协作。位于 io.agentscope.extensions.nacos.a2a.registry 包。核心成员包括 registerAgent、NacosA2aRegistry。

AgentScope Extensions for Runtime Registry A2A AgentCard and A2A instance endpoint to Nacos.

构造器摘要Constructor Summary

构造器Constructor说明Description
public NacosA2aRegistry(Properties nacosProperties) throws NacosException
初始化 `NacosA2aRegistry` 实例。
Creates a new instance.
public NacosA2aRegistry(A2aService a2aService)
初始化 `NacosA2aRegistry` 实例。
Creates a new instance.

方法摘要Method Summary

方法Method说明Description
public void registerAgent(io.a2a.spec.AgentCard agentCard, NacosA2aRegistryProperties a2aProperties)
注册智能体。
Register A2A agent card and endpoint to Nacos

构造器详情Constructor Detail

NacosA2aRegistry

public NacosA2aRegistry(Properties nacosProperties) throws NacosException

初始化 NacosA2aRegistry 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
nacosPropertiesPropertiesNacos 属性(类型 `Properties`)。The nacos properties.
抛出Throws
  • NacosException 可能抛出 `NacosException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistry.java:47–49

NacosA2aRegistry

public NacosA2aRegistry(A2aService a2aService)

初始化 NacosA2aRegistry 实例。

Creates a new instance.

参数Parameters
名称Name类型Type说明Description
a2aServiceA2aServicea 2 a 服务(类型 `A2aService`)。The a 2 a service.
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistry.java:51–53

方法详情Method Detail

registerAgent

public void registerAgent(io.a2a.spec.AgentCard agentCard, NacosA2aRegistryProperties a2aProperties)

注册智能体。

Register A2A agent card and endpoint to Nacos

参数Parameters
名称Name类型Type说明Description
agentCardio.a2a.spec.AgentCard智能体卡片到注册。the agent card to register
a2aPropertiesNacosA2aRegistryProperties属性用于 A2A 注册表。the properties for A2A registry
源码Source io/agentscope/extensions/nacos/a2a/registry/NacosA2aRegistry.java:61–70
基于官方固定版本源码静态生成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.