NacosA2aRegistry
public class NacosA2aRegistry
源码Source
io/agentscope/core/nacos/a2a/registry/NacosA2aRegistry.java:37–149Nacos A 2 a 注册表,支持智能体之间的发现、委派与协作。位于 io.agentscope.core.nacos.a2a.registry 包。核心成员包括 registerAgent、NacosA2aRegistry。
AgentScope Extensions for Registry A2A AgentCard and A2A instance endpoint to Nacos.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public NacosA2aRegistry(Properties nacosProperties) throws NacosException | 初始化 `NacosA2aRegistry` 实例。 New instance of `NacosA2aRegistry` by Nacos server properties. |
public NacosA2aRegistry(A2aService a2aService) | 初始化 `NacosA2aRegistry` 实例。 New instance of `NacosA2aRegistry` by Nacos Client instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public void registerAgent(AgentCard agentCard, NacosA2aRegistryProperties a2aProperties) | 注册智能体。 Registers an A2A agent card and endpoint to Nacos. |
构造器详情Constructor Detail
NacosA2aRegistry
public NacosA2aRegistry(Properties nacosProperties) throws NacosException
初始化 NacosA2aRegistry 实例。
New instance of NacosA2aRegistry by Nacos server properties.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
nacosProperties | Properties | Nacos 属性(类型 `Properties`)。the properties for Nacos server |
NacosException可能抛出 `NacosException`。Thrown when the operation cannot be completed.
源码Source
io/agentscope/core/nacos/a2a/registry/NacosA2aRegistry.java:49–51NacosA2aRegistry
public NacosA2aRegistry(A2aService a2aService)
初始化 NacosA2aRegistry 实例。
New instance of NacosA2aRegistry by Nacos Client instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
a2aService | A2aService | a 2 a 服务(类型 `A2aService`)。the Nacos A2aService instance, which also can use `com.alibaba.nacos.api.ai.AiService`. |
源码Source
io/agentscope/core/nacos/a2a/registry/NacosA2aRegistry.java:58–60方法详情Method Detail
registerAgent
public void registerAgent(AgentCard agentCard, NacosA2aRegistryProperties a2aProperties)
注册智能体。
Registers an A2A agent card and endpoint to Nacos.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentCard | AgentCard | 智能体卡片到注册。the agent card to register |
a2aProperties | NacosA2aRegistryProperties | 属性用于 A2A 注册表。the properties for A2A registry |
源码Source
io/agentscope/core/nacos/a2a/registry/NacosA2aRegistry.java:68–77