Class AgentRunDiff

java.lang.Object
org.mockserver.llm.analysis.AgentRunDiff

public class AgentRunDiff extends Object
Deterministic, prompt-level diff of two recorded agent runs. Each run is reconstructed into its canonical ParsedConversation (via AgentRunAnalyzer.canonicalConversation(java.util.List<org.mockserver.model.HttpRequest>, org.mockserver.model.Provider)), every message's text is normalised through PromptNormalizer (so cosmetic churn — whitespace, JSON key order, volatile ids/timestamps — is not reported as a change), then the two message sequences are aligned with a longest-common-subsequence diff.

Surfaces what changed between the runs: message-level additions / removals / edits, the tool calls that were added or removed, and the token / cost delta (when both sides carry usage totals, e.g. supplied from the two sides' optimisation reports).

Pure (no network, no LLM). The caller is responsible for redacting the requests before passing them in when the diff will be surfaced to a user.