AgentCardController
@RestController @RequestMapping("/") public class AgentCardController
源码Source
io/agentscope/runtime/protocol/a2a/controller/AgentCardController.java:30–49智能体卡片控制器,支持智能体之间的发现、委派与协作。位于 io.agentscope.runtime.protocol.a2a.controller 包。核心成员包括 getAgentCard、getAgentCardInfo、AgentCardController。
A class in io.agentscope.runtime.protocol.a2a.controller that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.runtime.protocol.a2a.controller.
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public AgentCardController(Runner runner, AgentCard agentCard, ObjectProvider<ProtocolConfig> protocolConfigs) | 初始化 `AgentCardController` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public AgentCard getAgentCard() | 获取智能体卡片。 Returns the agent card. |
public AgentCard getAgentCardInfo() | 获取智能体卡片信息。 Returns the agent card info. |
构造器详情Constructor Detail
AgentCardController
public AgentCardController(Runner runner, AgentCard agentCard, ObjectProvider<ProtocolConfig> protocolConfigs)
初始化 AgentCardController 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runner | Runner | 运行器(类型 `Runner`)。The runner. |
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。The agent card. |
protocolConfigs | ObjectProvider<ProtocolConfig> | 协议 Configs(类型 `ObjectProvider`)。The protocol configs. |
源码Source
io/agentscope/runtime/protocol/a2a/controller/AgentCardController.java:36–38方法详情Method Detail
getAgentCard
public AgentCard getAgentCard()
获取智能体卡片。
Returns the agent card.
AgentCard返回AgentCard。Returns agent card.
源码Source
io/agentscope/runtime/protocol/a2a/controller/AgentCardController.java:40–43getAgentCardInfo
public AgentCard getAgentCardInfo()
获取智能体卡片信息。
Returns the agent card info.
AgentCard返回AgentCard。Returns agent card.
源码Source
io/agentscope/runtime/protocol/a2a/controller/AgentCardController.java:45–48