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, name, and description are defined with the Component
annotation on the agent class. The agent role is defined with
the AgentRole
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() -
agentsWithRole
-
agentInfo
-