Class AgentRegistry
java.lang.Object
io.micronaut.langchain4j.agentic.AgentRegistry
Registry caching built agent proxies per agent interface.
Internal utility; not intended for extension.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetOrCreateAgent(@NonNull Class<?> beanType, @NonNull Supplier<Object> agentSupplier) Retrieve a cached agent proxy by agent interface type, building and caching it atomically when absent.
-
Constructor Details
-
AgentRegistry
public AgentRegistry()
-
-
Method Details
-
getOrCreateAgent
public Object getOrCreateAgent(@NonNull @NonNull Class<?> beanType, @NonNull @NonNull Supplier<Object> agentSupplier) Retrieve a cached agent proxy by agent interface type, building and caching it atomically when absent.- Parameters:
beanType- the agent interface typeagentSupplier- the agent proxy supplier- Returns:
- the cached or newly created agent proxy instance
-