AgentInventory
public final class AgentInventory
源码Source
io/agentscope/spring/boot/admin/service/AgentInventory.java:38–110智能体清单,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.service 包。核心成员包括 agents、toolsByBean、modelsByBean、processStatus、AgentInventory。
Aggregates inventory information across AgentRegistry, Spring-managed Toolkit
and Model beans, and the GracefulShutdownManager.
Read-only by design; consumed by every Actuator endpoint in this starter.
构造器摘要Constructor Summary
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public List<AgentDescriptor> agents() | 返回智能体。 Returns the agents. |
public Map<String, List<String>> toolsByBean() | 返回`beanName -> [toolName...]`。 Returns `beanName -> [toolName...]`. |
public Map<String, String> modelsByBean() | 返回`beanName -> modelName`。 Returns `beanName -> modelName`. |
public Map<String, Object> processStatus() | 处理状态。 Process-wide status fields derived from `GracefulShutdownManager`. |
构造器详情Constructor Detail
AgentInventory
public AgentInventory(AgentRegistry agentRegistry, ObjectProvider<Map<String, Toolkit>> toolkitBeans, ObjectProvider<Map<String, Model>> modelBeans)
初始化 AgentInventory 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
agentRegistry | AgentRegistry | 智能体注册表(类型 `AgentRegistry`)。The agent registry. |
toolkitBeans | ObjectProvider<Map<String, Toolkit>> | 工具包 Beans(类型 `ObjectProvider >`)。The toolkit beans. |
modelBeans | ObjectProvider<Map<String, Model>> | 模型 Beans(类型 `ObjectProvider >`)。The model beans. |
源码Source
io/agentscope/spring/boot/admin/service/AgentInventory.java:44–51方法详情Method Detail
agents
public List<AgentDescriptor> agents()
返回智能体。
Returns the agents.
List<AgentDescriptor>返回列出。Returns list.
源码Source
io/agentscope/spring/boot/admin/service/AgentInventory.java:53–64toolsByBean
public Map<String, List<String>> toolsByBean()
返回beanName -> [toolName...]。
Returns beanName -> [toolName...].
Map<String, List<String>>返回映射>。Returns map.
源码Source
io/agentscope/spring/boot/admin/service/AgentInventory.java:67–82modelsByBean
public Map<String, String> modelsByBean()
返回beanName -> modelName。
Returns beanName -> modelName.
Map<String, String>返回映射。Returns map.
源码Source
io/agentscope/spring/boot/admin/service/AgentInventory.java:85–97processStatus
public Map<String, Object> processStatus()
处理状态。
Process-wide status fields derived from GracefulShutdownManager.
Map<String, Object>返回映射。Returns map.
源码Source
io/agentscope/spring/boot/admin/service/AgentInventory.java:100–109