Class AgentscopeAguiMvcAutoConfiguration
java.lang.Object
io.agentscope.spring.boot.agui.mvc.AgentscopeAguiMvcAutoConfiguration
@AutoConfiguration
@ConditionalOnClass({org.springframework.web.servlet.mvc.method.annotation.SseEmitter.class,io.agentscope.core.agent.Agent.class})
@ConditionalOnBean(io.agentscope.core.agui.registry.AguiAgentRegistry.class)
@ConditionalOnWebApplication(type=SERVLET)
@EnableConfigurationProperties(AguiProperties.class)
public class AgentscopeAguiMvcAutoConfiguration
extends Object
Spring Boot auto-configuration for AG-UI MVC integration.
This auto-configuration provides:
- AguiAgentRegistry bean for managing agents
- AguiMvcController bean for handling requests
- AguiRestController bean for exposing endpoints
To use this auto-configuration, simply add the dependency to your project and register your agents with the AguiAgentRegistry.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaguiMvcController(io.agentscope.core.agui.registry.AguiAgentRegistry registry, ThreadSessionManager sessionManager, AguiProperties props) Creates the AG-UI MVC controller bean.aguiRestController(AguiMvcController aguiMvcController, AguiProperties props) Creates the REST controller for AG-UI endpoints.Creates the thread session manager bean.
-
Constructor Details
-
AgentscopeAguiMvcAutoConfiguration
public AgentscopeAguiMvcAutoConfiguration()
-
-
Method Details
-
threadSessionManager
@Bean @ConditionalOnMissingBean public ThreadSessionManager threadSessionManager(AguiProperties props) Creates the thread session manager bean.- Parameters:
props- The configuration properties- Returns:
- A new ThreadSessionManager
-
aguiMvcController
@Bean @ConditionalOnMissingBean public AguiMvcController aguiMvcController(io.agentscope.core.agui.registry.AguiAgentRegistry registry, ThreadSessionManager sessionManager, AguiProperties props) Creates the AG-UI MVC controller bean.- Parameters:
registry- The agent registrysessionManager- The thread session managerprops- The configuration properties- Returns:
- A new AguiMvcController
-
aguiRestController
@Bean @ConditionalOnMissingBean public AguiRestController aguiRestController(AguiMvcController aguiMvcController, AguiProperties props) Creates the REST controller for AG-UI endpoints.- Parameters:
aguiMvcController- The AG-UI MVC controllerprops- The configuration properties- Returns:
- A new AguiRestController
-