Uses of Class
dev.langchain4j.agentic.agent.DecisionAgentBuilder
Packages that use DecisionAgentBuilder
Package
Description
-
Uses of DecisionAgentBuilder in dev.langchain4j.agentic
Methods in dev.langchain4j.agentic that return DecisionAgentBuilderModifier and TypeMethodDescriptionstatic <T> DecisionAgentBuilder<T> AgenticServices.decisionAgentBuilder(Class<T> agentServiceClass) Creates a builder for a decision agent: an agent whose implementation is a single call to aDecisionModelinstead of a chat model.default DecisionAgentBuilder<T> AgenticServices.DeclarativeAgentCreationContext.decisionAgentBuilder()The builder of the decision agent being created, ornullwhen it is an AI agent.AgenticServices.DefaultDeclarativeDecisionAgentCreationContext.decisionAgentBuilder()Constructors in dev.langchain4j.agentic with parameters of type DecisionAgentBuilderModifierConstructorDescriptionDefaultDeclarativeDecisionAgentCreationContext(Class<T> agentServiceClass, DecisionAgentBuilder<T> decisionAgentBuilder) -
Uses of DecisionAgentBuilder in dev.langchain4j.agentic.agent
Methods in dev.langchain4j.agentic.agent that return DecisionAgentBuilderModifier and TypeMethodDescriptionDecisionAgentBuilder.activationCondition(String description, Predicate<AgenticScope> activationCondition) Sets the condition under which this agent runs when it is invoked as a subagent of an agentic system, with a human-readable description used in logs, listeners and reports.DecisionAgentBuilder.activationCondition(Predicate<AgenticScope> activationCondition) Sets the condition under which this agent runs when it is invoked as a subagent of an agentic system.DecisionAgentBuilder.agentInstanceFactory(Function<InternalAgent, Object> factory) DecisionAgentBuilder.async(boolean async) Controls whether this agent executes asynchronously within an agentic system: the decision call then runs on the executor used for every asynchronous agent, and the agents reading its output wait for it.DecisionAgentBuilder.decisionModel(DecisionModel decisionModel) Sets theDecisionModelanswering the question(s) of this agent.DecisionAgentBuilder.decisionModelProvider(Function<AgenticScope, DecisionModel> decisionModelProvider) Sets a provider that resolves theDecisionModelfrom theAgenticScopebefore each invocation, for example to pick a model depending on the state of the scope.DecisionAgentBuilder.description(String description) Sets the description of this agent, overriding the one of@Agent.DecisionAgentBuilder.listener(AgentListener agentListener) Adds a listener of the invocations of this agent, composed with the ones already registered.Sets the name of this agent, overriding the one of@Agentor the method name.DecisionAgentBuilder.optional(boolean optional) Controls whether this agent is optional: when it is, it is skipped instead of failing when one of its arguments is missing from theAgenticScope.Sets the output key using aTypedKeyclass for type-safe scope access.Sets the key of theAgenticScopewhere the answer of this agent is written, overriding the one of@Agent.DecisionAgentBuilder.requestParameters(DecisionRequestParameters requestParameters) Sets the parameters of every decision request of this agent, such as the model name, overriding the defaults of the decision model.DecisionAgentBuilder.threshold(double threshold) Sets a fixed threshold for thebooleananswers of this agent: the answer istruewhen the probability of "yes" is at least the threshold.DecisionAgentBuilder.thresholdProvider(ThresholdProvider thresholdProvider) Sets the provider of the threshold of thebooleananswers of this agent: the answer istruewhen the probability of "yes" is at least the threshold.static <T> DecisionAgentBuilder<T> DecisionAgentBuilder.withoutDeclarativeConfiguration(Class<T> agentServiceClass) -
Uses of DecisionAgentBuilder in dev.langchain4j.agentic.declarative
Methods in dev.langchain4j.agentic.declarative with parameters of type DecisionAgentBuilderModifier and TypeMethodDescriptionstatic voidDeclarativeUtil.configureDecisionAgent(Class<?> agentType, DecisionAgentBuilder<?> builder) static voidDeclarativeUtil.configureDecisionAgent(Class<?> agentType, DecisionAgentBuilder<?> builder, AgenticServices.AgentConfigurator agentConfigurator) Applies the declarative configuration of the given decision agent interface to its builder: theDecisionModelSupplier, theDecisionThresholdSupplier, theAgentListenerSupplier, theActivationConditionand the agent configurator.