Class AgenticServices.NonAiAgentBuilder<T>
java.lang.Object
dev.langchain4j.agentic.AgenticServices.NonAiAgentBuilder<T>
- Enclosing class:
AgenticServices
-
Method Summary
Modifier and TypeMethodDescriptionasync(boolean async) Controls whether this agent executes asynchronously within an agentic system.build()description(String description) Sets a human-readable description of what this agent does, used by planners and orchestrators.inputKeys(Class<?> type1, String name1, Class<?> type2, String name2, Class<?> type3, String name3, Class<?> type4, String name4) inputs(AgentArgument... inputs) Declares the keys of the AgenticScope that this agent reads.listener(AgentListener listener) Adds a listener notified of this agent's invocations.Sets the agent name used for identification in multi-agent systems.Sets the output key using aTypedKeyclass for type-safe scope access.Sets the key under which this agent's result is stored in theAgenticScope.outputType(Type outputType) Sets the type of the result produced by this agent.
-
Method Details
-
name
Sets the agent name used for identification in multi-agent systems. If not set, the name of theAgenticServices.AgenticScopeFunction.accept(AgenticScope)method is used, as for an agentAction. -
description
Sets a human-readable description of what this agent does, used by planners and orchestrators. -
inputs
Declares the keys of the AgenticScope that this agent reads. Before invoking the function, each input is read from the AgenticScope, converted to its declared type and written back, so that the function can read it with the expected type. If an input without default value is missing the invocation fails with aMissingArgumentException. -
inputKey
-
inputKeys
-
inputKeys
-
inputKeys
-
outputKey
Sets the key under which this agent's result is stored in theAgenticScope. -
outputKey
Sets the output key using aTypedKeyclass for type-safe scope access. -
outputType
Sets the type of the result produced by this agent. Since the generic type of the function is erased at runtime, it defaults toObject. -
async
Controls whether this agent executes asynchronously within an agentic system. -
listener
Adds a listener notified of this agent's invocations. -
build
-