Package com.tnsai.agents.groups
Interface AgentGroupFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
SPI for creating AgentGroup instances.
The default implementation is provided by the tnsai-coordination module.
This factory is discovered through the Java service-provider mechanism at
runtime, allowing
tnsai-core to remain independent of concrete group implementations.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptioncreate(String id, String name, String description, GroupPolicy policy) Creates a new AgentGroup instance.static AgentGroupFactorydiscover()Discovers an AgentGroupFactory via ServiceLoader.
-
Method Details
-
create
Creates a new AgentGroup instance.- Parameters:
id- group IDname- group namedescription- group description (nullable)policy- group policy- Returns:
- new AgentGroup instance
-
discover
Discovers an AgentGroupFactory via ServiceLoader.- Returns:
- discovered factory
- Throws:
IllegalStateException- if no factory is found on the classpath
-