Package akka.javasdk.agent
Interface AgentRegistry
public interface AgentRegistry
The registry contains information about all agents. This is useful when implementing planners for
multi-agent collaboration.
It can be injected as a constructor parameter in components.
The agent id is defined with the ComponentId
annotation on
the agent class. Additional information is defined with the AgentDescription
annotation on the agent class.
Note that agents can be called based on the id without knowing the exact agent class or lambda
of the agent method by using the {dynamicCall
} of the component client.
var response =
componentClient
.forAgent().inSession(sessionId)
.dynamicCall(agentId)
.invoke(request);
Not for user extension, implementation provided by the SDK.
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionInformation about a given agent.agentsWithRole
(String role) Agent identifiers of agents with a certain role.Information about All agents.
-
Method Details
-
allAgents
Set<AgentRegistry.AgentInfo> allAgents()Information about All agents. The agent id is defined with theComponentId
annotation on the agent class. Additional information is defined with theAgentDescription
annotation on the agent class. -
agentsWithRole
Agent identifiers of agents with a certain role. The role is defined withAgentDescription
annotation on the agent class. The agent id is defined with theComponentId
annotation on the agent class. Additional information is defined with theAgentDescription
annotation on the agent class. -
agentInfo
Information about a given agent. The agent id is defined with theComponentId
annotation on the agent class. Additional information is defined with theAgentDescription
annotation on the agent class.
-