A high-performance benchmark and architectural showcase demonstrating why System One Models (TypeSafe AI's Jev) beat autoregressive LLMs at triage and email workflows.
Running thousands of emails, support tickets, or security logs through a traditional 70B+ autoregressive LLM (GPT-4o, Claude 3.5 Sonnet) is an architectural anti-pattern:
- Unacceptable Latency: 2,000ms – 30,000ms per item due to sequential token-by-token decoding (O(N) forward passes).
- Economic Insolvency: Output tokens cost ~5x input tokens ($15–$40 per 10k emails).
- Overconfidence & Schema Drift: Models output authoritative text even when hallucinating formats or misidentifying ambiguous edge cases.
TypeSafe Jev replaces autoregressive string generation with a single-pass parallel sampler (O(1)) trained via RLCD (Reinforcement Learning for Calibrated Decisions):
- ⚡ 100ms Responses: 40x to 150x faster execution.
- 💰 $0.042 / MTok Input: Output tokens are $0.00 (Free / too cheap to meter).
- 🛡️ Epistemic Calibration: Calibrated confidence scoring enables safe Negative Engineering (ambiguous items trigger human review rather than false-positive destruction).
- 🔒 Zero Format Errors: Natively evaluated at the logit layer—mathematically impossible to return malformed JSON.
- A full-fledged, high-density 3-pane webmail interface (Superhuman / Linear grade).
- Scale Dataset Selector: Choose between
50,250,500, or1,000procedurally generated realistic emails. - 4-Worker Concurrent Streaming Batch Queue: Sweeps emails using TypeSafe Jev in parallel streaming batches ($0.042/MTok, $0 output tax) with a live streaming HUD tracking throughput (~45–90 emails/sec), elapsed time, and total cost.
- Smart Folders with Live Badges:
All Mail,Needs Action,Human Review (Safety Gate <85%),Newsletters,Receipts & Tax,System Alerts, andTrash Quarantine. - 1-Click "Purge Trash": Permanently sweeps all quarantined spam/phishing with an animated clean slate celebration to reach Inbox Zero.
- Embedded Jev Telemetry Card: Inspect choice probabilities, calibrated confidence, noul scores, and verified Envoy gateway latency in the reader pane.
- Type or paste any custom email (
From,Sender Name,Subject,Body) or choose from 6 realistic instant presets (P0 Outage, Term Sheet, Spear Phishing, Stripe Receipt, etc.). - Granular Model Triggers:
- ⚡ "Analyze with Jev": Real-time parallel sampler (~70–180ms) returning typed category, logits, and calibrated confidence.
- 🤖 "Analyze with LLM": Real-time autoregressive model via OpenRouter (~4,000–6,500ms) with live running stopwatch.
- ⚡🤖 "Race Both Head-to-Head": Launches both simultaneously to visually observe the 35x+ compute speedup.
- Generates ready-to-use cURL commands with
x-envoy-upstream-service-timeextraction pipes for direct terminal verification.
- Side-by-side execution timer, token meter, and cost ticker.
- Evaluates 10 emails in parallel with Jev in ~220ms ($0.0004) vs 22,000ms ($0.065) with an autoregressive LLM.
- Explains how Jev's RLCD training produces mathematically calibrated confidence scores:
- Confidence ≥ 0.85: Verified high-confidence automated triage.
- Confidence < 0.85: Negative-engineering safety gate overrides deletion and dispatches to Human Review.
- Interactive volume slider (10,000 to 10,000,000 emails/month).
- Interactive commercial model tier switcher aligned with live OpenRouter market rates:
- Frontier Flagship: OpenAI GPT-6 Astra / Claude Fable 5.1 ($10.00 in / $50.00 out)
- Workhorse Pro: Claude Opus 5 / GPT-5.6 Sol Pro ($3.50 in / $17.50 out)
- High-Speed Flash: Google Gemini 3.8 Flash ($0.75 in / $3.75 out)
- Budget Open-Weights: DeepSeek V4.1 Flash ($0.15 in / $0.60 out)
- Mathematical pricing breakdown proving how Jev eliminates the 4x–5x output token tax ($0.042/MTok in, $0.00 out).
- Cluster Compute vs Public Transit: Direct extraction of TypeSafe's
x-envoy-upstream-service-timeheader from its Istio/Envoy service mesh. - Viewers immediately see:
⚡ 72ms Model Compute + 🌐 140ms Network Transit = 212ms Total Wall-Clock
- Proves that Jev evaluates email intent faster than light travels across the Atlantic ocean, contrasted against autoregressive LLMs which spend 5,000ms+ sequentially decoding tokens on GPU.
- Includes 1-click Share Benchmark summary generator for technical reviews.
- Completely eliminates client-side CORS errors and browser key-leakage risks.
- All requests are executed server-side via Next.js App Router handlers (
/api/triage/typesafe,/api/triage/typesafe/batch,/api/triage/llm).
- Framework: Next.js 14 (App Router, React 18, TypeScript)
- Styling: Tailwind CSS (Linear/Vercel dark-mode telemetry aesthetic)
- Icons: Lucide React
- Engine Adapters:
src/lib/typesafe.ts: Live TypeSafe HTTP gateway client + Envoy telemetry extraction.src/lib/llmBenchmark.ts: Frontier autoregressive comparative baseline.src/lib/safetyGate.ts: Epistemic thresholding logic (confidence < 0.85 -> Human Review).
# 1. Clone the repository
git clone https://github.com/sysadarsh/zerosweep.git
cd zerosweep
# 2. Copy environment file and configure keys
cp .env.example .env.local
# 3. Install dependencies
npm install
# 4. Start development server
npm run devOpen http://localhost:3000 in your browser.
npm run build
npm run startDeploy your own live ZeroSweep instance directly to Vercel with zero configuration:
When deploying on Vercel, simply configure two environment variables in your project settings:
| Variable | Required | Description | Where to Obtain |
|---|---|---|---|
TYPESAFE_API_KEY |
Yes | TypeSafe AI System One API Key | api.typesafe.ai |
OPENROUTER_API_KEY |
Yes | OpenRouter API Key (for comparative baseline) | openrouter.ai/keys |
🔒 Security Notice: All API requests are proxied server-side via Next.js 14 App Router API handlers (
/api/triage/*). Your private API keys are never exposed to the client browser, and the backend strictly locks comparative LLM requests to the free DeepSeek Flash model to guarantee zero accidental spend.
Adarsh — Autonomous Systems Engineer
- GitHub: @sysadarsh
- Repository: sysadarsh/zerosweep
- Diogo Almeida (Founder & CEO): LinkedIn Profile
- TypeSafe AI Team: typesafe.ai/team
- TypeSafe AI Platform: typesafe.ai
- System One Architecture: TypeSafe Blog & Research
MIT License. Created to demonstrate the power of TypeSafe AI's System One architecture.