81trust / 100

Series Anomaly

by HALOWERK Agent Tools in Security & trust

x402 APIPassing, checked 3 h ago

Runs three detectors over one series and reports what each saw: a robust z score on median and median absolute deviation, a robust seasonal-trend decomposition with a z score on the residual, and an isolation forest over value and step-to-previous. Every score is returned per point, so callers set their own threshold instead of trusting a verdict. The forest draws from a fixed seed: same request, same result. Under three full cycles the seasonal figure is marked as not robust.

POST https://tools.halowerk.com/v1/series/anomaly

Last 30 days

All checks passedSome failedAll failedNot checked
Uptime
100%
Response time
33 ms typical, 33 ms slowest 5%
Last check
3 h ago
Next check
any minute now

How to call it

# See the payment challenge (nothing is charged)
curl -i -X POST "https://tools.halowerk.com/v1/series/anomaly" \
  -H "content-type: application/json" \
  -d '{"contamination":0.1,"methods":["robust_z","isolation_forest"],"min_votes":2,"points":[12.1,12.4,11.9,12.3,12,12.2,48.7,12.1,11.8,12.5,12.2,12],"seed":42}'
import { wrapFetchWithPayment } from "@x402/fetch";
import { x402Client } from "@x402/core/client";
import { ExactEvmScheme } from "@x402/evm/exact/client";
import { privateKeyToAccount } from "viem/accounts";

const client = new x402Client().register(
  "eip155:8453",
  new ExactEvmScheme(privateKeyToAccount(process.env.AGENT_KEY)),
);
const pay = wrapFetchWithPayment(fetch, client);

// Not sure it's safe to pay? Preflight it first for $0.005:
// GET https://toolvet.app/api/v1/check?url=https%3A%2F%2Ftools.halowerk.com%2Fv1%2Fseries%2Fanomaly
const res = await pay("https://tools.halowerk.com/v1/series/anomaly", {
  method: "POST",
  headers: { "content-type": "application/json" },
  body: JSON.stringify({"contamination":0.1,"methods":["robust_z","isolation_forest"],"min_votes":2,"points":[12.1,12.4,11.9,12.3,12,12.2,48.7,12.1,11.8,12.5,12.2,12],"seed":42}),
});
console.log(await res.json());

Example input

{
  "contamination": 0.1,
  "methods": [
    "robust_z",
    "isolation_forest"
  ],
  "min_votes": 2,
  "points": [
    12.1,
    12.4,
    11.9,
    12.3,
    12,
    12.2,
    48.7,
    12.1,
    11.8,
    12.5,
    12.2,
    12
  ],
  "seed": 42
}

Example output

{
  "anomalies": [
    {
      "flagged_by": [
        "robust_z",
        "isolation_forest"
      ],
      "index": 6,
      "scores": {
        "isolation_forest": 0.83,
        "robust_z": 123.4
      },
      "time": null,
      "time_unix_s": null,
      "value": 48.7
    }
  ],
  "anomaly_count": 1,
  "deterministic": true,
  "method_details": {
    "isolation_forest": {
      "contamination": 0.1,
      "features": [
        "value",
        "delta_to_previous"
      ],
      "flagged": 2,
      "sample_size": 12,
      "score_cutoff": 0.71,
      "seed": 42,
      "trees": 100
    },
    "robust_z": {
      "flagged": 1,
      "median": 12.15,
      "scale": 0.29652,
      "scale_basis": "mad",
      "threshold": 3.5
    }
  },
  "methods": [
    "robust_z",
    "isolation_forest"
  ],
  "min_votes": 2,
  "point_count": 12,
  "points": [
    {
      "flagged_by": [],
      "index": 0,
      "is_anomaly": false,
      "label": null,
      "scores": {
        "isolation_forest": 0.42,
        "robust_z": -0.169
      },
      "time": null,
      "time_unix_s": null,
      "value": 12.1
    }
  ],
  "seed": 42,
  "stateless": true,
  "statistics": {
    "max": 48.7,
    "mean": 15.016667,
    "median": 12.15,
    "min": 11.8,
    "stddev": 10.593
  }
}

Security scan

  • No findings. We scan names, descriptions and tool definitions for hidden instructions and other prompt-injection patterns.

Recent checks

WhenResultHTTPTimePrice
3 h agoPassed40232 ms$0.004
6 h agoPassed40233 ms$0.004
11 h agoPassed402131 ms$0.004