Interface AgentRegistry
- All Known Implementing Classes:
InMemoryAgentRegistry
public interface AgentRegistry
SPI for tracking live agents the admin surface can inspect or act on.
AgentScope-Java exposes ReActAgent as a prototype-scoped bean by default, so a
Spring Map<String, Agent> scan will only find singleton agents (or none). To make the
inventory complete, application code should call register(Agent) after constructing a
long-lived agent — typically in a @PostConstruct on a Service that owns it, or wrapped
inside the agent factory.
The default InMemoryAgentRegistry is fine for single-node deployments; for
cluster-aware deployments, swap in an implementation backed by Nacos, Redis, or another shared
store.
-
Method Summary
-
Method Details
-
register
void register(io.agentscope.core.agent.Agent agent) -
unregister
-
find
-
list
List<io.agentscope.core.agent.Agent> list()All registered agents in insertion order. -
size
int size()
-