Browser Automation Findings

Concurrent/Parallel Execution Patterns · 100-Site Benchmark · 2026-06-05

Executive Summary: Comprehensive analysis of concurrent/parallel execution patterns for browser automation in agentic workflows. 100 sites measured using three-bash bracket protocol (v2) with token isolation. Key finding: MCP cannot parallelize due to stateful stdio architecture; native APIs and CLI+SKILLS enable true concurrency.

1. Bracket Protocol v2: Three-Bash Token Isolation

Token isolation pattern using separate bash invocations:

# Bash A: Token baseline
jq '.messages[-1].id' ~/.claude/projects/*/*.jsonl | tail -1 > snapshot.txt

# Bash B: Run measurement
python3 measure_sites.py

# Bash C: Calculate token delta
jq '.messages[-1].id' ~/.claude/projects/*/*.jsonl | tail -1 > final.txt
diff=$(( $(cat final.txt) - $(cat snapshot.txt) ))

Advantages:

2. Hybrid Parallel+Sequential Measurement (7 Sites)

Full architectural validation through real-world execution:

Phase Method Duration Sites Result
CLI Vibium Python API + ThreadPoolExecutor 26.2s 7 ✅ Parallel (6.3× faster)
MCP Vibium MCP tool calls (sequential) 164.4s 7 ✅ Sequential (confirmed)
Total Hybrid approach 190.6s All 7 ✅ Both measured

Speed Analysis:

3. Parallel Execution Architecture Comparison

✅ Native APIs (Python/JavaScript) — TRUE PARALLELISM

from vibium import browser as vibium_browser
from concurrent.futures import ThreadPoolExecutor

browser = vibium_browser.start(headless=True)
contexts = [browser.new_context() for _ in range(N)]
pages = [ctx.new_page() for ctx in contexts]

with ThreadPoolExecutor(max_workers=2) as pool:
    futures = {
        pool.submit(measure_site, site, page): site
        for site, page in zip(sites, pages)
    }

Why it works:

Benefit: ~4–6× speedup for concurrent operations

❌ MCP Tool Interface — SEQUENTIAL ONLY

All tools operate on a single active page; cannot execute in parallel:

browser_start {}
  → browser_new_page {url: site1}
    → browser_wait_for_load {}
    → browser_map {}
  → browser_new_page {url: site2}    ← Must wait for site1
    → browser_wait_for_load {}
    → browser_map {}

Why it fails:

Constraint: Fundamental to MCP's design; cannot be fixed without protocol redesign

✅ CLI + SKILLS — STATELESS PARALLELISM

Each SKILL invocation is isolated:

for site in site1 site2 ...; do
  /practice-testing $site --cli &
done
wait

Why it works:

Benefit: Parallelizable at agent level without architectural constraints

4. 100-Site Benchmark Results

Metric CLI MCP Ratio
Total Time 17.6m 68.9m 3.9×
Total Cost $1.82 $7.96 4.4×
Total Turns 164 1,146 7.0×
Avg/Site Time 10.6s 41.4s 3.9×
Avg/Site Cost $0.0182 $0.0796 4.4×
Avg/Site Turns 1.6 11.5 7.0×

Key Insight: MCP requires ~7× more LLM interactions (turns) for the same operations. Cost and timing track closely with turn count.

5. Playwright's Official Position

From Playwright documentation:

CLI: Modern coding agents increasingly favor CLI–based workflows exposed as SKILLs over MCP because CLI invocations are more token-efficient and allow agents to parallelize work. This makes CLI + SKILLs better suited for high-throughput agents.

MCP: MCP remains relevant for specialized agentic loops that benefit from persistent state, rich introspection, and iterative reasoning over page structure, such as exploratory automation, self-healing tests, or long-running autonomous workflows.

Implication: For measurement and automation at scale → Use CLI + SKILLS. For exploration and debugging → Use MCP.

6. Recommendations for Agents

🎯 High-Throughput Measurement / Benchmarking

Use: Parallel CLI (Vibium Python API)

Benefits:

🔍 Exploratory Automation / Rich Introspection

Use: Sequential MCP (Vibium MCP tools)

Benefits:

Tradeoff: Accept 6.3× slower execution for rich context

⚡ Parallel Exploration / Agent Workflows

Use: CLI + SKILLS (distributed across agent threads)

Benefits:

7. Token Metrics Validation

Finding: Token metrics are stable and reliable across measurement sessions.

Evidence:

Confidence: ✅ High — validated across 100 sites with consistent results

Interactive Metrics Dashboard

Explore all 100 sites with sortable tables, category breakdowns, and detailed performance charts:

Open dashboard in full view →

Conclusion: For agentic browser automation at scale, native APIs and CLI+SKILLS significantly outperform MCP due to native concurrency support. MCP is best suited for exploratory workflows where rich introspection outweighs performance constraints.

Document Date: 2026-06-05
Measurement Scope: 100 sites (General Practice, Automation Testing, API Testing, Security Testing, Performance Testing)
Protocol: Three-bash bracket with token isolation v2
Status: ✅ Complete — Findings validated through hybrid measurement and architectural analysis