AS AgentScopeAPI 手册 / API Reference

AgentscopeAdminAutoConfiguration

@AutoConfiguration @ConditionalOnClass(Agent.class) @ConditionalOnProperty(prefix = "agentscope.admin", name = "enabled", havingValue = "true") @EnableConfigurationProperties(AdminProperties.class) @org.springframework.context.annotation.Import(AdminOpenApiConfiguration.class) public class AgentscopeAdminAutoConfiguration
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:89–347

Agentscope 管理台 Auto 配置,保存相关配置项。位于 io.agentscope.spring.boot.admin 包。核心成员包括 agentscopeAgentRegistry、agentscopeAdminCommandRegistry、agentscopeBuiltinCommandRegistrar、agentscopeAdminAuditLogger、agentscopeSummarizationStrategy、agentscopeSnapshotStore。

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).

  • Agent on 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

类Class类型Kind说明Description
MetricsHookLifecycle类class
指标钩子生命周期,承载智能体的部署、调度与服务化运行。
Tiny lifecycle bean — wires/unwires the metrics hook with the application context.
WebMvcConfiguration类class
Web Mvc 配置,保存相关配置项。
Data-plane REST surface.
ActuatorEndpointsConfiguration类class
Actuator Endpoints 配置,保存相关配置项。
Control-plane Actuator endpoints.

方法摘要Method Summary

方法Method说明Description
public AgentRegistry agentscopeAgentRegistry(ObjectProvider<Map<String, Agent>> agentBeans)
设置该参数。
Default `AgentRegistry`.
public AdminCommandRegistry agentscopeAdminCommandRegistry()
返回 `agentscopeAdminCommandRegistry` 结果。
Returns the agentscope admin command registry.
public BuiltinCommandRegistrar agentscopeBuiltinCommandRegistrar(AdminCommandRegistry registry, AdminProperties properties)
执行 `agentscopeBuiltinCommandRegistrar` 方法。
Performs the agentscope builtin command registrar operation.
public AdminAuditLogger agentscopeAdminAuditLogger(AdminProperties properties, ApplicationEventPublisher publisher)
执行 `agentscopeAdminAuditLogger` 方法。
Performs the agentscope admin audit logger operation.
public SummarizationStrategy agentscopeSummarizationStrategy()
返回 `agentscopeSummarizationStrategy` 结果。
Returns the agentscope summarization strategy.
public SnapshotStore agentscopeSnapshotStore()
返回 `agentscopeSnapshotStore` 结果。
Returns the agentscope snapshot store.
public SessionOperations agentscopeSessionOperations(AgentRegistry registry, SummarizationStrategy summarizer, AdminProperties properties, SnapshotStore snapshots)
执行 `agentscopeSessionOperations` 方法。
Performs the agentscope session operations operation.
public AgentInventory agentscopeAgentInventory(AgentRegistry registry, ObjectProvider<Map<String, Toolkit>> toolkits, ObjectProvider<Map<String, Model>> models)
执行 `agentscopeAgentInventory` 方法。
Performs the agentscope agent inventory operation.
public SubagentInventory agentscopeSubagentInventory(ObjectProvider<Map<String, SubagentEntry>> entryBeans, ObjectProvider<Map<String, SubagentDeclaration>> declarationBeans)
执行 `agentscopeSubagentInventory` 方法。
Performs the agentscope subagent inventory operation.
public SubagentTaskOperations agentscopeSubagentTaskOperations(ObjectProvider<TaskRepository> repoProvider)
设置该参数。
Performs the agentscope subagent task operations operation.
public MetricsRecorder agentscopeMetricsRecorder()
返回 `agentscopeMetricsRecorder` 结果。
Returns the agentscope metrics recorder.
public MetricsHookLifecycle agentscopeMetricsHookLifecycle(MetricsRecorder recorder)
设置该参数。
Registers a `MetricsHook` into `AgentBase#addSystemHook(Hook)` at startup so every subsequently constructed agent contributes token-usage counters.

