Sign inSign up

cloudsealed/jit-optimization-engine

By cloudsealed

•Updated about 2 months ago

Detects cost anomalies in cloud billing exports using a rolling-median + MAD baseline

Image
Developer tools
Monitoring & observability
0

68

cloudsealed/jit-optimization-engine repository overview

⁠cloudsealed-jit

Detects structural waste in cloud billing exports.

Given a billing export from AWS, GCP or Azure, it models what each day should have cost, reports the days that did not match, and turns the excess into a monthly figure. It is a library, a CLI and an HTTP service.

⁠The problem

Cloud cost anomaly detection is usually done by comparing each day against the period average and flagging anything beyond two or three standard deviations. On billing data that method fails in two specific ways: standard deviation is inflated by the very spikes you are looking for (the masking effect), and a flat average ignores the weekly cycle most cloud bills have.

⁠The method

Expected spend for a day is a rolling 7-day median times a day-of-week factor. Residuals are scored with a modified z-score built on the median absolute deviation (MAD), which tolerates contamination in roughly half the sample instead of being skewed by it. Days at or above |z| = 3.5 are reported (Iglewicz & Hoaglin, 1993).

Measured, not asserted: benchmarks/masking_benchmark.py builds synthetic bills with known anomalies and scores this method against the textbook mean+standard-deviation approach. F1 improves from 0.667 to 0.92-1.00 depending on scenario, and the benchmark runs in CI on every push.

Full derivation: https://github.com/cloudsealed/JIT-Optimization-Engine/blob/main/METHODOLOGY.md⁠

⁠Use

docker run -p 8091:8091 cloudsealed/jit-optimization-engine
GET  /health
POST /v1/analyze-billing
curl -X POST localhost:8091/v1/analyze-billing \
  -H 'Content-Type: application/json' \
  -d '{"companyName":"Acme","csvContent":"date,cost\n2026-01-01,100\n..."}'

Set JIT_OPTIMIZATION_API_KEY to require an X-Api-Key header.

⁠Supported exports

AWS Cost and Usage Report, GCP billing export, Azure cost export, and a generic heuristic for anything else with date + cost columns.

⁠How this compares to other cloud cost anomaly detection tools

cloudsealed-jit does one thing - find cost spikes in a billing export - and does not try to be a full FinOps platform. If you need a dashboard, live cloud API connectors, Kubernetes cost allocation, or RI/Savings Plan management, a commercial platform (Vantage, CloudZero, Finout) is the right tool; this is a lighter, composable piece for the detection step specifically, free and open source (MIT), with the method documented and benchmarked in the open.

⁠FAQ

Can an AI agent call this directly instead of me running the CLI? Yes - see https://github.com/cloudsealed/cloudsealed-mcp⁠, an MCP server that exposes this as a tool for Claude Code, Claude Desktop, Cursor, and other MCP clients.

Why not just use mean + standard deviation for anomaly detection? Because a handful of large spikes inflates the standard deviation enough to hide themselves and everything smaller - see "The problem" above and the measured comparison in METHODOLOGY.md.

Tag summary

Content type

Image

Digest

sha256:1668562cd…

Size

143.8 MB

Last updated

about 2 months ago

docker pull cloudsealed/jit-optimization-engine