Skip to main content

Compile your AI agent's browser-acting trajectory into a deterministic program that replays at zero LLM tokens. CLI + Python SDK.

Project description

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/tap for Python users on Linux/Windows where Homebrew isn't standard.

tap forge https://news.ycombinator.com/        # compile a tap (Tier 0, no AI)
tap run hackernews/top                         # zero LLM tokens
tap doctor hackernews/top                      # cross-validate vs authoritative
tap mcp start                                  # MCP server for Claude Code / Cursor / Cline

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")              # execute a compiled tap
print(rows[0]["title"])

verdict = doctor("hackernews/top")        # 'ok' / 'broken' / 'stale'

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(),       # AgentHistoryList dict, JSON string, or path
    site="example",
    name="dashboard",
)
# writes ~/.tap/taps/example/dashboard.tap.json
# replay with: tap run example/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

  1. Forge: inspect the site → compile a deterministic .tap.json plan (one-time cost; free for pages with a Layer 1 source).
  2. Run: replay the plan, no LLM in the loop.
  3. Doctor: independently fetch the authoritative source and diff. Catches drift the agent would miss on a self-replay.
  4. Heal: cached patches replay at 0 tokens; LLM only invoked when the patch cache misses (Pro tier).

Configuration

# Override the binary path (e.g. to use a brew-installed `tap`)
export TAPRUN_BIN=/opt/homebrew/bin/tap

# AI key for the forge pipeline (BYOK; Hacker tier and above)
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).

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taprun-0.15.4.tar.gz (9.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

taprun-0.15.4-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file taprun-0.15.4.tar.gz.

File metadata

  • Download URL: taprun-0.15.4.tar.gz
  • Upload date:
  • Size: 9.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taprun-0.15.4.tar.gz
Algorithm Hash digest
SHA256 26e29898561894e009d094b6b49cdee2e3f2e9b989b11b134021084ee903b8d1
MD5 9d61d58bcbec0e6f5946bd3d27deb65c
BLAKE2b-256 bf32f28fb74668a61d86d296b3dfe36d1dfc2d436d767d9c355fae43f0a81804

See more details on using hashes here.

File details

Details for the file taprun-0.15.4-py3-none-any.whl.

File metadata

  • Download URL: taprun-0.15.4-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for taprun-0.15.4-py3-none-any.whl
Algorithm Hash digest
SHA256 06637af0c049bea80df75aaff480372f7100f89b4b73b13be5657b6d468a2f21
MD5 d36d92a42e11bae8aa893476c7e07bca
BLAKE2b-256 bec50700609a1cc882d3f6a60ae0ce8c7440a99685c1ee2878708a838acac51c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page