AgentHandlerConfiguration
public class AgentHandlerConfiguration
源码Source
io/agentscope/runtime/protocol/a2a/AgentHandlerConfiguration.java:34–95智能体处理器配置,保存相关配置项。位于 io.agentscope.runtime.protocol.a2a 包。核心成员包括 getInstance、jsonrpcHandler、requestHandler、AgentHandlerConfiguration。
A class in io.agentscope.runtime.protocol.a2a that supports discovery, delegation and collaboration between agents. Declared in io.agentscope.runtime.protocol.a2a.
构造器摘要Constructor Summary
方法摘要Method Summary
构造器详情Constructor Detail
AgentHandlerConfiguration
public AgentHandlerConfiguration(Runner runner, AgentCard agentCard, A2aProtocolConfig a2aProtocolConfig)
初始化 AgentHandlerConfiguration 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runner | Runner | 运行器(类型 `Runner`)。The runner. |
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。The agent card. |
a2aProtocolConfig | A2aProtocolConfig | a 2 a 协议配置(类型 `A2aProtocolConfig`)。The a 2 a protocol config. |
源码Source
io/agentscope/runtime/protocol/a2a/AgentHandlerConfiguration.java:40–42AgentHandlerConfiguration
protected AgentHandlerConfiguration(AgentExecutor agentExecutor, AgentCard agentCard, A2aProtocolConfig a2aProtocolConfig)
初始化 AgentHandlerConfiguration 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentExecutor | AgentExecutor | 智能体执行器(类型 `AgentExecutor`)。The agent executor. |
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。The agent card. |
a2aProtocolConfig | A2aProtocolConfig | a 2 a 协议配置(类型 `A2aProtocolConfig`)。The a 2 a protocol config. |
源码Source
io/agentscope/runtime/protocol/a2a/AgentHandlerConfiguration.java:44–46方法详情Method Detail
getInstance
public static AgentHandlerConfiguration getInstance(Runner runner, AgentCard agentCard, ObjectProvider<ProtocolConfig> protocolConfigs)
static
获取实例。
Returns the instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
runner | Runner | 运行器(类型 `Runner`)。The runner. |
agentCard | AgentCard | 智能体卡片(类型 `AgentCard`)。The agent card. |
protocolConfigs | ObjectProvider<ProtocolConfig> | 协议 Configs(类型 `ObjectProvider`)。The protocol configs. |
AgentHandlerConfiguration返回AgentHandlerConfiguration。Returns agent handler configuration.
源码Source
io/agentscope/runtime/protocol/a2a/AgentHandlerConfiguration.java:48–61jsonrpcHandler
public JSONRPCHandler jsonrpcHandler()
返回 jsonrpcHandler 结果。
Returns the jsonrpc handler.
JSONRPCHandler返回JSONRPCHandler。Returns JSON RPC handler.
源码Source
io/agentscope/runtime/protocol/a2a/AgentHandlerConfiguration.java:63–65requestHandler
public static RequestHandler requestHandler(AgentExecutor agentExecutor, A2aProtocolConfig a2aProtocolConfig)
static
执行请求处理器相关操作。
Performs the request handler operation.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentExecutor | AgentExecutor | 智能体执行器(类型 `AgentExecutor`)。The agent executor. |
a2aProtocolConfig | A2aProtocolConfig | a 2 a 协议配置(类型 `A2aProtocolConfig`)。The a 2 a protocol config. |
RequestHandler返回RequestHandler。Returns request handler.
源码Source
io/agentscope/runtime/protocol/a2a/AgentHandlerConfiguration.java:67–75