High-performance browser automation bridge and multi-instance orchestrator with advanced stealth injection and real-time dashboard.
docs: remove cost/pricing info + delete curl wrapper
Mariof680d4e13dab
diff --git a/docs/BENCHMARK-SUMMARY.md b/docs/BENCHMARK-SUMMARY.mdindex 37f13079..21f73687 100644--- a/docs/BENCHMARK-SUMMARY.md+++ b/docs/BENCHMARK-SUMMARY.md@@ -7,18 +7,18 @@ Three extraction methods tested on **BBC.com**, **Corriere.it**, **Daily Mail.co### Results at a Glance#### Long-Lived Agent (Service Tokens Only)-| Method | Avg Size | Avg Tokens | Cost/1K pages | Best For |-|--------|----------|-----------|----------------|----------|-| **Snapshot** | 258 KB | 64,583 | $5.82/month | Interactive workflows, forms |-| **web_fetch** | 27 KB | 6,825 | $0.63/month | Text extraction, blogs, news |-| **Pinchtab** | ~2 KB | 900 | $0.03/month | Scale + real Chrome rendering |+| Method | Avg Size | Avg Tokens | Best For |+|--------|----------|-----------|----------|+| **Snapshot** | 258 KB | 64,583 | Interactive workflows, forms |+| **web_fetch** | 27 KB | 6,825 | Text extraction, blogs, news |+| **Pinchtab** | ~2 KB | 900 | Scale + real Chrome rendering |#### Fresh Agent per Task (Agent + Service)-| Method | Agent OH | Service | Total | Cost/1K tasks |-|--------|----------|---------|-------|----------------|-| **Snapshot** | 500 | 64,583 | 65,083 | $5.85/month |-| **web_fetch** | 500 | 6,825 | 7,325 | $0.66/month |-| **Pinchtab** | 500 | 920 | **1,417** | **$0.12/month** |+| Method | Agent OH | Service | Total |+|--------|----------|---------|-------|+| **Snapshot** | 500 | 64,583 | 65,083 |+| **web_fetch** | 500 | 6,825 | 7,325 |+| **Pinchtab** | 500 | 920 | **1,417** |*Fresh agent scenario shows Pinchtab's 47x advantage when spawning new agents per task.*@@ -33,7 +33,6 @@ Three extraction methods tested on **BBC.com**, **Corriere.it**, **Daily Mail.co- Full semantic snapshot with DOM + accessibility tree- High-fidelity for UI agents, expensive for text extraction- **11K-95K tokens** depending on site complexity-- **Real cost example:** $5.82/month at 1,000 pages/day[π Read snapshot analysis](./default-isolated-browser.md) | [π¦ Raw data](./snapshot-test-results.zip)@@ -46,7 +45,6 @@ Three extraction methods tested on **BBC.com**, **Corriere.it**, **Daily Mail.co- Readability parser removes 70-90% boilerplate- Perfect for articles, blogs, content extraction- **3.3K-12.5K tokens** with minimal structure-- **Real cost example:** $0.63/month at 1,000 pages/day[π Read web_fetch analysis](./web-fetch-lightweight.md) | [π¦ Raw data](./webfetch-test-results.zip)@@ -59,7 +57,6 @@ Three extraction methods tested on **BBC.com**, **Corriere.it**, **Daily Mail.co- Real Chrome rendering + text optimization- Clean slate scenario: fresh agent + Pinchtab call- **~1,400 tokens** per task (including agent overhead)-- **Real cost example:** $0.12/month at 1,000 tasks/day**Methodology Note:** Snapshot and web_fetch tested empirically. Pinchtab calculated from documented behavior and production measurements. See `pinchtab-clean-slate.md` β "Validation Method" section.@@ -75,7 +72,7 @@ Three extraction methods tested on **BBC.com**, **Corriere.it**, **Daily Mail.coThis single document covers:- Complete feature matrix (all three methods)-- Cost analysis at scale (1K-10K pages/day)+- Performance analysis at scale (1K-10K pages/day)- Decision tree (when to use each)- Real-world scenarios + architecture patterns- Use case recommendations@@ -99,16 +96,14 @@ This single document covers:- web_fetch: 4 chars (text) = 1 token- Pinchtab: 4 chars (text) = 1 token-**Pricing:** Claude Sonnet @ $3/M input tokens----## Key Takeaways1. **Snapshot is heavy but powerful** β Full DOM + refs for clicking, 9-29x heavier-2. **web_fetch is the sweet spot for text** β Built-in, 82% cheaper, handles news/articles-3. **Pinchtab owns the scale game** β 90% savings vs. snapshot, real Chrome rendering-4. **Cost compounds** β At 10K pages/day, choice = $600+/year difference+2. **web_fetch is the sweet spot for text** β Built-in, 82% lighter, handles news/articles+3. **Pinchtab owns the scale game** β 90% token savings vs. snapshot, real Chrome rendering+4. **Token efficiency compounds** β At 10K pages/day, method choice has significant impact---@@ -139,8 +134,6 @@ This single document covers:- web_fetch: 6,825 tokens (webfetch-test-results.zip)- **Pinchtab: 1,200 tokens** β 5.7x lighter than web_fetch-**The ROI:** $68/year saved per 1,000 pages/day, plus better rendering.----**Test Date:** February 26, 2026diff --git a/docs/README.md b/docs/README.mdindex 8369042b..ee5a3fda 100644--- a/docs/README.md+++ b/docs/README.md@@ -19,14 +19,14 @@ This folder contains comprehensive benchmarks comparing three web content extrac## The Headline**For 1,000 pages/day:**-- Snapshot: **$5.82/month** (~64K tokens/page)-- web_fetch: **$0.63/month** (~6.8K tokens/page)-- **Pinchtab: $0.11/month** (~1.2K tokens/page) β **98% savings vs. snapshot**+- Snapshot: ~64K tokens/page+- web_fetch: ~6.8K tokens/page+- **Pinchtab: ~1.2K tokens/page** β **98% lighter vs. snapshot****Pinchtab wins on:**- β Token efficiency (90% reduction)- β Real Chrome rendering (handles JavaScript)-- β Cost at scale ($68/year savings per 1K pages/day)+- β Scales efficiently at high volume- β Agent-optimized output (no boilerplate)**Use Snapshot if:** You need to interact (click, fill forms)@@ -62,13 +62,13 @@ All benchmarks use real-world news sites:OpenClaw's default semantic snapshot includes full DOM + accessibility tree. This is powerful for UI agents but heavy for text extraction: **29x heavier than web_fetch on Corriere.it**.### 2. web_fetch Sweet Spot-Readability parser removes ~70-90% of boilerplate automatically. Perfect for news articles, blogs, content extraction. **9x cheaper than snapshot**, but can't handle JavaScript-heavy sites.+Readability parser removes ~70-90% of boilerplate automatically. Perfect for news articles, blogs, content extraction. **9x lighter than snapshot**, but can't handle JavaScript-heavy sites.### 3. Pinchtab's Advantage-Real Chrome rendering + text optimization = best of both worlds. **5.7x cheaper than web_fetch**, still renders JavaScript, optimized for agents.+Real Chrome rendering + text optimization = best of both worlds. **5.7x lighter than web_fetch**, still renders JavaScript, optimized for agents.### 4. Scale Matters-At 1,000+ pages/day, method choice compounds to **$50-60/month savings**. At 10,000 pages/day, you're looking at **$600+/year** difference.+At 1,000+ pages/day, method choice has significant impact on token usage. At 10,000 pages/day, the differences compound substantially.---@@ -76,7 +76,7 @@ At 1,000+ pages/day, method choice compounds to **$50-60/month savings**. At 10,When referencing these benchmarks:-> Extracted from Pinchtab documentation (Feb 26, 2026). Tested against BBC.com, Corriere.it, Daily Mail.co.uk using OpenClaw v2026.2.23. Token costs based on Claude Sonnet ($3/M input tokens).+> Extracted from Pinchtab documentation (Feb 26, 2026). Tested against BBC.com, Corriere.it, Daily Mail.co.uk using OpenClaw v2026.2.23.---diff --git a/docs/browser-extraction-spectrum.md b/docs/browser-extraction-spectrum.mdindex cdf2d76b..10d1a4bd 100644--- a/docs/browser-extraction-spectrum.md+++ b/docs/browser-extraction-spectrum.md@@ -17,7 +17,6 @@ HEAVYWEIGHT SNAPSHOT LIGHTWEIGHT WEB_FETCH ULTRA-LIGHTWEIGHT P| element coordinates minimal structure|| 64K tokens avg 6.8K tokens avg 1.2K tokens avg-| $0.194/page (1K/day) $0.021/page (1K/day) $0.0036/page (1K/day)||ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ|```@@ -30,8 +29,6 @@ HEAVYWEIGHT SNAPSHOT LIGHTWEIGHT WEB_FETCH ULTRA-LIGHTWEIGHT P|--------|----------|-----------|----------|| **Avg Size** | 258 KB | 27 KB | ~2 KB (est) || **Avg Tokens** | 64,583 | 6,825 | 1,200 |-| **Cost/Page** | $0.000194 | $0.000021 | $0.0000036 |-| **Monthly (1K pages)** | $5.82 | $0.63 | $0.11 || **Interactive** | β Yes | β No | β No || **Structure Info** | β Yes | β No | β οΈ Limited || **Rendering** | β Yes | β No | β Yes |@@ -45,57 +42,33 @@ HEAVYWEIGHT SNAPSHOT LIGHTWEIGHT WEB_FETCH ULTRA-LIGHTWEIGHT P### BBC (Portal Layout, Low Content Density)-| Method | Size | Tokens | Articles | Cost |-|--------|------|--------|----------|------|-| Snapshot | 45 KB | 11,250 | 17 | $0.000034 |-| web_fetch | 18.8 KB | 4,700 | 15 | $0.000014 |-| Pinchtab | ~2 KB (est) | 400 | 8-10 | $0.0000012 |-| **Savings (web vs snap)** | **58%** | **58%** | β | **58%** |-| **Savings (pin vs snap)** | **96%** | **96%** | β | **96%** |+| Method | Size | Tokens | Articles |+|--------|------|--------|----------|+| Snapshot | 45 KB | 11,250 | 17 |+| web_fetch | 18.8 KB | 4,700 | 15 |+| Pinchtab | ~2 KB (est) | 400 | 8-10 |+| **Savings (web vs snap)** | **58%** | **58%** | β |+| **Savings (pin vs snap)** | **96%** | **96%** | β |### Corriere (News Hub, Very High Density)-| Method | Size | Tokens | Articles | Cost |-|--------|------|--------|----------|------|-| Snapshot | 380 KB | 95,000 | 100+ | $0.000285 |-| web_fetch | 13.1 KB | 3,275 | 18 | $0.000010 |-| Pinchtab | ~2 KB (est) | 400 | 8-10 | $0.0000012 |-| **Savings (web vs snap)** | **97%** | **97%** | β | **97%** |-| **Savings (pin vs snap)** | **99.5%** | **99.5%** | β | **99.5%** |+| Method | Size | Tokens | Articles |+|--------|------|--------|----------|+| Snapshot | 380 KB | 95,000 | 100+ |+| web_fetch | 13.1 KB | 3,275 | 18 |+| Pinchtab | ~2 KB (est) | 400 | 8-10 |+| **Savings (web vs snap)** | **97%** | **97%** | β |+| **Savings (pin vs snap)** | **99.5%** | **99.5%** | β |### Daily Mail (News + Clickbait, Very High Density)-| Method | Size | Tokens | Articles | Cost |-|--------|------|--------|----------|------|-| Snapshot | 350 KB | 87,500 | 150+ | $0.000263 |-| web_fetch | 50 KB | 12,500 | 20 | $0.000038 |-| Pinchtab | ~2 KB (est) | 400 | 8-10 | $0.0000012 |-| **Savings (web vs snap)** | **86%** | **86%** | β | **86%** |-| **Savings (pin vs snap)** | **99.4%** | **99.4%** | β | **99.4%** |-------## Cost At Scale--### 1,000 Pages/Day--| Method | Daily Cost | Monthly Cost | Annual Cost |-|--------|-----------|--------------|-------------|-| **Snapshot** | $0.194 | $5.82 | $69.84 |-| **web_fetch** | $0.021 | $0.63 | $7.56 |-| **Pinchtab** | $0.0036 | $0.11 | $1.35 |-| **Savings (web vs snap)** | $0.173 | **$5.19** | **$62.28** |-| **Savings (pin vs snap)** | $0.190 | **$5.71** | **$68.49** |--### 10,000 Pages/Day (Enterprise)--| Method | Daily Cost | Monthly Cost | Annual Cost |-|--------|-----------|--------------|-------------|-| **Snapshot** | $1.94 | $58.20 | $698.40 |-| **web_fetch** | $0.21 | $6.30 | $75.60 |-| **Pinchtab** | $0.036 | $1.08 | $12.96 |-| **Savings (web vs snap)** | $1.73 | **$51.90** | **$622.80** |-| **Savings (pin vs snap)** | $1.90 | **$57.12** | **$685.44** |+| Method | Size | Tokens | Articles |+|--------|------|--------|----------|+| Snapshot | 350 KB | 87,500 | 150+ |+| web_fetch | 50 KB | 12,500 | 20 |+| Pinchtab | ~2 KB (est) | 400 | 8-10 |+| **Savings (web vs snap)** | **86%** | **86%** | β |+| **Savings (pin vs snap)** | **99.4%** | **99.4%** | β |---@@ -145,17 +118,16 @@ HEAVYWEIGHT SNAPSHOT LIGHTWEIGHT WEB_FETCH ULTRA-LIGHTWEIGHT P## Real-World Scenarios-### Scenario A: News Aggregator Bot (Fast + Cheap)+### Scenario A: News Aggregator Bot (Fast + Efficient)**Requirements:**- Crawl 10-20 news sites daily- Extract headlines, summaries- No interaction needed-- Cost matters+- Token efficiency matters**Recommendation:** **web_fetch**-- Why: Fast, built-in, 97% cheaper than snapshot-- Cost: $0.02/day for 20 sites+- Why: Fast, built-in, 97% lighter than snapshot- Tradeoff: Can't handle JS-heavy sites**Alternative:** Pinchtab if you hit JS-heavy sites (add real Chrome)@@ -168,11 +140,10 @@ HEAVYWEIGHT SNAPSHOT LIGHTWEIGHT WEB_FETCH ULTRA-LIGHTWEIGHT P- Read 1,000+ pages/day- Extract accurate data- Real Chrome rendering needed (JS heavy)-- Minimize token cost+- Minimize token usage**Recommendation:** **Pinchtab**- Why: Real Chrome rendering + 90% token savings-- Cost: $0.11/month (vs. $5.82 snapshot)- Tradeoff: Requires binary, no form filling**Alternative:** web_fetch if no JS rendering needed@@ -189,8 +160,7 @@ HEAVYWEIGHT SNAPSHOT LIGHTWEIGHT WEB_FETCH ULTRA-LIGHTWEIGHT P**Recommendation:** **Snapshot**- Why: Only option with form support + interaction-- Cost: $0.19/page but necessary-- Tradeoff: Expensive but feature-complete+- Tradeoff: Higher token usage but feature-complete**No alternative:** You need the full DOM.@@ -245,13 +215,13 @@ Output: Cheap default, escalate when neededFor teams extracting **1K+ pages/day**:-- **Snapshot costs:** $174/month (1K pages)-- **Pinchtab costs:** $3.30/month (1K pages)-- **Savings:** **$170.70/month** = **$2,048/year**+- **Snapshot:** ~64K tokens per page+- **Pinchtab:** ~1.2K tokens per page+- **Reduction:** **98% token savings**Plus: Real Chrome rendering (JS support), better text quality, agent-optimized.-**Breakeven:** ~50 pages/day. Beyond that, Pinchtab wins.+**Efficiency matters:** At scale (50+ pages/day), token reduction compounds significantly.---@@ -280,9 +250,6 @@ A: No. Snapshot has form support + element refs for clicking. Pinchtab is text-o**Q: Should I always use Pinchtab over web_fetch?**A: Only if you need real Chrome rendering (JS) or at scale (1K+ pages/day). web_fetch is simpler for text-only, no-JS sites.-**Q: What's the token cost of Pinchtab vs. GPT-4?**-A: ~$0.0000036 per page (Sonnet). GPT-4 would be 10x higher (~$0.000036), so Pinchtab saves you money even vs. other models.-**Q: Can web_fetch handle authentication?**A: No, it fetches raw HTML. Use Snapshot or Pinchtab if cookies/auth required.diff --git a/docs/default-isolated-browser.md b/docs/default-isolated-browser.mdindex 80e3c626..18c44969 100644--- a/docs/default-isolated-browser.md+++ b/docs/default-isolated-browser.md@@ -48,12 +48,6 @@ For each site (BBC, Corriere, Daily Mail):- Interactive element metadata (buttons, links, forms)- Element references for agent reasoning-**Token cost per site:**-- BBC: **$0.000034** (Sonnet pricing)-- Corriere: **$0.000285**-- Daily Mail: **$0.000263**-- **Total: $0.00058 per 3-page batch**-**Pros:**- β Complete structural information- β Accessibility-first design@@ -74,11 +68,11 @@ For each site (BBC, Corriere, Daily Mail):- Markdown formatting- No DOM, no accessibility tree-**Token cost:**-- BBC: ~4,700 tokens ($0.000014)-- Corriere: ~3,275 tokens ($0.000010)-- Daily Mail: ~12,500 tokens ($0.000038)-- **Total: ~20,475 tokens per 3-page batch** (~82% savings vs. snapshot)+**Token usage:**+- BBC: ~4,700 tokens+- Corriere: ~3,275 tokens+- Daily Mail: ~12,500 tokens+- **Total: ~20,475 tokens per 3-page batch** (~82% lighter vs. snapshot)**Pros:**- β Fast (no rendering)@@ -99,9 +93,9 @@ For each site (BBC, Corriere, Daily Mail):- Optional: CSS selector-based filtering- Real Chrome rendering (not Readability parser)-**Token cost (estimated):**+**Token usage (estimated):**- ~800-1,200 tokens per page-- **Total: ~2,400-3,600 tokens per 3-page batch** (~90% savings vs. snapshot)+- **Total: ~2,400-3,600 tokens per 3-page batch** (~90% lighter vs. snapshot)**Pros:**- β 90% token reduction@@ -115,27 +109,27 @@ For each site (BBC, Corriere, Daily Mail):----## Cost Implications+## Token Efficiency Comparison-### Per-Page Economics+### Per-Page Tokens-| Method | Tokens | Cost (Sonnet) | Relative Cost |-|--------|--------|---------------|---------------|-| Full Snapshot | ~64,583 avg | $0.000194 | 100% (baseline) |-| web_fetch | ~6,825 avg | $0.000021 | 11% |-| **Pinchtab** | **~1,000 avg** | **$0.000003** | **1.5%** |+| Method | Tokens | Relative Efficiency |+|--------|--------|---------------------|+| Full Snapshot | ~64,583 avg | 100% (baseline) |+| web_fetch | ~6,825 avg | 11% |+| **Pinchtab** | **~1,000 avg** | **1.5%** |### At Scale (1,000 pages/day)-| Method | Daily Cost | Monthly Cost |-|--------|-----------|--------------|-| Full Snapshot | $0.194 | **$5.82** |-| web_fetch | $0.021 | **$0.63** |-| **Pinchtab** | **$0.003** | **$0.09** |+| Method | Daily Tokens | Monthly Tokens |+|--------|-------------|----------------|+| Full Snapshot | ~64.6M | **~1.94B** |+| web_fetch | ~6.8M | **~205M** |+| **Pinchtab** | **~1M** | **~30M** |-**Monthly savings with Pinchtab:**-- vs. snapshots: **$5.73/month** per 1K pages/day-- vs. web_fetch: **$0.54/month** per 1K pages/day+**Token reduction with Pinchtab:**+- vs. snapshots: **~98.5% reduction** per 1K pages/day+- vs. web_fetch: **~85% reduction** per 1K pages/day---@@ -177,7 +171,6 @@ Contents:## Footnotes**Token estimation methodology:**-- Claude Sonnet pricing: $3 per million input tokens- Text: 4 characters β 1 token (human-readable content)- JSON structure: 2 characters β 1 token (brackets, colons, quotes)- Actual usage may vary by content typediff --git a/docs/pinchtab-clean-slate.md b/docs/pinchtab-clean-slate.mdindex baf1a95f..76aa8c0a 100644--- a/docs/pinchtab-clean-slate.md+++ b/docs/pinchtab-clean-slate.md@@ -74,52 +74,52 @@ An agent with **zero prior context** spawns, calls Pinchtab once per site, extra----## Cost Implications (Real Data)+## Token Efficiency (Real Data)### Single Task (Fresh Agent)-| Method | Agent OH | Service | Total Tokens | Cost (Sonnet) |-|--------|----------|---------|--------------|---------------|-| **Snapshot** | 500 | 64,583 | **65,083** | $0.000195 |-| **web_fetch** | 500 | 6,825 | **7,325** | $0.000022 |-| **Pinchtab** | 500 | 1,884 | **2,384** | **$0.000007** |+| Method | Agent OH | Service | Total Tokens |+|--------|----------|---------|--------------|+| **Snapshot** | 500 | 64,583 | **65,083** |+| **web_fetch** | 500 | 6,825 | **7,325** |+| **Pinchtab** | 500 | 1,884 | **2,384** |-**Pinchtab cost advantage:**-- vs. Snapshot: **96.3% cheaper** ($0.000188 saved per task)-- vs. web_fetch: **68% cheaper** ($0.000015 saved per task)+**Pinchtab token advantage:**+- vs. Snapshot: **96.3% lighter** per task+- vs. web_fetch: **68% lighter** per task### At Scale (1,000 tasks/day)-| Method | Daily Cost | Monthly Cost | Annual Cost |-|--------|-----------|--------------|-------------|-| **Snapshot** | $0.195 | $5.85 | $70.20 |-| **web_fetch** | $0.022 | $0.66 | $7.92 |-| **Pinchtab** | **$0.007** | **$0.21** | **$2.52** |+| Method | Daily Tokens | Monthly Tokens |+|--------|-------------|----------------|+| **Snapshot** | ~65M | ~1.95B |+| **web_fetch** | ~7.3M | ~220M |+| **Pinchtab** | **~2.4M** | **~72M** |-**Monthly savings with Pinchtab:**-- vs. Snapshot: **$5.64/month** = **$67.68/year**-- vs. web_fetch: **$0.45/month** = **$5.40/year**+**Monthly token reduction with Pinchtab:**+- vs. Snapshot: **~1.88B tokens/month**+- vs. web_fetch: **~148M tokens/month**### At Enterprise Scale (10,000 tasks/day)-| Method | Daily Cost | Monthly Cost | Annual Cost |-|--------|-----------|--------------|-------------|-| **Snapshot** | $1.95 | $58.50 | $702.00 |-| **web_fetch** | $0.22 | $6.60 | $79.20 |-| **Pinchtab** | **$0.07** | **$2.10** | **$25.20** |+| Method | Daily Tokens | Monthly Tokens |+|--------|-------------|----------------|+| **Snapshot** | ~651M | ~19.5B |+| **web_fetch** | ~73M | ~2.2B |+| **Pinchtab** | **~24M** | **~720M** |-**Annual savings with Pinchtab:**-- vs. Snapshot: **$676.80/year**-- vs. web_fetch: **$54.00/year**+**Token reduction with Pinchtab:**+- vs. Snapshot: **~18.8B tokens/month**+- vs. web_fetch: **~1.48B tokens/month**---## Key Insight: Agent OverheadWhen agents spawn fresh (cold start):-- **Agent cost is fixed:** ~500 tokens per spawn+- **Agent overhead is fixed:** ~500 tokens per spawn- **Service call determines total:** Pinchtab's 900 tokens > Agent's 500 tokens-- **Service efficiency wins:** Choosing Pinchtab saves ~$0.000191/task vs. snapshot+- **Service efficiency wins:** Choosing Pinchtab reduces tokens by 96%+ vs. snapshot**At 1,000 spawns/day:**- Snapshot: 500 (agent) + 64,583 (snapshot) = 65,083 tokens@@ -195,19 +195,19 @@ If agent spawns for each task:----## The ROI: Pinchtab for Distributed Agents+## Token Efficiency: Pinchtab for Distributed Agents**Scenario:** 10,000 web extraction tasks/day, each spawns fresh agent-| Method | Daily Cost | Monthly Cost | Annual Cost |-|--------|-----------|--------------|-------------|-| Snapshot | $1,950 | **$58.50** | **$702** |-| web_fetch | $220 | **$6.60** | **$79.20** |-| **Pinchtab** | **$40** | **$1.20** | **$14.40** |+| Method | Daily Tokens | Monthly Tokens |+|--------|-------------|----------------|+| Snapshot | ~651M | **~19.5B** |+| web_fetch | ~73M | **~2.2B** |+| **Pinchtab** | **~24M** | **~720M** |-**Pinchtab savings:**-- vs. Snapshot: **$57.30/month** = **$687.60/year**-- vs. web_fetch: **$5.40/month** = **$64.80/year**+**Pinchtab token reduction:**+- vs. Snapshot: **~18.8B tokens/month** (96% lighter)+- vs. web_fetch: **~1.48B tokens/month** (67% lighter)---@@ -236,8 +236,7 @@ If agent spawns for each task:| **Total tokens (w/ agent)** | 65,083 | 7,325 | **1,400** || **Pure service tokens** | 64,583 | 6,825 | 900 || **Agent overhead** | 500 | 500 | 500 |-| **Cost/task** | $0.000195 | $0.000022 | **$0.000004** |-| **Monthly (1K tasks)** | $5.85 | $0.66 | **$0.12** |+| **Monthly tokens (1K tasks)** | ~65M | ~7.3M | **~1.4M** || **Best for** | Interaction | Text-only | Distributed agents |---@@ -315,8 +314,8 @@ e0 RootWebArea "BBC - Home" [focused]> **46x lighter than snapshots when agents spawn fresh.**>> Running 1,000 extraction tasks/day?-> - Snapshot: **$5.85/month**-> - **Pinchtab: $0.12/month** = **$69/year savings**+> - Snapshot: **~65M tokens/month**+> - **Pinchtab: ~1.4M tokens/month** = **98% reduction**>> Plus: Real Chrome rendering. Agent-optimized. Built for scale.diff --git a/docs/web-fetch-lightweight.md b/docs/web-fetch-lightweight.mdindex 38c3a479..ea1cbddf 100644--- a/docs/web-fetch-lightweight.md+++ b/docs/web-fetch-lightweight.md@@ -25,12 +25,12 @@ For each site (BBC, Corriere, Daily Mail):### Data-| Site | Extract Size | Est. Tokens | Articles Found | Cost (Sonnet) |-|------|--------------|------------|-----------------|---------------|-| **BBC** | 18.8 KB | ~4,700 | 15-20 | $0.000014 |-| **Corriere** | 13.1 KB | ~3,275 | 15-20 | $0.000010 |-| **Daily Mail** | 50 KB | ~12,500 | 20+ | $0.000038 |-| **Average** | **27.3 KB** | **~6,825** | **~19** | **$0.000021** |+| Site | Extract Size | Est. Tokens | Articles Found |+|------|--------------|------------|----------------|+| **BBC** | 18.8 KB | ~4,700 | 15-20 |+| **Corriere** | 13.1 KB | ~3,275 | 15-20 |+| **Daily Mail** | 50 KB | ~12,500 | 20+ |+| **Average** | **27.3 KB** | **~6,825** | **~19** |---@@ -51,11 +51,11 @@ For each site (BBC, Corriere, Daily Mail):3. Converts to plain text or markdown4. Returns cleaned content-**Token cost per site:**-- BBC: **4,700 tokens** ($0.000014)-- Corriere: **3,275 tokens** ($0.000010)-- Daily Mail: **12,500 tokens** ($0.000038)-- **Average: 6,825 tokens** ($0.000021 per page)+**Token usage per site:**+- BBC: **4,700 tokens**+- Corriere: **3,275 tokens**+- Daily Mail: **12,500 tokens**+- **Average: 6,825 tokens per page****Pros:**- β **82% lighter than snapshots** (29x smaller on Corriere)@@ -79,7 +79,6 @@ For each site (BBC, Corriere, Daily Mail):|--------|-----------|----------|-----------|| **Size** | 27.3 KB | 258 KB | 10.4x heavier (snapshot) || **Tokens** | 6,825 | 64,583 | 9.5x heavier (snapshot) |-| **Token Cost** | $0.000021 | $0.000194 | 9.2x more expensive (snapshot) || **Interactivity** | β No | β Yes | Snapshot wins || **Structure Info** | β No | β Yes | Snapshot wins || **Speed** | β Fast | β οΈ Slow | web_fetch wins |@@ -91,7 +90,6 @@ For each site (BBC, Corriere, Daily Mail):| Aspect | web_fetch | Pinchtab | Winner ||--------|-----------|----------|--------|| **Tokens** | 6,825 | ~1,200 | Pinchtab (5.7x lighter) |-| **Cost** | $0.000021 | $0.0000036 | Pinchtab (83% cheaper) || **Rendering** | β No | β Real Chrome | Pinchtab || **Selectors** | β No | β CSS filtering | Pinchtab || **Setup** | β Built-in | Requires binary | web_fetch |@@ -99,27 +97,27 @@ For each site (BBC, Corriere, Daily Mail):----## Cost Implications+## Token Efficiency Comparison-### Per-Page Economics+### Per-Page Token Usage-| Method | Tokens | Cost (Sonnet) | Monthly (1K pages) |-|--------|--------|---------------|--------------------|-| **Snapshot** | ~64,583 | $0.000194 | $5.82 |-| **web_fetch** | ~6,825 | $0.000021 | $0.63 |-| **Pinchtab** | ~1,200 | $0.0000036 | $0.11 |+| Method | Tokens | Monthly Tokens (1K pages) |+|--------|--------|---------------------------|+| **Snapshot** | ~64,583 | ~1.94B |+| **web_fetch** | ~6,825 | ~205M |+| **Pinchtab** | ~1,200 | ~36M |-### Savings Tiers+### Token Reduction**web_fetch vs. Snapshot:**-- Per page: saves $0.000173-- 1K pages/day: saves $0.173/day = **$5.19/month**-- 10K pages/day: saves $1.73/day = **$51.90/month**+- Per page: **~57,758 tokens lighter**+- 1K pages/day: **~1.74B tokens/month saved**+- 10K pages/day: **~17.4B tokens/month saved****Pinchtab vs. web_fetch:**-- Per page: saves $0.000017-- 1K pages/day: saves $0.017/day = **$0.51/month**-- 10K pages/day: saves $0.17/day = **$5.10/month**+- Per page: **~5,625 tokens lighter**+- 1K pages/day: **~169M tokens/month saved**+- 10K pages/day: **~1.69B tokens/month saved**---@@ -170,11 +168,11 @@ For each site (BBC, Corriere, Daily Mail):**Goal:** Extract headlines and summary text from news sites**Tool choices:**-1. **Best:** web_fetch (~3K tokens avg, $0.63/month)-2. **Acceptable:** Snapshot (~65K tokens avg, $5.82/month) β 9x more expensive+1. **Best:** web_fetch (~3K tokens avg)+2. **Acceptable:** Snapshot (~65K tokens avg) β 9x heavier3. **N/A:** Pinchtab β no advantage over web_fetch here-**Recommendation:** Use web_fetch. Fast, cheap, simple. Readability removes ads automatically.+**Recommendation:** Use web_fetch. Fast, lightweight, simple. Readability removes ads automatically.---@@ -193,12 +191,12 @@ For each site (BBC, Corriere, Daily Mail):### Scenario 3: High-Volume Agent Crawl (10,000 pages/day)-**Goal:** Crawl pages, extract text, minimize costs+**Goal:** Crawl pages, extract text, minimize token usage**Tool choices:**-1. **Best:** Pinchtab (~1.2K tokens, $0.11/month)-2. **Good:** web_fetch (~6.8K tokens, $0.63/month) β 6x more expensive-3. **Expensive:** Snapshot (~65K tokens, $5.82/month) β 52x more expensive+1. **Best:** Pinchtab (~1.2K tokens)+2. **Good:** web_fetch (~6.8K tokens) β 6x heavier+3. **Heavy:** Snapshot (~65K tokens) β 52x heavier**Recommendation:** Pinchtab dominates at scale. Real Chrome rendering + minimal tokens.@@ -210,7 +208,7 @@ For each site (BBC, Corriere, Daily Mail):2. **Readability parsing removes boilerplate automatically** β no manual filtering needed3. **Pinchtab still beats web_fetch 5-10x** on token efficiency4. **web_fetch excels at content extraction**, not interaction-5. **At scale, Pinchtab ROI emerges** (~$5+/month on 1K pages/day)+5. **At scale, token efficiency compounds** β method choice has significant impact---@@ -274,7 +272,6 @@ Contents:**Token estimation:**- web_fetch text: **4 characters β 1 token** (content-heavy)-- Claude Sonnet pricing: **$3 per million tokens****Readability parsing:**- Industry standard algorithm (used by Pocket, Safari Reader)diff --git a/scripts/pinchtab-curl-wrapper.sh b/scripts/pinchtab-curl-wrapper.shdeleted file mode 100755index 7db48603..00000000--- a/scripts/pinchtab-curl-wrapper.sh+++ /dev/null@@ -1,361 +0,0 @@-#!/bin/bash--# =============================================================================-# Pinchtab Wrapper: Simple curl interface for common web extraction tasks-# =============================================================================-#-# Purpose: Hide the two-step API workflow (create tab β get snapshot)-# behind a single, user-friendly interface.-#-# Why it exists: The Pinchtab API requires:-# 1. POST /tab {"action":"new","url":"..."} to get a tabId-# 2. GET /snapshot?tabId=<ID> to extract content-# This wrapper combines them so you can just: pinchtab-curl text <URL>-#-# Usage:-# pinchtab-curl text <URL> [--format json|compact|text]-# pinchtab-curl snapshot <URL> [--format json|compact|text] [--selector main]-# pinchtab-curl click <URL> <ref> [--then-snapshot]-# pinchtab-curl eval <URL> '<javascript>'-# pinchtab-curl pdf <URL> [-o output.pdf]-#-# =============================================================================--set -e--# Configuration-PINCHTAB_HOST="${PINCHTAB_HOST:-localhost}"-PINCHTAB_PORT="${PINCHTAB_PORT:-9867}"-PINCHTAB_URL="http://$PINCHTAB_HOST:$PINCHTAB_PORT"--# Color output-RED='\033[0;31m'-GREEN='\033[0;32m'-YELLOW='\033[0;33m'-NC='\033[0m' # No Color--# =============================================================================-# Helper Functions-# =============================================================================--log_error() {- echo -e "${RED}ERROR: $1${NC}" >&2- exit 1-}--log_info() {- echo -e "${GREEN}β${NC} $1"-}--log_debug() {- if [ "$DEBUG" = "1" ]; then- echo -e "${YELLOW}DEBUG: $1${NC}" >&2- fi-}--# Create a new tab and navigate to URL, return tabId-create_tab() {- local url=$1- local timeout=${2:-10}-- log_info "Creating tab for: $url"-- local response=$(curl -s -X POST "$PINCHTAB_URL/tab" \- -H "Content-Type: application/json" \- -d "{\"action\":\"new\",\"url\":\"$url\",\"timeout\":$timeout}")-- local tab_id=$(echo "$response" | jq -r '.tabId // empty')-- if [ -z "$tab_id" ]; then- log_error "Failed to create tab. Response: $response"- fi-- log_debug "Created tab: $tab_id"- echo "$tab_id"-}--# =============================================================================-# Task: Text Extraction (Cheapest, ~1K tokens)-# =============================================================================--cmd_text() {- local url=$1- local format=${2:-"text"} # or "raw"-- local tab_id=$(create_tab "$url")-- log_info "Extracting text from tab $tab_id"-- if [ "$format" = "raw" ]; then- curl -s "$PINCHTAB_URL/text?tabId=$tab_id&mode=raw" | jq .- else- curl -s "$PINCHTAB_URL/text?tabId=$tab_id" | jq .- fi-}--# =============================================================================-# Task: Snapshot (Accessibility Tree with Refs)-# =============================================================================--cmd_snapshot() {- local url=$1- local format=${2:-"compact"}- local selector=${3:-""}-- local tab_id=$(create_tab "$url")-- log_info "Snapshotting tab $tab_id (format: $format)"-- local snapshot_url="$PINCHTAB_URL/snapshot?tabId=$tab_id&format=$format&maxTokens=2000"-- if [ -n "$selector" ]; then- snapshot_url="$snapshot_url&selector=$selector"- fi-- curl -s "$snapshot_url" | head -100-}--# =============================================================================-# Task: Click + Snapshot (Action-oriented)-# =============================================================================--cmd_click() {- local url=$1- local ref=$2- local snapshot_after=${3:-true}-- local tab_id=$(create_tab "$url")-- log_info "Clicking ref $ref on tab $tab_id"-- curl -s -X POST "$PINCHTAB_URL/action" \- -H "Content-Type: application/json" \- -d "{\"kind\":\"click\",\"ref\":\"$ref\",\"tabId\":\"$tab_id\"}" | jq .-- if [ "$snapshot_after" = "true" ]; then- log_info "Snapshotting after click"- curl -s "$PINCHTAB_URL/snapshot?tabId=$tab_id&format=compact" | head -50- fi-}--# =============================================================================-# Task: Evaluate JavaScript-# =============================================================================--cmd_eval() {- local url=$1- local expression=$2-- local tab_id=$(create_tab "$url")-- log_info "Evaluating: $expression"-- curl -s -X POST "$PINCHTAB_URL/evaluate" \- -H "Content-Type: application/json" \- -d "{\"expression\":\"$expression\",\"tabId\":\"$tab_id\"}" | jq .-}--# =============================================================================-# Task: PDF Export-# =============================================================================--cmd_pdf() {- local url=$1- local output_file=${2:-"output.pdf"}-- local tab_id=$(create_tab "$url")-- log_info "Exporting PDF to $output_file"-- curl -s "$PINCHTAB_URL/pdf?tabId=$tab_id&raw=true&output=file&path=$output_file"-- if [ -f "$output_file" ]; then- log_info "PDF saved: $output_file"- else- log_error "Failed to save PDF"- fi-}--# =============================================================================-# Task: Screenshot-# =============================================================================--cmd_screenshot() {- local url=$1- local output_file=${2:-"screenshot.jpg"}-- local tab_id=$(create_tab "$url")-- log_info "Taking screenshot to $output_file"-- curl -s "$PINCHTAB_URL/screenshot?tabId=$tab_id&raw=true" -o "$output_file"-- if [ -f "$output_file" ]; then- log_info "Screenshot saved: $output_file"- else- log_error "Failed to save screenshot"- fi-}--# =============================================================================-# Task: Multi-Step Workflow (Interactive)-# =============================================================================--cmd_workflow() {- local url=$1-- local tab_id=$(create_tab "$url")-- log_info "Starting interactive workflow with tab $tab_id"- log_info "Commands:"- log_info " snap - snapshot current page"- log_info " click <ref> - click element by ref"- log_info " type <ref> <text> - type into element"- log_info " eval <expr> - evaluate JavaScript"- log_info " text - extract text"- log_info " exit - close and exit"- echo ""-- while true; do- read -p "pinchtab> " -a cmd_input-- case "${cmd_input[0]}" in- snap)- curl -s "$PINCHTAB_URL/snapshot?tabId=$tab_id&format=compact&maxTokens=1000" | head -50- ;;- click)- if [ -z "${cmd_input[1]}" ]; then- echo "Usage: click <ref>"- else- curl -s -X POST "$PINCHTAB_URL/action" \- -H "Content-Type: application/json" \- -d "{\"kind\":\"click\",\"ref\":\"${cmd_input[1]}\",\"tabId\":\"$tab_id\"}" | jq .- fi- ;;- type)- if [ -z "${cmd_input[1]}" ] || [ -z "${cmd_input[2]}" ]; then- echo "Usage: type <ref> <text>"- else- curl -s -X POST "$PINCHTAB_URL/action" \- -H "Content-Type: application/json" \- -d "{\"kind\":\"type\",\"ref\":\"${cmd_input[1]}\",\"text\":\"${cmd_input[2]}\",\"tabId\":\"$tab_id\"}" | jq .- fi- ;;- eval)- if [ -z "${cmd_input[1]}" ]; then- echo "Usage: eval <expression>"- else- curl -s -X POST "$PINCHTAB_URL/evaluate" \- -H "Content-Type: application/json" \- -d "{\"expression\":\"${cmd_input[1]}\",\"tabId\":\"$tab_id\"}" | jq .- fi- ;;- text)- curl -s "$PINCHTAB_URL/text?tabId=$tab_id" | jq .- ;;- exit)- log_info "Closing tab and exiting"- break- ;;- *)- echo "Unknown command: ${cmd_input[0]}"- ;;- esac- done-}--# =============================================================================-# Main-# =============================================================================--show_help() {- cat << EOF-Pinchtab Wrapper: Simple curl interface for web extraction--USAGE:- $(basename "$0") <command> <url> [options]--COMMANDS:- text <url> Extract plain text (cheapest, ~2K tokens)- snapshot <url> [format] Get accessibility tree (compact|json|text)- click <url> <ref> Click element and optionally snapshot- eval <url> '<expression>' Run JavaScript on page- pdf <url> [-o file.pdf] Export page as PDF- screenshot <url> [-o file] Take screenshot- workflow <url> Interactive command loop (snap, click, type, eval, text)--OPTIONS:- -h, --help Show this help- --host <host> Pinchtab host (default: localhost)- --port <port> Pinchtab port (default: 9867)--EXAMPLES:- # Extract text from BBC News- $(basename "$0") text https://www.bbc.com-- # Get interactive elements from CNN- $(basename "$0") snapshot https://www.cnn.com compact-- # Click a link and see the result- $(basename "$0") click https://www.example.com e5-- # Evaluate JavaScript- $(basename "$0") eval https://www.example.com 'document.title'-- # Export page as PDF- $(basename "$0") pdf https://www.example.com -o page.pdf-- # Start interactive session- $(basename "$0") workflow https://www.example.com--ENVIRONMENT:- PINCHTAB_HOST (default: localhost)- PINCHTAB_PORT (default: 9867)- DEBUG Set to 1 for debug output--EOF-}--# Parse arguments-if [ $# -lt 2 ]; then- show_help- exit 1-fi--case "$1" in- -h|--help)- show_help- exit 0- ;;- text)- shift- cmd_text "$@"- ;;- snapshot)- shift- cmd_snapshot "$@"- ;;- click)- shift- cmd_click "$@"- ;;- eval)- shift- cmd_eval "$@"- ;;- pdf)- shift- cmd_pdf "$@"- ;;- screenshot)- shift- cmd_screenshot "$@"- ;;- workflow)- shift- cmd_workflow "$@"- ;;- *)- log_error "Unknown command: $1"- ;;-esac