Class SupervisorAgentServiceImpl<T>
java.lang.Object
dev.langchain4j.agentic.internal.AbstractServiceBuilder<T, SupervisorAgentServiceImpl<T>>
dev.langchain4j.agentic.supervisor.SupervisorAgentServiceImpl<T>
- All Implemented Interfaces:
AgenticService<SupervisorAgentService<T>, T>, SupervisorAgentService<T>
public class SupervisorAgentServiceImpl<T>
extends AbstractServiceBuilder<T, SupervisorAgentServiceImpl<T>>
implements SupervisorAgentService<T>, AgenticService<SupervisorAgentService<T>, T>
-
Field Summary
Fields inherited from class AbstractServiceBuilder
agenticMethod, agentInstanceFactory, agentListener, agentServiceClass, beforeCall, compensateOnError, description, errorHandler, executor, name, output, outputKey, subagents -
Constructor Summary
ConstructorsConstructorDescriptionSupervisorAgentServiceImpl(Class<T> agentServiceClass, Method agenticMethod) SupervisorAgentServiceImpl(Class<T> agentServiceClass, Method agenticMethod, ChatModel chatModel) -
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the agentic service, returning a proxy that can be invoked to execute the configured workflow.builder()static <T> SupervisorAgentService<T> chatMemoryProvider(ChatMemoryProvider chatMemoryProvider) contextGenerationStrategy(SupervisorContextStrategy contextStrategy) maxAgentsInvocations(int maxAgentsInvocations) requestGenerator(Function<AgenticScope, String> requestGenerator) responseStrategy(SupervisorResponseStrategy responseStrategy) supervisorContext(String supervisorContext) Methods inherited from class AbstractServiceBuilder
agentInstanceFactory, beforeCall, build, build, compensateOnError, description, errorHandler, executor, listener, name, output, outputKey, outputKey, subAgents, subAgentsMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface AgenticService
beforeCall, compensateOnError, description, errorHandler, listener, name, output, outputKey, outputKey, subAgents, subAgentsMethods inherited from interface SupervisorAgentService
beforeCall, compensateOnError, description, errorHandler, listener, name, output, outputKey, subAgents, subAgents
-
Constructor Details
-
SupervisorAgentServiceImpl
-
SupervisorAgentServiceImpl
-
-
Method Details
-
build
Description copied from interface:AgenticServiceBuilds the agentic service, returning a proxy that can be invoked to execute the configured workflow.- Specified by:
buildin interfaceAgenticService<SupervisorAgentService<T>, T>- Specified by:
buildin interfaceSupervisorAgentService<T>- Returns:
- the built agent proxy
-
builder
-
builder
-
chatModel
- Specified by:
chatModelin interfaceSupervisorAgentService<T>
-
chatMemoryProvider
- Specified by:
chatMemoryProviderin interfaceSupervisorAgentService<T>
-
requestGenerator
public SupervisorAgentServiceImpl<T> requestGenerator(Function<AgenticScope, String> requestGenerator) - Specified by:
requestGeneratorin interfaceSupervisorAgentService<T>
-
contextGenerationStrategy
public SupervisorAgentServiceImpl<T> contextGenerationStrategy(SupervisorContextStrategy contextStrategy) - Specified by:
contextGenerationStrategyin interfaceSupervisorAgentService<T>
-
responseStrategy
- Specified by:
responseStrategyin interfaceSupervisorAgentService<T>
-
supervisorContext
- Specified by:
supervisorContextin interfaceSupervisorAgentService<T>
-
maxAgentsInvocations
- Specified by:
maxAgentsInvocationsin interfaceSupervisorAgentService<T>
-
serviceType
- Specified by:
serviceTypein classAbstractServiceBuilder<T, SupervisorAgentServiceImpl<T>>
-