[
  {
    "call_id": "T1",
    "name": "list_series",
    "arguments": {},
    "result": {
      "series": [
        {
          "series_id": "synthetic-0",
          "n_points": 8000,
          "description": "A periodic operational metric sampled at a fixed interval. Reported as behaving strangely; the cause is unknown.",
          "has_vendor_detector": false
        }
      ],
      "detectors": {
        "robust_zscore": "Distance to a rolling median in rolling MAD units. Catches amplitude excursions (spikes, level shifts). Blind to a signal that stops moving and to shape changes at normal amplitude.",
        "flatline": "Collapse of the rolling standard deviation. Catches a signal that stops moving (dead sensor, frozen pipeline). Blind to everything else.",
        "cycle_rate": "Deviation of the rolling zero crossing rate from its typical value. Catches the pattern speeding up or slowing down while amplitude stays normal. Noisy on aperiodic signals.",
        "band_breach": "How far the value leaves the vendor forecast band, in band widths. Only defined where the embedded production detector published a band (serie2 only)."
      }
    }
  },
  {
    "call_id": "T2",
    "name": "describe_window",
    "arguments": {
      "series_id": "synthetic-0"
    },
    "result": {
      "series_id": "synthetic-0",
      "start": 0,
      "end": 8000,
      "n_points": 8000,
      "mean": 0.02602,
      "std": 0.7353,
      "min": -3.297,
      "p25": -0.6938,
      "median": 0.04591,
      "p75": 0.7613,
      "max": 2.888,
      "sketch": [
        {
          "start": 0,
          "min": -1.049,
          "mean": 0.1443,
          "max": 1.072
        },
        {
          "start": 333,
          "min": -1.046,
          "mean": -0.005224,
          "max": 1.043
        },
        {
          "start": 666,
          "min": -1.086,
          "mean": -0.143,
          "max": 1.065
        },
        {
          "start": 1000,
          "min": -1.051,
          "mean": 0.1465,
          "max": 1.086
        },
        {
          "start": 1333,
          "min": -1.062,
          "mean": -0.003505,
          "max": 1.065
        },
        {
          "start": 1666,
          "min": -1.063,
          "mean": -0.1433,
          "max": 1.039
        },
        {
          "start": 2000,
          "min": -1.03,
          "mean": 0.1451,
          "max": 1.056
        },
        {
          "start": 2333,
          "min": -1.045,
          "mean": -0.006993,
          "max": 1.048
        },
        {
          "start": 2666,
          "min": -1.09,
          "mean": -0.1418,
          "max": 1.077
        },
        {
          "start": 3000,
          "min": -1.063,
          "mean": 0.1472,
          "max": 1.085
        },
        {
          "start": 3333,
          "min": -1.029,
          "mean": -0.005496,
          "max": 1.044
        },
        {
          "start": 3666,
          "min": -1.048,
          "mean": -0.1376,
          "max": 1.08
        },
        {
          "start": 4000,
          "min": -1.035,
          "mean": 0.1467,
          "max": 1.055
        },
        {
          "start": 4333,
          "min": -1.042,
          "mean": -0.004233,
          "max": 1.032
        },
        {
          "start": 4666,
          "min": -3.297,
          "mean": -0.1056,
          "max": 2.004
        },
        {
          "start": 5000,
          "min": -2.381,
          "mean": 0.1561,
          "max": 2.888
        },
        {
          "start": 5333,
          "min": -1.067,
          "mean": -0.005066,
          "max": 1.049
        },
        {
          "start": 5666,
          "min": -1.049,
          "mean": -0.1378,
          "max": 1.059
        },
        {
          "start": 6000,
          "min": -1.042,
          "mean": 0.03555,
          "max": 1.059
        },
        {
          "start": 6333,
          "min": -1.068,
          "mean": 0.1022,
          "max": 1.052
        },
        {
          "start": 6666,
          "min": -1.03,
          "mean": -0.1386,
          "max": 1.011
        },
        {
          "start": 7000,
          "min": -0.8531,
          "mean": 0.7277,
          "max": 0.9504
        },
        {
          "start": 7333,
          "min": -1.065,
          "mean": -0.007049,
          "max": 1.055
        },
        {
          "start": 7666,
          "min": -1.049,
          "mean": -0.1378,
          "max": 1.03
        }
      ],
      "sketch_note": "Each bucket summarizes an equal slice of the window with its min, mean and max: a numeric picture of the shape."
    }
  },
  {
    "call_id": "T3",
    "name": "run_detector",
    "arguments": {
      "series_id": "synthetic-0",
      "method": "robust_zscore"
    },
    "result": {
      "series_id": "synthetic-0",
      "method": "robust_zscore",
      "window": 101,
      "operating_budget": 0.001,
      "flagged_fraction": 0.00775,
      "episodes": [
        {
          "start": 4932,
          "end": 5020,
          "length": 88,
          "peak_rank": 1,
          "alarm_budget": 0.0,
          "alarm_budget_readable": "below the resolution of 7,738 reference points"
        },
        {
          "start": 5992,
          "end": 6408,
          "length": 416,
          "peak_rank": 2,
          "alarm_budget": 0.0001292,
          "alarm_budget_readable": "1 in 7,738"
        }
      ],
      "episodes_total": 2,
      "peak_rank_note": "peak_rank orders this run's episodes by their strongest point; it is comparable within this tool call only.",
      "reference_size": 7738,
      "reference_note": "Alarm budgets are measured against a self reference: every point this detector did not flag, minus a halo of one window around each flagged stretch. Without ground truth labels this reference is circular by construction; treat the budgets as comparable between episodes, not as guarantees about clean data."
    }
  },
  {
    "call_id": "T4",
    "name": "run_detector",
    "arguments": {
      "method": "cycle_rate",
      "series_id": "synthetic-0"
    },
    "result": {
      "series_id": "synthetic-0",
      "method": "cycle_rate",
      "window": 101,
      "operating_budget": 0.001,
      "flagged_fraction": 0.002875,
      "episodes": [
        {
          "start": 0,
          "end": 28,
          "length": 28,
          "peak_rank": 2,
          "alarm_budget": 0.000129,
          "alarm_budget_readable": "1 in 7,754"
        },
        {
          "start": 7085,
          "end": 7129,
          "length": 44,
          "peak_rank": 1,
          "alarm_budget": 0.0,
          "alarm_budget_readable": "below the resolution of 7,754 reference points"
        },
        {
          "start": 7972,
          "end": 7999,
          "length": 27,
          "peak_rank": 3,
          "alarm_budget": 0.0003869,
          "alarm_budget_readable": "1 in 2,585"
        }
      ],
      "episodes_total": 3,
      "peak_rank_note": "peak_rank orders this run's episodes by their strongest point; it is comparable within this tool call only.",
      "reference_size": 7754,
      "reference_note": "Alarm budgets are measured against a self reference: every point this detector did not flag, minus a halo of one window around each flagged stretch. Without ground truth labels this reference is circular by construction; treat the budgets as comparable between episodes, not as guarantees about clean data."
    }
  },
  {
    "call_id": "T5",
    "name": "render_figure",
    "arguments": {
      "series_id": "synthetic-0",
      "start": 4800,
      "title": "Amplitude excursion episode (4932-5020)",
      "end": 5200
    },
    "result": {
      "figure_id": "figure_1",
      "path": "/home/julien/anomaly-investigator/runs/demo-synthetic/figure_1.png",
      "series_id": "synthetic-0",
      "start": 4800,
      "end": 5200,
      "detector": null
    }
  },
  {
    "call_id": "T6",
    "name": "render_figure",
    "arguments": {
      "end": 6500,
      "title": "Amplitude excursion episode (5992-6408)",
      "series_id": "synthetic-0",
      "start": 5900
    },
    "result": {
      "figure_id": "figure_2",
      "path": "/home/julien/anomaly-investigator/runs/demo-synthetic/figure_2.png",
      "series_id": "synthetic-0",
      "start": 5900,
      "end": 6500,
      "detector": null
    }
  },
  {
    "call_id": "T7",
    "name": "render_figure",
    "arguments": {
      "title": "Cycle rate episode (7085-7129)",
      "series_id": "synthetic-0",
      "start": 7000,
      "end": 7200
    },
    "result": {
      "figure_id": "figure_3",
      "path": "/home/julien/anomaly-investigator/runs/demo-synthetic/figure_3.png",
      "series_id": "synthetic-0",
      "start": 7000,
      "end": 7200,
      "detector": null
    }
  }
]