AgentscopeA2aAutoConfiguration
@AutoConfiguration(after = AgentscopeAutoConfiguration.class) @EnableConfigurationProperties({ A2aCommonProperties.class, A2aAgentCardProperties.class, JSONRPCProperties.class }) @ConditionalOnClass({AgentScopeA2aServer.class}) @ConditionalOnWebApplication @ConditionalOnProperty( prefix = Constants.A2A_SERVER_PREFIX, name = "enabled", havingValue = "true", matchIfMissing = true) public class AgentscopeA2aAutoConfiguration
io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:55–182Agentscope A 2 a Auto 配置,保存相关配置项。位于 io.agentscope.spring.boot.a2a 包。核心成员包括 agentRunnerWithStarterRunner、agentRunnerWithBuilder、agentScopeA2aServer、agentCardController、a2aJsonRpcController、serverReadyConfiguration。
Spring Boot autoconfiguration that exposes A2A beans for AgentScope.
Only support export web type transport for now. If support export not only web type, might remove condition of
ConditionalOnWebApplication.
方法摘要Method Summary
方法详情Method Detail
agentRunnerWithStarterRunner
public AgentRunner agentRunnerWithStarterRunner(ObjectProvider<ReActAgent> reActAgentProvider)
设置智能体运行器使用启动器运行器。
Performs the agent runner with starter runner operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
reActAgentProvider | ObjectProvider<ReActAgent> | re 行动智能体提供者(类型 `ObjectProvider`)。The re act agent provider. |
AgentRunnerio/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:70–75agentRunnerWithBuilder
public AgentRunner agentRunnerWithBuilder(ReActAgent.Builder agentBuilder)
设置智能体运行器使用构建器。
Performs the agent runner with builder operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentBuilder | ReActAgent.Builder | 智能体构建器(类型 `ReActAgent.Builder`)。The agent builder. |
AgentRunnerio/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:77–82agentScopeA2aServer
public AgentScopeA2aServer agentScopeA2aServer(AgentRunner agentRunner, A2aAgentCardProperties agentCardProperties, A2aCommonProperties commonProperties, Environment environment, List<AgentRegistry> agentRegistries, List<CustomTransportProperties> transportProperties)
执行智能体范围 A 2 a 服务端相关操作。
Performs the agent scope a 2 a server operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentRunner | AgentRunner | 智能体运行器(类型 `AgentRunner`)。The agent runner. |
agentCardProperties | A2aAgentCardProperties | 智能体卡片属性(类型 `A2aAgentCardProperties`)。The agent card properties. |
commonProperties | A2aCommonProperties | 通用属性(类型 `A2aCommonProperties`)。The common properties. |
environment | Environment | 环境(类型 `Environment`)。The environment. |
agentRegistries | List<AgentRegistry> | 智能体 Registries(类型 `List`)。The agent registries. |
transportProperties | List<CustomTransportProperties> | 传输层属性(类型 `List`)。The transport properties. |
AgentScopeA2aServerio/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:84–109agentCardController
public AgentCardController agentCardController(AgentScopeA2aServer agentScopeA2aServer)
设置智能体卡片控制器。
Performs the agent card controller operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentScopeA2aServer | AgentScopeA2aServer | 智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。The agent scope a 2 a server. |
AgentCardControllerio/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:111–115a2aJsonRpcController
public A2aJsonRpcController a2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer)
设置该参数。
Autoconfiguration A2A JSON-RPC controller.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentScopeA2aServer | AgentScopeA2aServer | 智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。agentscope A2a server bean |
A2aJsonRpcControllerio/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:125–129serverReadyConfiguration
public ServerReadyListener serverReadyConfiguration(AgentScopeA2aServer agentScopeA2aServer)
设置服务端就绪配置。
Performs the server ready configuration operation.
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentScopeA2aServer | AgentScopeA2aServer | 智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。The agent scope a 2 a server. |
ServerReadyListenerio/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:131–135