AS AgentScopeAPI 手册 / API Reference

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
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:55–182

Agentscope 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说明Description
public AgentRunner agentRunnerWithStarterRunner(ObjectProvider<ReActAgent> reActAgentProvider)
设置智能体运行器使用启动器运行器。
Performs the agent runner with starter runner operation.
public AgentRunner agentRunnerWithBuilder(ReActAgent.Builder agentBuilder)
设置智能体运行器使用构建器。
Performs the agent runner with builder operation.
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.
public AgentCardController agentCardController(AgentScopeA2aServer agentScopeA2aServer)
设置智能体卡片控制器。
Performs the agent card controller operation.
public A2aJsonRpcController a2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer)
设置该参数。
Autoconfiguration A2A JSON-RPC controller.
public ServerReadyListener serverReadyConfiguration(AgentScopeA2aServer agentScopeA2aServer)
设置服务端就绪配置。
Performs the server ready configuration operation.

方法详情Method Detail

agentRunnerWithStarterRunner

public AgentRunner agentRunnerWithStarterRunner(ObjectProvider<ReActAgent> reActAgentProvider)

设置智能体运行器使用启动器运行器。

Performs the agent runner with starter runner operation.

参数Parameters
名称Name类型Type说明Description
reActAgentProviderObjectProvider<ReActAgent>re 行动智能体提供者(类型 `ObjectProvider`)。The re act agent provider.
返回Returns AgentRunner
返回AgentRunner。Returns agent runner.
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:70–75

agentRunnerWithBuilder

public AgentRunner agentRunnerWithBuilder(ReActAgent.Builder agentBuilder)

设置智能体运行器使用构建器。

Performs the agent runner with builder operation.

参数Parameters
名称Name类型Type说明Description
agentBuilderReActAgent.Builder智能体构建器(类型 `ReActAgent.Builder`)。The agent builder.
返回Returns AgentRunner
返回AgentRunner。Returns agent runner.
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:77–82

agentScopeA2aServer

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.

参数Parameters
名称Name类型Type说明Description
agentRunnerAgentRunner智能体运行器(类型 `AgentRunner`)。The agent runner.
agentCardPropertiesA2aAgentCardProperties智能体卡片属性(类型 `A2aAgentCardProperties`)。The agent card properties.
commonPropertiesA2aCommonProperties通用属性(类型 `A2aCommonProperties`)。The common properties.
environmentEnvironment环境(类型 `Environment`)。The environment.
agentRegistriesList<AgentRegistry>智能体 Registries(类型 `List`)。The agent registries.
transportPropertiesList<CustomTransportProperties>传输层属性(类型 `List`)。The transport properties.
返回Returns AgentScopeA2aServer
返回AgentScopeA2aServer。Returns AgentScope a 2 a server.
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:84–109

agentCardController

public AgentCardController agentCardController(AgentScopeA2aServer agentScopeA2aServer)

设置智能体卡片控制器。

Performs the agent card controller operation.

参数Parameters
名称Name类型Type说明Description
agentScopeA2aServerAgentScopeA2aServer智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。The agent scope a 2 a server.
返回Returns AgentCardController
返回AgentCardController。Returns agent card controller.
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:111–115

a2aJsonRpcController

public A2aJsonRpcController a2aJsonRpcController(AgentScopeA2aServer agentScopeA2aServer)

设置该参数。

Autoconfiguration A2A JSON-RPC controller.

参数Parameters
名称Name类型Type说明Description
agentScopeA2aServerAgentScopeA2aServer智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。agentscope A2a server bean
返回Returns A2aJsonRpcController
返回A2aJsonRpcController。A2aJsonRpcController bean
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:125–129

serverReadyConfiguration

public ServerReadyListener serverReadyConfiguration(AgentScopeA2aServer agentScopeA2aServer)

设置服务端就绪配置。

Performs the server ready configuration operation.

参数Parameters
名称Name类型Type说明Description
agentScopeA2aServerAgentScopeA2aServer智能体范围 A 2 a 服务端(类型 `AgentScopeA2aServer`)。The agent scope a 2 a server.
返回Returns ServerReadyListener
返回ServerReadyListener。Returns server ready listener.
源码Source io/agentscope/spring/boot/a2a/AgentscopeA2aAutoConfiguration.java:131–135
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.