方法详情Method Detail

agentscopeAgentRegistry

public AgentRegistry agentscopeAgentRegistry(ObjectProvider<Map<String, Agent>> agentBeans)

设置该参数。

Default AgentRegistry.

参数Parameters
名称Name类型Type说明Description
agentBeansObjectProvider<Map<String, Agent>>智能体 Beans(类型 `ObjectProvider >`)。The agent beans.
返回Returns AgentRegistry
返回AgentRegistry。Returns agent registry.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:104–123

agentscopeAdminCommandRegistry

public AdminCommandRegistry agentscopeAdminCommandRegistry()

返回 agentscopeAdminCommandRegistry 结果。

Returns the agentscope admin command registry.

返回Returns AdminCommandRegistry
返回AdminCommandRegistry。Returns admin command registry.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:125–129

agentscopeBuiltinCommandRegistrar

public BuiltinCommandRegistrar agentscopeBuiltinCommandRegistrar(AdminCommandRegistry registry, AdminProperties properties)

执行 agentscopeBuiltinCommandRegistrar 方法。

Performs the agentscope builtin command registrar operation.

参数Parameters
名称Name类型Type说明Description
registryAdminCommandRegistry注册表(类型 `AdminCommandRegistry`)。The registry.
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
返回Returns BuiltinCommandRegistrar
返回BuiltinCommandRegistrar。Returns builtin command registrar.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:131–135

agentscopeAdminAuditLogger

public AdminAuditLogger agentscopeAdminAuditLogger(AdminProperties properties, ApplicationEventPublisher publisher)

执行 agentscopeAdminAuditLogger 方法。

Performs the agentscope admin audit logger operation.

参数Parameters
名称Name类型Type说明Description
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
publisherApplicationEventPublisherpublisher(类型 `ApplicationEventPublisher`)。The publisher.
返回Returns AdminAuditLogger
返回AdminAuditLogger。Returns admin audit logger.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:137–142

agentscopeSummarizationStrategy

public SummarizationStrategy agentscopeSummarizationStrategy()

返回 agentscopeSummarizationStrategy 结果。

Returns the agentscope summarization strategy.

返回Returns SummarizationStrategy
返回SummarizationStrategy。Returns summarization strategy.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:144–148

agentscopeSnapshotStore

public SnapshotStore agentscopeSnapshotStore()

返回 agentscopeSnapshotStore 结果。

Returns the agentscope snapshot store.

返回Returns SnapshotStore
返回快照存储。Returns snapshot store.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:150–154

agentscopeSessionOperations

public SessionOperations agentscopeSessionOperations(AgentRegistry registry, SummarizationStrategy summarizer, AdminProperties properties, SnapshotStore snapshots)

执行 agentscopeSessionOperations 方法。

Performs the agentscope session operations operation.

参数Parameters
名称Name类型Type说明Description
registryAgentRegistry注册表(类型 `AgentRegistry`)。The registry.
summarizerSummarizationStrategysummarizer(类型 `SummarizationStrategy`)。The summarizer.
propertiesAdminProperties属性(类型 `AdminProperties`)。The properties.
snapshotsSnapshotStoresnapshots(类型 `SnapshotStore`)。The snapshots.
返回Returns SessionOperations
返回SessionOperations。Returns session operations.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:156–164

agentscopeAgentInventory

public AgentInventory agentscopeAgentInventory(AgentRegistry registry, ObjectProvider<Map<String, Toolkit>> toolkits, ObjectProvider<Map<String, Model>> models)

执行 agentscopeAgentInventory 方法。

Performs the agentscope agent inventory operation.

参数Parameters
名称Name类型Type说明Description
registryAgentRegistry注册表(类型 `AgentRegistry`)。The registry.
toolkitsObjectProvider<Map<String, Toolkit>>toolkits(类型 `ObjectProvider >`)。The toolkits.
modelsObjectProvider<Map<String, Model>>模型(类型 `ObjectProvider >`)。The models.
返回Returns AgentInventory
返回AgentInventory。Returns agent inventory.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:166–173

