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, boolean optional, List<AgentArgument> arguments, AgentListener listener, AgentCondition activationCondition) NonAiAgentInstance(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()The description of this agent.booleaninthashCode()listener()name()booleanoptional()parent()voidregisterInheritedParentListener(AgentListener parentListener) voidsetParent(InternalAgent parent) topology()toString()Class<?> type()Methods inherited from interface AgentInstance
as, leafMethods 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) -
NonAiAgentInstance
public NonAiAgentInstance(Class<?> type, String name, String description, Type outputType, String outputKey, boolean async, boolean optional, 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
Description copied from interface:AgentInstanceThe description of this agent. For a remote agent without an explicit description, like an A2A or an MCP one, it is read from the remote server the first time it is requested, so this call can block, and it fails with anAgentUnavailableExceptionwhen the server is unavailable.- Specified by:
descriptionin interfaceAgentInstance
-
outputType
- Specified by:
outputTypein interfaceAgentInstance
-
outputKey
- Specified by:
outputKeyin interfaceAgentInstance
-
async
public boolean async()- Specified by:
asyncin interfaceAgentInstance
-
optional
public boolean optional()- Specified by:
optionalin 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
-