DEV Community

Leon
Leon

Posted on

Tap: Forge Once, Run Forever — Why AI Browser Automation Needs a Protocol

Every AI agent that interacts with the web faces the same problem: AI is too slow, too expensive, and too unreliable to drive a browser in real-time.

Tools like Browser-Use and Stagehand burn tokens on every click. A simple "get GitHub trending" costs ~$0.15 and takes 30+ seconds. Every operation can hallucinate.

A Different Approach: Forging

What if AI only did the hard work once?

That's Tap. Instead of AI controlling the browser at runtime, AI creates a deterministic script — and that script runs forever.

forge.inspect(url)     → AI analyzes the page
forge.verify(expr)     → AI tests the extraction
forge.save(site, name) → Script saved

tap.run(site, name)    → Runs forever. Zero AI. Zero tokens.
Enter fullscreen mode Exit fullscreen mode

The Protocol

Tap defines 8 kernel primitives — the irreducible atoms of all human-interface interaction:

eval · pointer · keyboard · nav · wait · screenshot · tap · capabilities
Enter fullscreen mode Exit fullscreen mode

And 16 stdlib operations built from the kernel:

click · type · hover · scroll · pressKey · select · upload · dialog
fetch · find · cookies · download · waitFor · waitForNetwork · ssrState · storage
Enter fullscreen mode Exit fullscreen mode

A new runtime implements 8 methods — instantly gains 16 operations and every existing script.

The Numbers

AI-per-step Tap
Cost per run ~$0.15 $0.00
Latency 30+ seconds < 1 second
Reliability LLM may hallucinate Deterministic
Composability None Taps call other taps

81 Skills, Ready to Use

tap install              # Install 81 community skills
tap github trending      # GitHub trending repos
tap hackernews hot       # Top HN stories
tap zhihu hot            # Zhihu trending
Enter fullscreen mode Exit fullscreen mode

41 sites including X/Twitter, Reddit, GitHub, YouTube, Bilibili, Zhihu, Xiaohongshu, Weibo, Medium, arXiv. All using your real Chrome session. No API keys.

MCP Native

38 tools as an MCP server — works with Claude Code, Cursor, Windsurf, OpenClaw:

{
  "mcpServers": {
    "tap": { "command": "tap", "args": ["mcp"] }
  }
}
Enter fullscreen mode Exit fullscreen mode

~1,800 Lines, Zero Dependencies

CLI + MCP server + executor + daemon + two runtimes — under 2,000 lines of Deno. No frameworks, no build step.

Try It

curl -fsSL https://raw.githubusercontent.com/LeonTing1010/tap/master/install.sh | sh
tap install && tap github trending
Enter fullscreen mode Exit fullscreen mode

What sites would you forge a tap for?

Top comments (0)