Record Class AgentInvocation
java.lang.Object
java.lang.Record
dev.langchain4j.agentic.scope.AgentInvocation
- Record Components:
skipReason- why the agent was not invoked, because its activation condition was false or because it is optional and one of its arguments was missing, ornullwhen it was invoked. The output of a skipped agent is the current value of its output key. Skipped invocations are not registered in theAgenticScope.
-
Constructor Summary
ConstructorsConstructorDescriptionAgentInvocation(Class<?> agentType, String agentName, String agentId, Map<String, Object> input, Object output) AgentInvocation(Class<?> agentType, String agentName, String agentId, Map<String, Object> input, Object output, String skipReason) Creates an instance of aAgentInvocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionagentId()Returns the value of theagentIdrecord component.Returns the value of theagentNamerecord component.Class<?> Returns the value of theagentTyperecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.input()Returns the value of theinputrecord component.output()Returns the value of theoutputrecord component.booleanskipped()Returnstrueif the agent was skipped instead of being invoked.Returns the value of theskipReasonrecord component.toString()Returns a string representation of this record class.
-
Constructor Details
-
AgentInvocation
-
AgentInvocation
public AgentInvocation(Class<?> agentType, String agentName, String agentId, Map<String, Object> input, Object output, String skipReason) Creates an instance of aAgentInvocationrecord class.- Parameters:
agentType- the value for theagentTyperecord componentagentName- the value for theagentNamerecord componentagentId- the value for theagentIdrecord componentinput- the value for theinputrecord componentoutput- the value for theoutputrecord componentskipReason- the value for theskipReasonrecord component
-
-
Method Details
-
skipped
public boolean skipped()Returnstrueif the agent was skipped instead of being invoked. -
output
Returns the value of theoutputrecord component.- Returns:
- the value of the
outputrecord component
-
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). -
agentType
Returns the value of theagentTyperecord component.- Returns:
- the value of the
agentTyperecord component
-
agentName
Returns the value of theagentNamerecord component.- Returns:
- the value of the
agentNamerecord component
-
agentId
Returns the value of theagentIdrecord component.- Returns:
- the value of the
agentIdrecord component
-
input
-
skipReason
Returns the value of theskipReasonrecord component.- Returns:
- the value of the
skipReasonrecord component
-