agentscopeSubagentInventory

public SubagentInventory agentscopeSubagentInventory(ObjectProvider<Map<String, SubagentEntry>> entryBeans, ObjectProvider<Map<String, SubagentDeclaration>> declarationBeans)

执行 agentscopeSubagentInventory 方法。

Performs the agentscope subagent inventory operation.

参数Parameters
名称Name类型Type说明Description
entryBeansObjectProvider<Map<String, SubagentEntry>>条目 Beans(类型 `ObjectProvider >`)。The entry beans.
declarationBeansObjectProvider<Map<String, SubagentDeclaration>>declaration Beans(类型 `ObjectProvider >`)。The declaration beans.
返回Returns SubagentInventory
返回SubagentInventory。Returns subagent inventory.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:175–181

agentscopeSubagentTaskOperations

public SubagentTaskOperations agentscopeSubagentTaskOperations(ObjectProvider<TaskRepository> repoProvider)

设置该参数。

Performs the agentscope subagent task operations operation.

参数Parameters
名称Name类型Type说明Description
repoProviderObjectProvider<TaskRepository>仓库提供者(类型 `ObjectProvider`)。The repo provider.
返回Returns SubagentTaskOperations
返回SubagentTaskOperations。Returns subagent task operations.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:183–188

agentscopeMetricsRecorder

public MetricsRecorder agentscopeMetricsRecorder()

返回 agentscopeMetricsRecorder 结果。

Returns the agentscope metrics recorder.

返回Returns MetricsRecorder
返回MetricsRecorder。Returns metrics recorder.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:190–194

agentscopeMetricsHookLifecycle

public MetricsHookLifecycle agentscopeMetricsHookLifecycle(MetricsRecorder recorder)

设置该参数。

Registers a MetricsHook into AgentBase#addSystemHook(Hook) at startup so every subsequently constructed agent contributes token-usage counters.

参数Parameters
名称Name类型Type说明Description
recorderMetricsRecorder记录器(类型 `MetricsRecorder`)。The recorder.
返回Returns MetricsHookLifecycle
返回MetricsHookLifecycle。Returns metrics hook lifecycle.
源码Source io/agentscope/spring/boot/admin/AgentscopeAdminAutoConfiguration.java:202–206

嵌套类详情Nested Class Detail

MetricsHookLifecycle

public static final class MetricsHookLifecycle

指标钩子生命周期,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin 包。核心成员包括 register、unregister、hook、MetricsHookLifecycle。

Tiny lifecycle bean — wires/unwires the metrics hook with the application context.

WebMvcConfiguration

@Configuration(proxyBeanMethods = false) @ConditionalOnWebApplication(type = ConditionalOnWebApplication.Type.SERVLET) @ConditionalOnClass(name = "org.springframework.web.bind.annotation.RestController") public static class WebMvcConfiguration

Web Mvc 配置,保存相关配置项。位于 io.agentscope.spring.boot.admin 包。核心成员包括 agentscopeSessionAdminController、agentscopeSubagentTaskController。

Data-plane REST surface. Only loaded for Servlet web applications.

ActuatorEndpointsConfiguration

@Configuration(proxyBeanMethods = false) @ConditionalOnClass(name = "org.springframework.boot.actuate.endpoint.annotation.Endpoint") public static class ActuatorEndpointsConfiguration

Actuator Endpoints 配置,保存相关配置项。位于 io.agentscope.spring.boot.admin 包。核心成员包括 agentscopeStatusEndpoint、agentscopeAgentsEndpoint、agentscopeToolsEndpoint、agentscopeModelsEndpoint、agentscopeCommandsEndpoint、agentscopeDoctorEndpoint。

Control-plane Actuator endpoints. Loaded only when Spring Boot Actuator's @Endpoint type is on the classpath; each endpoint registration still respects the standard management.endpoint.<id>.enabled / management.endpoints.web.exposure conventions.

基于官方固定版本源码静态生成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.