Class NacosA2aRegistry
java.lang.Object
io.agentscope.core.nacos.a2a.registry.NacosA2aRegistry
AgentScope Extensions for Registry A2A AgentCard and A2A instance endpoint to Nacos.
-
Constructor Summary
ConstructorsConstructorDescriptionNacosA2aRegistry(com.alibaba.nacos.api.ai.A2aService a2aService) New instance ofNacosA2aRegistryby Nacos Client instance.NacosA2aRegistry(Properties nacosProperties) New instance ofNacosA2aRegistryby Nacos server properties. -
Method Summary
Modifier and TypeMethodDescriptionvoidregisterAgent(io.a2a.spec.AgentCard agentCard, NacosA2aRegistryProperties a2aProperties) Registers an A2A agent card and endpoint to Nacos.
-
Constructor Details
-
NacosA2aRegistry
public NacosA2aRegistry(Properties nacosProperties) throws com.alibaba.nacos.api.exception.NacosException New instance ofNacosA2aRegistryby Nacos server properties.- Parameters:
nacosProperties- the properties for Nacos server- Throws:
com.alibaba.nacos.api.exception.NacosException- during building Nacos client failed
-
NacosA2aRegistry
public NacosA2aRegistry(com.alibaba.nacos.api.ai.A2aService a2aService) New instance ofNacosA2aRegistryby Nacos Client instance.- Parameters:
a2aService- the Nacos A2aService instance, which also can useAiService.
-
-
Method Details
-
registerAgent
public void registerAgent(io.a2a.spec.AgentCard agentCard, NacosA2aRegistryProperties a2aProperties) Registers an A2A agent card and endpoint to Nacos.- Parameters:
agentCard- the agent card to registera2aProperties- the properties for A2A registry
-