Package akka.javasdk.testkit
Record Class AgentTrace
- Record Components:
toolCalls- in call ordermodelCalls- in call orderguardrails- every guardrail evaluation, in orderduration- from the start of the first command to the end of the lastuserMessage- the text of the user message the agent sent the model in the first model call, which is what the model saw; empty when the trace did not carry the messagesfinalModelText- the text of the last model response, before the agent mapped it into the reply; empty when the trace did not carry the messages
public record AgentTrace(List<ToolCall> toolCalls, List<ModelCall> modelCalls, List<GuardrailResult> guardrails, Duration duration, String userMessage, String finalModelText)
extends Record
Everything the runtime traced under the agent commands of one session, read through
TelemetryReader.getAgentTrace(String).-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAgentTrace(List<ToolCall> toolCalls, List<ModelCall> modelCalls, List<GuardrailResult> guardrails, Duration duration, String userMessage, String finalModelText) Creates an instance of aAgentTracerecord class. -
Method Summary
Modifier and TypeMethodDescriptionduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefinalModelTextrecord component.Returns the value of theguardrailsrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of themodelCallsrecord component.Returns the value of thetoolCallsrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theuserMessagerecord component.
-
Field Details
-
NONE
-
-
Constructor Details
-
AgentTrace
public AgentTrace(List<ToolCall> toolCalls, List<ModelCall> modelCalls, List<GuardrailResult> guardrails, Duration duration, String userMessage, String finalModelText) Creates an instance of aAgentTracerecord class.- Parameters:
toolCalls- the value for thetoolCallsrecord componentmodelCalls- the value for themodelCallsrecord componentguardrails- the value for theguardrailsrecord componentduration- the value for thedurationrecord componentuserMessage- the value for theuserMessagerecord componentfinalModelText- the value for thefinalModelTextrecord component
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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). -
toolCalls
Returns the value of thetoolCallsrecord component.- Returns:
- the value of the
toolCallsrecord component
-
modelCalls
Returns the value of themodelCallsrecord component.- Returns:
- the value of the
modelCallsrecord component
-
guardrails
Returns the value of theguardrailsrecord component.- Returns:
- the value of the
guardrailsrecord component
-
duration
Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
userMessage
Returns the value of theuserMessagerecord component.- Returns:
- the value of the
userMessagerecord component
-
finalModelText
Returns the value of thefinalModelTextrecord component.- Returns:
- the value of the
finalModelTextrecord component
-