Record Class AgentExecutor
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.internal.AgentExecutor
- All Implemented Interfaces:
InternalAgent, AgentInstance
public record AgentExecutor(AgentInvoker agentInvoker, Object agent)
extends Record
implements AgentInstance, InternalAgent
-
Constructor Summary
ConstructorsConstructorDescriptionAgentExecutor(AgentInvoker agentInvoker, Object agent) Creates an instance of aAgentExecutorrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagent()Returns the value of theagentrecord component.agentId()Returns the value of theagentInvokerrecord component.void<T extends AgentInstance>
Tbooleanasync()final booleanIndicates whether some other object is "equal to" this one.execute(DefaultAgenticScope agenticScope, PlannerExecutor planner) final inthashCode()Returns a hash code value for this object.listener()name()parent()voidsetParent(InternalAgent parent) syncExecute(DefaultAgenticScope agenticScope, PlannerExecutor planner) topology()final StringtoString()Returns a string representation of this record class.Class<?> type()Methods inherited from interface AgentInstance
leafMethods inherited from interface InternalAgent
allowStreamingOutput
-
Constructor Details
-
AgentExecutor
Creates an instance of aAgentExecutorrecord class.- Parameters:
agentInvoker- the value for theagentInvokerrecord componentagent- the value for theagentrecord component
-
-
Method Details
-
execute
-
syncExecute
-
type
- Specified by:
typein interfaceAgentInstance
-
name
- Specified by:
namein interfaceAgentInstance
-
agentId
- Specified by:
agentIdin interfaceAgentInstance
-
description
- Specified by:
descriptionin interfaceAgentInstance
-
outputType
- Specified by:
outputTypein interfaceAgentInstance
-
outputKey
- Specified by:
outputKeyin interfaceAgentInstance
-
arguments
- Specified by:
argumentsin interfaceAgentInstance
-
subagents
- Specified by:
subagentsin interfaceAgentInstance
-
async
public boolean async()- Specified by:
asyncin interfaceAgentInstance
-
topology
- Specified by:
topologyin interfaceAgentInstance
-
parent
- Specified by:
parentin interfaceAgentInstance
-
setParent
- Specified by:
setParentin interfaceInternalAgent
-
appendId
- Specified by:
appendIdin interfaceInternalAgent
-
listener
- Specified by:
listenerin interfaceInternalAgent
-
as
- Specified by:
asin interfaceAgentInstance
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
agentInvoker
Returns the value of theagentInvokerrecord component.- Returns:
- the value of the
agentInvokerrecord component
-
agent
Returns the value of theagentrecord component.- Returns:
- the value of the
agentrecord component
-