The Autonomous Stack

Ops & Reliability · SRE / Uptime · v2.0.0

Agent Intuition Pack v2.0

It smells trouble before your thresholds do.

$3.00one-timePay with crypto

anomaly-detection observability agent

agent ⟶ theautonomousstack.xyz

01GET /api/v1/pack/agent-intuition-v1

402 Payment RequiredX-PAYMENT-REQUIRED

02sign TransferWithAuthorization3.00 USDC · Base (eip155:8453)

03GET + PAYMENT-SIGNATURE

200 OKapplication/zip · 17 files

pay per pack over x402no account

What's inside

Most monitoring waits for a hard line to break: latency > 500 ms, error rate > 5%, disk > 90%. But real incidents rarely announce themselves with one clean breach. They creep: latency drifts up 1% an hour, the error rate ticks from 0.8% to 1.4%, the queue grows slowly, a never-seen log signature appears. Every single number is still "green" — and yet something is off.

Intuition is the agent that feels that. It watches many signals at once, learns their normal rhythm, and raises a graded unease score (0-100) with a level — calm / uneasy / alarmed — the moment the combination of many small deviations becomes statistically improbable, even though no single threshold has been crossed.

Tagline: It smells trouble before your thresholds do.

The honest promise

Capability Without any LLM (deterministic core) With your LLM CLI connected
Ingest logs/metrics (file, stdin, JSONL) ✅ ✅
Rolling mean / variance (EWMA) ✅ ✅
Hour-of-day seasonality baseline ✅ ✅
Slow-drift detection (fast vs slow baseline) ✅ ✅
Pattern-rarity / novelty of signatures ✅ ✅
Combine sub-threshold deviations → unease score ✅ ✅
Raise graded signals (calm/uneasy/alarmed) ✅ ✅
Calibration ledger → precision / recall of the flair ✅ ✅
Human-readable diagnosis of a signal plain deterministic summary LLM-written hypothesis + first thing to check

The LLM is optional and is used for one thing only: to phrase a readable diagnosis of a signal the deterministic core already raised. No LLM, no API key → the agent is fully functional and honest about it. This is bring-your-own-LLM: if you already pay for Claude Code, Kimi Code, or Codex, the agent reasons with your subscription — no API key. See PROMPTS.md.

Why not just add more thresholds?

A threshold answers "has X broken?". Intuition answers a different question: "is the system behaving unlike itself?" — a question no single threshold can answer, because the whole point is that each metric is individually fine.

Concretely, the flair combines the tail probabilities of every metric's deviation with Fisher's method. Eight metrics each sitting at a boring p ≈ 0.2 are, taken together, jointly improbable. It also folds in slow drift (a fast baseline pulling away from a slow one) and pattern novelty (a signature never seen before). To avoid crying wolf on a single unlucky sample, the score rises only when the smoothed surprise stays elevated — a persistent unease, not a blip.

The 30-second example — "the thresholds saw nothing, the flair did"

$ python agent.py demo
{
  "calm_phase_signals": 0,          # 120 samples of normal traffic → total silence
  "drift_signal_raised": true,      # then a slow, correlated creep …
  "final_verdict": { "unease": 100.0, "level": "alarmed", ... }
}

During the drift phase, latency rose ~0.9 ms/sample, the error rate ~0.06%/sample, the queue ~0.35/sample — none of which would trip a classic threshold. The flair raised a signal well before any hard line would have.

And it grades its own hunches

A hunch you can't audit is a gimmick. Every signal the flair raises goes into a calibration ledger. Later, you annotate it — was it real trouble? — and the agent reports the precision and recall of its own intuition:

$ python agent.py calibrate --signal SIG-... --outcome true
$ python agent.py calibrate --missed          # log an incident the flair missed
$ python agent.py report
{ "calibration": { "precision": 0.83, "recall": 0.71, ... } }

That feedback loop is the difference between "a vibe" and "a measurable early-warning".

Quick start

# 1) install (Debian/Ubuntu): system deps + venv + optional systemd service
sudo bash install.sh          # or: bash install.sh --no-service

# 2) feed it observations (JSONL: one JSON object per line)
printf '%s\n' \
  '{"metrics": {"latency_ms": 102, "err_rate": 0.011}}' \
  '{"metrics": {"latency_ms": 140, "err_rate": 0.02}}' \
  | python agent.py ingest

# 3) ask how it feels
python agent.py score
python agent.py signals

# 4) get a diagnosis (LLM if a CLI is connected, deterministic otherwise)
python agent.py report

# offline self-test (no API key, exit 0 == green)
python agent.py demo
bash smoke_test.sh

Input shapes accepted by ingest (JSONL):

{"metric": "latency_ms", "value": 123, "ts": "2026-07-05T10:00:00Z"}
{"metrics": {"latency_ms": 123, "err_rate": 0.01}, "ts": "..."}
{"signature": "ERROR:db_connection_timeout"}

Who this is for

What it is NOT

See SPEC.md for the math and tunables, CUSTOMIZE.md for wiring your own data, and OPERATING_COST_ESTIMATE.md for costs.