Package io.agentscope.spring.boot.admin
Class AgentscopeAdminAutoConfiguration
java.lang.Object
io.agentscope.spring.boot.admin.AgentscopeAdminAutoConfiguration
@AutoConfiguration
@ConditionalOnClass(io.agentscope.core.agent.Agent.class)
@ConditionalOnProperty(prefix="agentscope.admin",
name="enabled",
havingValue="true")
@EnableConfigurationProperties(AdminProperties.class)
@Import(AdminOpenApiConfiguration.class)
public class AgentscopeAdminAutoConfiguration
extends Object
Spring Boot auto-configuration for the AgentScope admin/ops starter.
Activation rules:
agentscope.admin.enabled=true— master switch (defaults to false so this starter never accidentally exposes admin endpoints just by being on the classpath).Agenton the classpath — guards against running without agentscope-core.
Web controllers register only when a Servlet web application is detected
(ConditionalOnWebApplication). Actuator endpoints register only when the Actuator
Endpoint type is on the classpath.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classControl-plane Actuator endpoints.static final classTiny lifecycle bean — wires/unwires the metrics hook with the application context.static classData-plane REST surface. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionagentscopeAdminAuditLogger(AdminProperties properties, org.springframework.context.ApplicationEventPublisher publisher) agentscopeAgentInventory(AgentRegistry registry, org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.core.tool.Toolkit>> toolkits, org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.core.model.Model>> models) agentscopeAgentRegistry(org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.core.agent.Agent>> agentBeans) DefaultAgentRegistry.agentscopeBuiltinCommandRegistrar(AdminCommandRegistry registry, AdminProperties properties) Registers aMetricsHookintoAgentBase.addSystemHook(Hook)at startup so every subsequently constructed agent contributes token-usage counters.agentscopeSessionOperations(AgentRegistry registry, SummarizationStrategy summarizer, AdminProperties properties, SnapshotStore snapshots) agentscopeSubagentInventory(org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.harness.agent.middleware.SubagentEntry>> entryBeans, org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.harness.agent.subagent.SubagentDeclaration>> declarationBeans) agentscopeSubagentTaskOperations(org.springframework.beans.factory.ObjectProvider<io.agentscope.harness.agent.subagent.task.TaskRepository> repoProvider)
-
Constructor Details
-
AgentscopeAdminAutoConfiguration
public AgentscopeAdminAutoConfiguration()
-
-
Method Details
-
agentscopeAgentRegistry
@Bean @ConditionalOnMissingBean public AgentRegistry agentscopeAgentRegistry(org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.core.agent.Agent>> agentBeans) DefaultAgentRegistry. Auto-seeded from any singletonAgentbeans found in the context — applications using prototype-scoped agents (the AgentScope default) must callAgentRegistry.register(Agent)themselves when they create an agent. -
agentscopeAdminCommandRegistry
-
agentscopeBuiltinCommandRegistrar
@Bean public BuiltinCommandRegistrar agentscopeBuiltinCommandRegistrar(AdminCommandRegistry registry, AdminProperties properties) -
agentscopeAdminAuditLogger
@Bean @ConditionalOnMissingBean public AdminAuditLogger agentscopeAdminAuditLogger(AdminProperties properties, org.springframework.context.ApplicationEventPublisher publisher) -
agentscopeSummarizationStrategy
-
agentscopeSnapshotStore
-
agentscopeSessionOperations
@Bean @ConditionalOnMissingBean public SessionOperations agentscopeSessionOperations(AgentRegistry registry, SummarizationStrategy summarizer, AdminProperties properties, SnapshotStore snapshots) -
agentscopeAgentInventory
@Bean @ConditionalOnMissingBean public AgentInventory agentscopeAgentInventory(AgentRegistry registry, org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.core.tool.Toolkit>> toolkits, org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.core.model.Model>> models) -
agentscopeSubagentInventory
@Bean @ConditionalOnMissingBean public SubagentInventory agentscopeSubagentInventory(org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.harness.agent.middleware.SubagentEntry>> entryBeans, org.springframework.beans.factory.ObjectProvider<Map<String, io.agentscope.harness.agent.subagent.SubagentDeclaration>> declarationBeans) -
agentscopeSubagentTaskOperations
@Bean @ConditionalOnMissingBean public SubagentTaskOperations agentscopeSubagentTaskOperations(org.springframework.beans.factory.ObjectProvider<io.agentscope.harness.agent.subagent.task.TaskRepository> repoProvider) -
agentscopeMetricsRecorder
-
agentscopeMetricsHookLifecycle
@Bean @ConditionalOnMissingBean public AgentscopeAdminAutoConfiguration.MetricsHookLifecycle agentscopeMetricsHookLifecycle(MetricsRecorder recorder) Registers aMetricsHookintoAgentBase.addSystemHook(Hook)at startup so every subsequently constructed agent contributes token-usage counters.The hook is unregistered on context close, so reloading the starter does not double-count.
-