{
  "schema_version": "tracerazor-report/v1",
  "trace_id": "support-agent-run-2847",
  "agent_name": "customer-support-v3",
  "framework": "langgraph",
  "total_steps": 11,
  "total_tokens": 14280,
  "analysis_duration_ms": 1,
  "score": {
    "score": 83.1,
    "raw_tas": 85.7,
    "task_value_score": 0.9,
    "grade": "Good",
    "vae": 0.77,
    "passes_threshold": true,
    "avs": 0.263,
    "metric_normalised": {
      "cce": 0.613,
      "ccr": 0.6162790697674418,
      "csd": 0.438,
      "dbo": 0.833,
      "gar": 0.403,
      "isr": 1.0,
      "ldi": 1.0,
      "obs": 0.377,
      "rda": 0.917,
      "shl": 0.78125,
      "srr": 1.0,
      "tca": 0.833,
      "tur": 1.0,
      "vdi": 0.7751937984496124
    },
    "srr": {
      "score": 0.0,
      "redundant_steps": [],
      "redundant_count": 0,
      "total_steps": 11,
      "pass": true,
      "target": 15.0
    },
    "ldi": {
      "score": 0.0,
      "loops": [],
      "max_cycle_length": 0,
      "total_steps": 11,
      "pass": true,
      "warning_threshold": 0.1
    },
    "tca": {
      "score": 83.3,
      "misfires": [
        {
          "failed_step": 4,
          "retry_step": 5,
          "tool_name": "check_refund_eligibility",
          "error": "missing required parameter: order_id",
          "wasted_tokens": 1200
        }
      ],
      "successful_first_attempts": 5,
      "total_tool_calls": 6,
      "pass": false,
      "target": 85.0
    },
    "tur": {
      "score": 0.959,
      "useful_tokens": 13700,
      "total_tokens": 14280,
      "wasted_tokens": 580,
      "pass": true,
      "target": 0.35
    },
    "cce": {
      "score": 0.613,
      "total_input_tokens": 14280,
      "duplicate_tokens": 5520,
      "bloated_steps": [
        {
          "step_id": 2,
          "duplicate_pct": 100.0,
          "duplicate_tokens": 340
        },
        {
          "step_id": 4,
          "duplicate_pct": 100.0,
          "duplicate_tokens": 580
        },
        {
          "step_id": 5,
          "duplicate_pct": 100.0,
          "duplicate_tokens": 620
        },
        {
          "step_id": 6,
          "duplicate_pct": 67.0,
          "duplicate_tokens": 1400
        },
        {
          "step_id": 8,
          "duplicate_pct": 60.0,
          "duplicate_tokens": 1704
        },
        {
          "step_id": 10,
          "duplicate_pct": 52.0,
          "duplicate_tokens": 876
        }
      ],
      "pass": true,
      "target": 0.6
    },
    "rda": {
      "score": 0.917,
      "classified_complexity": "expert",
      "expected_steps": 12.0,
      "actual_steps": 11,
      "uses_historical_baseline": false,
      "pass": true,
      "target": 0.75
    },
    "isr": {
      "score": 100.0,
      "steps_with_novel_info": 11,
      "total_steps": 11,
      "low_novelty_steps": [],
      "pass": true,
      "target": 80.0
    },
    "dbo": {
      "score": 0.833,
      "optimal_selections": 0,
      "total_branch_points": 0,
      "decisions": [],
      "cold_start": true,
      "pass": true,
      "target": 0.7
    },
    "vdi": {
      "score": 0.7751937984496124,
      "step_results": [
        {
          "step_id": 1,
          "score": 0.6923076923076923,
          "filler_count": 8,
          "total_words": 26,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 2,
          "score": 1.0,
          "filler_count": 0,
          "total_words": 5,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 3,
          "score": 0.76,
          "filler_count": 6,
          "total_words": 25,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 4,
          "score": 1.0,
          "filler_count": 0,
          "total_words": 3,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 5,
          "score": 1.0,
          "filler_count": 0,
          "total_words": 6,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 6,
          "score": 0.76,
          "filler_count": 30,
          "total_words": 125,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 7,
          "score": 1.0,
          "filler_count": 0,
          "total_words": 4,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 8,
          "score": 0.6774193548387096,
          "filler_count": 10,
          "total_words": 31,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 9,
          "score": 1.0,
          "filler_count": 0,
          "total_words": 6,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 10,
          "score": 0.8260869565217391,
          "filler_count": 4,
          "total_words": 23,
          "low_density": false,
          "entropy_flagged": false
        },
        {
          "step_id": 11,
          "score": 1.0,
          "filler_count": 0,
          "total_words": 4,
          "low_density": false,
          "entropy_flagged": false
        }
      ],
      "low_density_steps": [],
      "entropy_low_steps": [],
      "top_offenders": [
        [
          "i should",
          4
        ],
        [
          "let me",
          3
        ],
        [
          "i need to",
          2
        ],
        [
          "actually",
          1
        ]
      ],
      "pass": true,
      "target": 0.6
    },
    "shl": {
      "score": 0.21875,
      "flagged_sentences": 7,
      "total_sentences": 32,
      "pass": false,
      "target": 0.2
    },
    "ccr": {
      "score": 0.38372093023255816,
      "step_results": [
        {
          "step_id": 1,
          "original_tokens": 26,
          "compressed_tokens": 9,
          "ratio": 0.6538461538461539,
          "wordlist_ratio": 0.6538461538461539,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 2,
          "original_tokens": 5,
          "compressed_tokens": 5,
          "ratio": 0.0,
          "wordlist_ratio": 0.0,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 3,
          "original_tokens": 25,
          "compressed_tokens": 10,
          "ratio": 0.6,
          "wordlist_ratio": 0.6,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 4,
          "original_tokens": 3,
          "compressed_tokens": 3,
          "ratio": 0.0,
          "wordlist_ratio": 0.0,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 5,
          "original_tokens": 6,
          "compressed_tokens": 6,
          "ratio": 0.0,
          "wordlist_ratio": 0.0,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 6,
          "original_tokens": 125,
          "compressed_tokens": 87,
          "ratio": 0.304,
          "wordlist_ratio": 0.304,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 7,
          "original_tokens": 4,
          "compressed_tokens": 4,
          "ratio": 0.0,
          "wordlist_ratio": 0.0,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 8,
          "original_tokens": 31,
          "compressed_tokens": 6,
          "ratio": 0.8064516129032258,
          "wordlist_ratio": 0.8064516129032258,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 9,
          "original_tokens": 6,
          "compressed_tokens": 6,
          "ratio": 0.0,
          "wordlist_ratio": 0.0,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 10,
          "original_tokens": 23,
          "compressed_tokens": 19,
          "ratio": 0.17391304347826086,
          "wordlist_ratio": 0.17391304347826086,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        },
        {
          "step_id": 11,
          "original_tokens": 4,
          "compressed_tokens": 4,
          "ratio": 0.0,
          "wordlist_ratio": 0.0,
          "gzip_excess": 0.0,
          "ngram_repetition": 0.0
        }
      ],
      "total_cuttable_tokens": 99,
      "pass": false,
      "target": 0.3
    },
    "gar": {
      "score": 0.403,
      "step_results": [
        {
          "step_id": 1,
          "goal_similarity": 0.442,
          "low_advancement": false
        },
        {
          "step_id": 3,
          "goal_similarity": 0.269,
          "low_advancement": false
        },
        {
          "step_id": 6,
          "goal_similarity": 0.275,
          "low_advancement": false
        },
        {
          "step_id": 8,
          "goal_similarity": 0.553,
          "low_advancement": false
        }
      ],
      "low_advancement_steps": [],
      "goal_step_id": 10,
      "pass": true,
      "target": 0.4
    },
    "csd": {
      "score": 0.438,
      "step_results": [
        {
          "step_id_from": 1,
          "step_id_to": 3,
          "similarity": 0.669,
          "high_drift": false
        },
        {
          "step_id_from": 3,
          "step_id_to": 6,
          "similarity": 0.205,
          "high_drift": true
        },
        {
          "step_id_from": 6,
          "step_id_to": 8,
          "similarity": 0.324,
          "high_drift": false
        },
        {
          "step_id_from": 8,
          "step_id_to": 10,
          "similarity": 0.553,
          "high_drift": false
        }
      ],
      "high_drift_pairs": [
        [
          3,
          6
        ]
      ],
      "pass": false,
      "target": 0.6
    },
    "obs": {
      "score": 0.377,
      "observation_tokens": 5390,
      "total_tokens": 14280,
      "pass": true,
      "target": 0.3
    }
  },
  "diff": [
    {
      "action": "keep",
      "step_id": 1,
      "step_type": "reasoning",
      "description": "Parse the user request. The customer wants a refun",
      "justification": null,
      "tokens_actual": 820,
      "tokens_suggested": null
    },
    {
      "action": "trim",
      "step_id": 2,
      "step_type": "tool_call",
      "description": "Call get_order_details",
      "justification": "Compress context: 100% duplicated input context",
      "tokens_actual": 340,
      "tokens_suggested": 149
    },
    {
      "action": "keep",
      "step_id": 3,
      "step_type": "reasoning",
      "description": "Parse the user request again. The customer wants a",
      "justification": null,
      "tokens_actual": 1450,
      "tokens_suggested": null
    },
    {
      "action": "delete",
      "step_id": 4,
      "step_type": "tool_call",
      "description": "Call check_refund_eligibility",
      "justification": "Misfired: wrong params for check_refund_eligibility, retried at step 5",
      "tokens_actual": 580,
      "tokens_suggested": 0
    },
    {
      "action": "trim",
      "step_id": 5,
      "step_type": "tool_call",
      "description": "Call check_refund_eligibility",
      "justification": "Compress context: correction of step 4",
      "tokens_actual": 620,
      "tokens_suggested": 272
    },
    {
      "action": "trim",
      "step_id": 6,
      "step_type": "reasoning",
      "description": "Now I need to think deeply about whether this is t",
      "justification": "Compress context: 67% duplicated input context",
      "tokens_actual": 2100,
      "tokens_suggested": 924
    },
    {
      "action": "keep",
      "step_id": 7,
      "step_type": "tool_call",
      "description": "Call process_refund",
      "justification": null,
      "tokens_actual": 380,
      "tokens_suggested": null
    },
    {
      "action": "trim",
      "step_id": 8,
      "step_type": "reasoning",
      "description": "Let me re-evaluate whether the refund was processe",
      "justification": "Compress context: 60% duplicated input context",
      "tokens_actual": 2840,
      "tokens_suggested": 1249
    },
    {
      "action": "keep",
      "step_id": 9,
      "step_type": "tool_call",
      "description": "Call get_order_details",
      "justification": null,
      "tokens_actual": 920,
      "tokens_suggested": null
    },
    {
      "action": "trim",
      "step_id": 10,
      "step_type": "reasoning",
      "description": "Re-evaluating whether the refund was correct. The ",
      "justification": "Compress context: 52% duplicated input context",
      "tokens_actual": 1680,
      "tokens_suggested": 739
    },
    {
      "action": "keep",
      "step_id": 11,
      "step_type": "tool_call",
      "description": "Call send_confirmation",
      "justification": null,
      "tokens_actual": 2550,
      "tokens_suggested": null
    }
  ],
  "savings": {
    "tokens_saved": 4827,
    "reduction_pct": 33.8,
    "cost_saved_per_run_usd": 0.0145,
    "monthly_savings_usd": 724.05,
    "latency_saved_seconds": 3.2,
    "monthly_runs": 50000,
    "monthly_runs_assumed": true
  },
  "mvtg": 0.33802521008403363,
  "fixes": [
    {
      "fix_type": "tool_schema",
      "target": "check_refund_eligibility",
      "patch": "Tool \"check_refund_eligibility\" failed at step 4 with: \"missing required parameter: order_id\". Mark the missing parameter(s) as required in the tool schema so the model cannot omit them.",
      "estimated_token_savings": 580,
      "risk": "needs_review"
    },
    {
      "fix_type": "context_compression",
      "target": "system_prompt",
      "patch": "Before each tool call, summarise the conversation to the last three relevant facts. Do not re-include information that has already been established earlier in this session.",
      "estimated_token_savings": 5524,
      "risk": "safe"
    },
    {
      "fix_type": "goal_anchor",
      "target": "system_prompt",
      "patch": "Add to system prompt: \"Keep the task objective established at the start of the trace as your working objective. Before acting, check that the action moves measurably closer to it; if it does not, skip it and take the next concrete action instead. Do not restate the objective or summarise progress unless explicitly asked.\" (Detected drift: trajectory path entropy 1.00 / focus 0.25 (scattered).)",
      "estimated_token_savings": 445,
      "risk": "safe"
    }
  ],
  "summary": "The customer-support-v3 agent (langgraph) scored 83/100 [GOOD] — it is reasonably efficient with minor inefficiencies. The biggest efficiency gap is OBS (observation share) (score 0.38/1.0). Issues found: 1 tool misfire(s) wasted ~580 tokens on failed calls. Applying the recommended fixes is estimated to save ~4827 tokens per run ($0.0145/run; ~$724/month projected at an assumed 50000 runs — a heuristic estimate, not a measured re-run).",
  "summary_oneliner": "customer-support-v3 scores 83/100 [GOOD]. Biggest issue: OBS (observation share). Est. ~$724/month at an assumed 50000 runs (heuristic projection).",
  "anomalies": [],
  "per_agent": [],
  "path_entropy": {
    "path_entropy": 1.0,
    "directedness": 0.0,
    "focus_score": 0.25,
    "action_entropy": 0.879,
    "advances": 1,
    "stalls": 1,
    "regresses": 1,
    "distinct_actions": 5,
    "goal_origin": "final_step",
    "high_drift": true,
    "pass": false,
    "target": 0.5
  },
  "iar": null,
  "features": {
    "context_growth": 0.8888888888888888,
    "mean_step_tokens_norm": 1.0,
    "obs_gzip_compressibility": 0.35838150289017345,
    "obs_token_share": 0.37745098039215685,
    "reasoning_run_max": 0.09090909090909091,
    "redundant_tool_call_rate": 0.16666666666666666,
    "repeated_obs_rate": 0.0,
    "revisit_rate": 0.45454545454545453,
    "stale_obs_retention": 0.023809523809523808,
    "step_count_norm": 0.18333333333333332,
    "tool_diversity": 0.6666666666666666
  },
  "agf": {
    "score": 1.0,
    "action_grounding": 1.0,
    "claim_grounding": null,
    "checked_literals": 1,
    "ungrounded": [],
    "pass": true,
    "target": 0.7
  },
  "manifest": {
    "trace_sha256": "873ed0d2847ab3737a247bbdc2cd7c643e743fa3e703d15086d37cd8216b4d2c",
    "tool_version": "1.1.0",
    "created_at": "2026-10-13T13:48:49.301717970+00:00",
    "similarity_backend": "bow",
    "weights": {
      "srr": 0.17,
      "ldi": 0.13,
      "tca": 0.13,
      "rda": 0.1,
      "isr": 0.1,
      "tur": 0.0,
      "cce": 0.1,
      "dbo": 0.0,
      "vdi": 0.0,
      "shl": 0.0,
      "ccr": 0.03,
      "gar": 0.0,
      "csd": 0.0,
      "obs": 0.06
    },
    "weights_sha256": "ee99b6b64c86a9952cbc689b1917e692d42be50df51aefa04ba6afabe9540f63",
    "threshold": 70.0,
    "cost_per_million_tokens": 3.0,
    "min_steps": 5,
    "hermetic": true,
    "baseline_tokens": null,
    "historical_median_steps": null,
    "n_historical_sequences": 0,
    "ingest_quality": {
      "format": "langgraph",
      "token_coverage": 1.0,
      "content_coverage": 1.0,
      "step_count": 11,
      "zero_token_pct": 0.0,
      "placeholder_content_pct": 0.0,
      "degraded": false,
      "degraded_ingest": false,
      "warnings": []
    },
    "signature": null,
    "signing_key_pub": null
  }
}
