Record Class AgentSummary

java.lang.Object
java.lang.Record
ai.tabforge.workshop.model.AgentSummary
Record Components:
agentName - name of the sub-agent (e.g. "SecurityAuditorAgent")
filesScanned - number of Java source files this agent analyzed
findingCount - total findings this agent produced (all severities)
criticalCount - number of CRITICAL findings from this agent
inputTokens - tokens consumed by prompts sent to Claude API
outputTokens - tokens consumed by Claude's responses
durationMs - total wall-clock time for this agent's work
retryCount - number of API retries required (0 = no retries)

public record AgentSummary(String agentName, int filesScanned, int findingCount, int criticalCount, int inputTokens, int outputTokens, long durationMs, int retryCount) extends Record
Per-agent execution statistics included in the final ReviewReport.

Analogy: like Maven's build time summary per module — [INFO] workshop-core ... SUCCESS [0.780 s]. Each agent gets its own summary line so the developer can see which specialist took the longest and how many issues it found.

CERTIFICATION NOTE — Domain 1: Agentic Architecture & Orchestration (27%): AgentSummary is what the AgentResultAggregator produces for each sub-agent after the review completes. It lets the orchestrator report not just what was found, but how each agent performed — a production multi-agent system must be observable, not just functional.

CERTIFICATION NOTE — Domain 5: Context Management & Reliability (15%): The inputTokens and outputTokens fields feed into ReviewReport.totalTokensUsed() and estimatedTotalCostUsd(). Tracking per-agent token consumption is how the system surfaces cost to the developer and how future runs can be optimized.

  • Constructor Details

    • AgentSummary

      public AgentSummary(String agentName, int filesScanned, int findingCount, int criticalCount, int inputTokens, int outputTokens, long durationMs, int retryCount)
      Creates an instance of a AgentSummary record class.
      Parameters:
      agentName - the value for the agentName record component
      filesScanned - the value for the filesScanned record component
      findingCount - the value for the findingCount record component
      criticalCount - the value for the criticalCount record component
      inputTokens - the value for the inputTokens record component
      outputTokens - the value for the outputTokens record component
      durationMs - the value for the durationMs record component
      retryCount - the value for the retryCount record component
  • Method Details

    • estimatedCostUsd

      public double estimatedCostUsd()
      Estimated USD cost using Claude Sonnet pricing ($3/M input, $15/M output).
    • 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.
    • agentName

      public String agentName()
      Returns the value of the agentName record component.
      Returns:
      the value of the agentName record component
    • filesScanned

      public int filesScanned()
      Returns the value of the filesScanned record component.
      Returns:
      the value of the filesScanned record component
    • findingCount

      public int findingCount()
      Returns the value of the findingCount record component.
      Returns:
      the value of the findingCount record component
    • criticalCount

      public int criticalCount()
      Returns the value of the criticalCount record component.
      Returns:
      the value of the criticalCount record component
    • inputTokens

      public int inputTokens()
      Returns the value of the inputTokens record component.
      Returns:
      the value of the inputTokens record component
    • outputTokens

      public int outputTokens()
      Returns the value of the outputTokens record component.
      Returns:
      the value of the outputTokens record component
    • durationMs

      public long durationMs()
      Returns the value of the durationMs record component.
      Returns:
      the value of the durationMs record component
    • retryCount

      public int retryCount()
      Returns the value of the retryCount record component.
      Returns:
      the value of the retryCount record component