Record Class GuardrailDecisionRecord

Object
Record
akka.javasdk.ledger.GuardrailDecisionRecord
Record Components:
recordId - the globally unique id of the record
agentComponentId - the component id of the agent the guardrail ran for
interactionId - the id of the interaction the guardrail ran in
sessionId - the session id of the interaction
flowId - the flow the interaction belongs to, or empty when it belongs to none
name - the name of the guardrail
controlId - the control id the service declares for the guardrail, or empty when it declares none
category - the category of the guardrail
boundary - where in the interaction the guardrail ran
decision - what the guardrail decided
explanation - the explanation the guardrail gave for its decision, or the failure message when the decision is GuardrailDecisionRecord.Decision.FAIL
reportOnly - true when the guardrail only reports and the interaction continues regardless of the decision
failMode - what the runtime does when the guardrail fails to decide, without effect when reportOnly is true
duration - how long the guardrail took to decide
toolCall - the tool call the guardrail decided on, or empty when it decided on none
timestamp - when the decision was recorded
All Implemented Interfaces:
FlowRecord

public record GuardrailDecisionRecord(String recordId, String agentComponentId, String interactionId, String sessionId, Optional<String> flowId, String name, Optional<String> controlId, String category, GuardrailDecisionRecord.Boundary boundary, GuardrailDecisionRecord.Decision decision, String explanation, boolean reportOnly, GuardrailDecisionRecord.FailMode failMode, Duration duration, Optional<GuardrailDecisionRecord.ToolCall> toolCall, Instant timestamp) extends Record implements FlowRecord
The record of one guardrail decision, as fetched from the ledger.
  • Constructor Details

  • Method Details

    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • recordId

      public String recordId()
      Returns the value of the recordId record component.
      Returns:
      the value of the recordId record component
    • agentComponentId

      public String agentComponentId()
      Returns the value of the agentComponentId record component.
      Returns:
      the value of the agentComponentId record component
    • interactionId

      public String interactionId()
      Returns the value of the interactionId record component.
      Returns:
      the value of the interactionId record component
    • sessionId

      public String sessionId()
      Returns the value of the sessionId record component.
      Returns:
      the value of the sessionId record component
    • flowId

      public Optional<String> flowId()
      Returns the value of the flowId record component.
      Returns:
      the value of the flowId record component
    • name

      public String name()
      Returns the value of the name record component.
      Returns:
      the value of the name record component
    • controlId

      public Optional<String> controlId()
      Returns the value of the controlId record component.
      Returns:
      the value of the controlId record component
    • category

      public String category()
      Returns the value of the category record component.
      Returns:
      the value of the category record component
    • boundary

      Returns the value of the boundary record component.
      Returns:
      the value of the boundary record component
    • decision

      Returns the value of the decision record component.
      Returns:
      the value of the decision record component
    • explanation

      public String explanation()
      Returns the value of the explanation record component.
      Returns:
      the value of the explanation record component
    • reportOnly

      public boolean reportOnly()
      Returns the value of the reportOnly record component.
      Returns:
      the value of the reportOnly record component
    • failMode

      Returns the value of the failMode record component.
      Returns:
      the value of the failMode record component
    • duration

      public Duration duration()
      Returns the value of the duration record component.
      Returns:
      the value of the duration record component
    • toolCall

      Returns the value of the toolCall record component.
      Returns:
      the value of the toolCall record component
    • timestamp

      public Instant timestamp()
      Returns the value of the timestamp record component.
      Specified by:
      timestamp in interface FlowRecord
      Returns:
      the value of the timestamp record component