Record Class HtmlReportGenerator

java.lang.Object
java.lang.Record
dev.langchain4j.agentic.observability.HtmlReportGenerator

public record HtmlReportGenerator(AgentMonitor monitor, AgentInstance rootAgent, Object memoryId) extends Record
Generates HTML reports for agent executions. This class has been vibe-coded and is not expected to be maintainable manually by a human without LLM's help.
  • Constructor Details

    • HtmlReportGenerator

      public HtmlReportGenerator(AgentMonitor monitor, AgentInstance rootAgent, Object memoryId)
      Creates an instance of a HtmlReportGenerator record class.
      Parameters:
      monitor - the value for the monitor record component
      rootAgent - the value for the rootAgent record component
      memoryId - the value for the memoryId record component
  • Method Details

    • generateTopology

      public static void generateTopology(Object rootAgent, Path path)
    • generateTopology

      public static String generateTopology(Object rootAgent)
    • generateReport

      public static void generateReport(AgentMonitor monitor, Path path)
    • generateReport

      public static String generateReport(AgentMonitor monitor)
    • generateReport

      public static void generateReport(AgentMonitor monitor, Object memoryId, Path path)
    • generateReport

      public static String generateReport(AgentMonitor monitor, Object memoryId)
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • monitor

      public AgentMonitor monitor()
      Returns the value of the monitor record component.
      Returns:
      the value of the monitor record component
    • rootAgent

      public AgentInstance rootAgent()
      Returns the value of the rootAgent record component.
      Returns:
      the value of the rootAgent record component
    • memoryId

      public Object memoryId()
      Returns the value of the memoryId record component.
      Returns:
      the value of the memoryId record component