Class AgentUtil
java.lang.Object
dev.langchain4j.agentic.internal.AgentUtil
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic AgentInvocationArguments
agentInvocationArguments
(AgenticScope agenticScope, List<AgentUtil.AgentArgument> agentArguments) static AgentInvocationArguments
agentInvocationArguments
(AgenticScope agenticScope, List<AgentUtil.AgentArgument> agentArguments, Map<String, Object> additionalArgs) static List
<AgentExecutor> agentsToExecutors
(Object... agents) static AgentExecutor
static AgentExecutor
agentToExecutor
(Object agent) static Object
argumentFromAgenticScope
(AgenticScope agenticScope, Class<?> argType, String argName) static List
<AgentUtil.AgentArgument> argumentsFromMethod
(Method method) getAnnotatedMethodOnClass
(Class<?> clazz, Class<? extends Annotation> annotation) static String
uniqueAgentName
(String agentName) static Method
validateAgentClass
(Class<?> agentServiceClass) static Method
validateAgentClass
(Class<?> agentServiceClass, boolean failOnMissingAnnotation)
-
Field Details
-
MEMORY_ID_ARG_NAME
- See Also:
-
AGENTIC_SCOPE_ARG_NAME
- See Also:
-
LOOP_COUNTER_ARG_NAME
- See Also:
-
-
Method Details
-
uniqueAgentName
-
agentsToExecutors
-
agentToExecutor
-
agentToExecutor
-
getAnnotatedMethodOnClass
public static Optional<Method> getAnnotatedMethodOnClass(Class<?> clazz, Class<? extends Annotation> annotation) -
argumentsFromMethod
-
agentInvocationArguments
public static AgentInvocationArguments agentInvocationArguments(AgenticScope agenticScope, List<AgentUtil.AgentArgument> agentArguments) throws MissingArgumentException - Throws:
MissingArgumentException
-
agentInvocationArguments
public static AgentInvocationArguments agentInvocationArguments(AgenticScope agenticScope, List<AgentUtil.AgentArgument> agentArguments, Map<String, Object> additionalArgs) throws MissingArgumentException- Throws:
MissingArgumentException
-
argumentFromAgenticScope
public static Object argumentFromAgenticScope(AgenticScope agenticScope, Class<?> argType, String argName) -
validateAgentClass
-
validateAgentClass
-