AS AgentScopeAPI 手册 / API Reference

InMemoryAgentRegistry

public final class InMemoryAgentRegistry implements AgentRegistry
源码Source io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:27–58

In 记忆智能体注册表,承载智能体的部署、调度与服务化运行。位于 io.agentscope.spring.boot.admin.registry 包,实现 AgentRegistry。核心成员包括 register、unregister、find、list、size。

Single-node, in-memory AgentRegistry suitable as the starter default.

方法摘要Method Summary

方法Method说明Description
public void register(Agent agent)
设置注册。
Performs the register operation.
public void unregister(String agentId)
设置注销。
Performs the unregister operation.
public Optional<Agent> find(String agentId)
设置查找。
Performs the find operation.
public List<Agent> list()
返回列表。
Returns the list.
public int size()
返回大小。
Returns the size.

方法详情Method Detail

register

public void register(Agent agent)

设置注册。

Performs the register operation.

参数Parameters
名称Name类型Type说明Description
agentAgent智能体(类型 `Agent`)。The agent.
源码Source io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:31–35

unregister

public void unregister(String agentId)

设置注销。

Performs the unregister operation.

参数Parameters
名称Name类型Type说明Description
agentIdString智能体标识(类型 `String`)。The agent id.
源码Source io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:37–42

find

public Optional<Agent> find(String agentId)

设置查找。

Performs the find operation.

参数Parameters
名称Name类型Type说明Description
agentIdString智能体标识(类型 `String`)。The agent id.
返回Returns Optional<Agent>
返回可选。Returns optional.
源码Source io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:44–47

list

public List<Agent> list()

返回列表。

Returns the list.

返回Returns List<Agent>
返回列出。Returns list.
源码Source io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:49–52

size

public int size()

返回大小。

Returns the size.

返回Returns int
返回数值结果。Returns a numeric result.
源码Source io/agentscope/spring/boot/admin/registry/InMemoryAgentRegistry.java:54–57
基于官方固定版本源码静态生成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.