taprun
Compile your AI agent's browser-acting trajectory into a deterministic
program that replays at zero LLM tokens, with built-in drift
verification.
pip install taprun
After install you get two surfaces in one package:
1 · CLI
The tap command. First invocation downloads the platform binary from
the npm @taprun/cli-* packages; subsequent calls exec the cached
binary. Equivalent to brew install LeonTing1010/tap/taprun for Python
users on Linux/Windows where Homebrew isn't standard.
tap forge https://news.ycombinator.com/
tap run hackernews/top
tap doctor hackernews/top
tap mcp start
2 · Python SDK
from taprun import forge, run, doctor. Each call shells out to the
same tap CLI; ~30-100 ms warm spawn cost. For hot loops use
tap mcp start and call via MCP instead.
from taprun import run, doctor
rows = run("hackernews/top")
print(rows[0]["title"])
verdict = doctor("hackernews/top")
Compile from a browser-use trajectory
from browser_use import Agent
from taprun import forge
agent = Agent(task="...", llm=...)
result = await agent.run()
forge(
trajectory=result.model_dump(),
site="example",
name="dashboard",
)
v1 trajectory compile covers the navigation skeleton (go_to_url,
click_element, input_text, scroll, wait, done). Navigation
steps replay at 0 LLM tokens. For destination pages exposing a Tier 0
source (RSS / JSON-LD / agents.json / OpenAPI), pair with tap forge <url> to compile the extraction half — that combination delivers
end-to-end zero-token replay. Stagehand and raw Anthropic tool-use
formats land in a follow-up.
How it works
- Forge: inspect the site → compile a deterministic
.tap.json
plan (one-time cost; free for pages with a Layer 1 source).
- Run: replay the plan, no LLM in the loop.
- Doctor: independently fetch the authoritative source and diff.
Catches drift the agent would miss on a self-replay.
- Heal: cached patches replay at 0 tokens; LLM only invoked when
the patch cache misses (Pro tier).
Configuration
export TAPRUN_BIN=/opt/homebrew/bin/tap
tap config set ai.key sk-ant-...
Pricing
- Free: 65+ community taps, run, doctor, Tier 0 forge (the
deterministic compile path when Layer 1 is available).
- Hacker ($9/mo, BYOK): full forge pipeline with Layer 4 AI fallback.
- Pro ($29/mo): heal + refresh + scheduling. 100% local.
The MCP server / CLI / forge / doctor binary is closed-source. The
public Chrome extension runtime
(https://github.com/LeonTing1010/tap) is MIT.
Links
MIT License (the public extension; the tap binary distributed by this
package is proprietary).