Class NonAiAgentInstance
java.lang.Object
dev.langchain4j.agentic.internal.NonAiAgentInstance
- All Implemented Interfaces:
InternalAgent, AgentInstance
-
Constructor Summary
ConstructorsConstructorDescriptionNonAiAgentInstance(Class<?> type, String name, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, AgentListener listener) NonAiAgentInstance(Class<?> type, String name, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, AgentListener listener, AgentCondition activationCondition) -
Method Summary
Modifier and TypeMethodDescriptionThe condition under which this agent runs when it is invoked as a subagent, ornullwhen it always runs.agentId()voidbooleanasync()booleaninthashCode()listener()name()parent()voidregisterInheritedParentListener(AgentListener parentListener) voidsetParent(InternalAgent parent) topology()toString()Class<?> type()Methods inherited from interface AgentInstance
as, leaf, optionalMethods inherited from interface InternalAgent
allowChatMemory, allowStreamingOutput, compensateOnError, enableCrossAgentCompensation, setAgentId
-
Constructor Details
-
NonAiAgentInstance
public NonAiAgentInstance(Class<?> type, String name, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, AgentListener listener) -
NonAiAgentInstance
public NonAiAgentInstance(Class<?> type, String name, String description, Type outputType, String outputKey, boolean async, List<AgentArgument> arguments, AgentListener listener, AgentCondition activationCondition)
-
-
Method Details
-
agentId
- Specified by:
agentIdin interfaceAgentInstance
-
parent
- Specified by:
parentin interfaceAgentInstance
-
subagents
- Specified by:
subagentsin interfaceAgentInstance
-
topology
- Specified by:
topologyin interfaceAgentInstance
-
type
- Specified by:
typein interfaceAgentInstance
-
plannerType
- Specified by:
plannerTypein interfaceAgentInstance
-
name
- Specified by:
namein interfaceAgentInstance
-
description
- Specified by:
descriptionin interfaceAgentInstance
-
outputType
- Specified by:
outputTypein interfaceAgentInstance
-
outputKey
- Specified by:
outputKeyin interfaceAgentInstance
-
async
public boolean async()- Specified by:
asyncin interfaceAgentInstance
-
arguments
- Specified by:
argumentsin interfaceAgentInstance
-
activationCondition
Description copied from interface:AgentInstanceThe condition under which this agent runs when it is invoked as a subagent, ornullwhen it always runs. When the condition is false, the agent is skipped: it is not invoked, it writes nothing to theAgenticScopeand its parent's planner is notified of the skip. The condition is ignored when the agent is invoked directly, as the root of an agentic system.The condition can be evaluated more than once for a single invocation, by the planner of the parent while selecting its next agents and again when the agent is invoked, so it must be cheap and free of side effects.
- Specified by:
activationConditionin interfaceAgentInstance
-
listener
- Specified by:
listenerin interfaceInternalAgent
-
registerInheritedParentListener
- Specified by:
registerInheritedParentListenerin interfaceInternalAgent
-
equals
-
hashCode
-
toString
-
setParent
- Specified by:
setParentin interfaceInternalAgent
-
appendId
- Specified by:
appendIdin interfaceInternalAgent
-