Engineering

Beyond the WAF: The AI, The Honesty, The Bottom Line — Part 2

July 10, 2026 · 6 min read

This is where the developer skepticism is most warranted, so let's be direct about how the AI is actually used — and where it isn't needed at all.

The Three-Tier AI Architecture

The system does not call an expensive model for every request. It uses a pyramid approach: rules first, small model second, large model last.

Tier 1: Rules (no model)

Before any AI call, every request passes through a deterministic rule engine — prompt injection patterns, unicode homograph normalization, base64 payload scanning, known attack tool user-agent detection, suspicious path checks. This handles about 70% of traffic on its own. Zero cost, zero latency.

Tier 2: Small Model (20B)

Gray-zone traffic (score 30-49, where rules are ambiguous) goes to a 20B parameter model running at ~1000 tokens/second. Fast enough for inline request classification in the 200-500ms range. Cost: ~$0.07 per 1M tokens.

Tier 3: Large Model (120B)

Deep forensics, evidence packet generation, and threat intelligence synthesis use a 120B parameter model — 500 tok/s. This is for offline analysis, not per-request blocking. The output is structured forensic documentation — country of origin, ASN ownership, attack pattern classification, correlation with known threat actor infrastructure.

What This Actually Costs

ModelSpeedCost/1M inputCost/1M outputUsed for
20B (fast)1000 tok/s$0.075$0.30Request classification, prospecting
120B (deep)500 tok/s$0.15$0.60Forensics, evidence, threat intel

Total monthly AI cost: effectively zero on free tier, or ~$5-10/mo on usage.

Where AI Isn't Used at All

The Honest Bottom Line

Is any single component novel? No. IP blocking is not new. SSL checking is not new. Calling an LLM from Node.js is not new. What's novel is the coordination — four independent agents across four isolated servers, communicating over an encrypted mesh, with deterministic rule tiers feeding into AI tiers feeding into automated counter-measures and forensic documentation.

"Anyone could build this" is true in the same sense that anyone could build a car from a parts catalog. The parts are available. The work is in the assembly.

— Part 2 of 2. Read Part 1: Architecture →