Class HumanInTheLoop.HumanInTheLoopBuilder
java.lang.Object
dev.langchain4j.agentic.workflow.HumanInTheLoop.HumanInTheLoopBuilder
- Enclosing class:
HumanInTheLoop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionactivationCondition(String description, Predicate<AgenticScope> activationCondition) Sets the condition, with its description, under which this agent runs when it is invoked as a subagent of an agentic system.activationCondition(Predicate<AgenticScope> activationCondition) Sets the condition under which this agent runs when it is invoked as a subagent of an agentic system.async(boolean async) Controls whether this agent executes asynchronously within an agentic system.build()description(String description) inputKeys(Class<?> type1, String name1, Class<?> type2, String name2, Class<?> type3, String name3, Class<?> type4, String name4) inputs(List<AgentArgument> inputs) listener(AgentListener agentListener) responseProvider(Function<AgenticScope, ?> responseProvider) responseProvider(Supplier<?> responseProvider)
-
Constructor Details
-
HumanInTheLoopBuilder
public HumanInTheLoopBuilder()
-
-
Method Details
-
responseProvider
-
responseProvider
public HumanInTheLoop.HumanInTheLoopBuilder responseProvider(Function<AgenticScope, ?> responseProvider) -
outputKey
-
description
-
async
Controls whether this agent executes asynchronously within an agentic system. The result is awaited only where it is read: by another agent taking it as an argument, or by the output function or output key of the agentic system.When nothing reads the result, the call to the agentic system returns while the agent is still running, and the result or the failure of the agent is then reported only to its
AgentListener. The next call on the same memory id waits for these agents to complete before it starts.- Parameters:
async-trueto run asynchronously- Returns:
- this builder
-
inputs
-
inputKey
-
inputKeys
public HumanInTheLoop.HumanInTheLoopBuilder inputKeys(Class<?> type1, String name1, Class<?> type2, String name2) -
inputKeys
-
inputKeys
-
listener
-
activationCondition
public HumanInTheLoop.HumanInTheLoopBuilder activationCondition(Predicate<AgenticScope> activationCondition) Sets the condition under which this agent runs when it is invoked as a subagent of an agentic system. When the condition is false the user is not asked anything and the agent is skipped. It can be evaluated more than once, so it must be free of side effects. -
activationCondition
public HumanInTheLoop.HumanInTheLoopBuilder activationCondition(String description, Predicate<AgenticScope> activationCondition) Sets the condition, with its description, under which this agent runs when it is invoked as a subagent of an agentic system. When the condition is false the user is not asked anything and the agent is skipped. It can be evaluated more than once, so it must be free of side effects. -
build
-