TERX 1.0.0

Turn an approved browser task into a tool that can refuse.

TERX is a local, policy-enforced replay gate for approved browser-agent workflows. It reuses a narrow semantic action sequence only when its caller scope, starting conditions, accessible targets, and outcome proof match.

ScopedCache identity includes origin, route, scope digest, workflow version, DOM similarity, and expiry.
Fail closedMissing or ambiguous targets, failed conditions, raw scripts, and unsafe gestures are refused instead of guessed.
Evidence firstReports distinguish hit, miss, refusal, and failure. Cold runs are cached only after their outcome check passes.

Supported replay actions

TERX persists six semantic actions: an HTTP(S) navigation whose path may hold {{variable}} placeholders, a click, text entry from a named variable, setting a checkbox on or off, choosing a dropdown option, and pressing Enter, Tab, or Escape. Targets are resolved by accessible role and name (including in same-origin iframes), and their recorded test id and position must not disagree. Raw CDP, coordinate clicks, other key events, and arbitrary JavaScript may run on a cold path but are never cached for replay.

Minimal contract

session_for(
    cache, bridge, "sign in to billing",
    scope_id="prod:billing:service-account",
    precondition={"url_contains": "/login"},
    postcondition={"text_contains": "Billing overview"},
    variables={"email": "bot@example.test", "password": "..."},
)

Destructive workflows need a host verifier that atomically consumes a fresh approval for the exact replay identity. A token alone is refused. TERX never calls an LLM self-healer during replay.

Plug it in without another runtime

terx mcp-config --client cursor
terx mcp-config --client codex

from terx.integrations.workflow import TerxWorkflow

MCP setup is a copy-paste stdio configuration. The Python adapter reuses TERX's existing Chrome CDP connection and local SQLite cache: no Playwright or Selenium dependency, second browser, cloud worker, or resident helper.

20 seconds: save a task, then call a tool

A real local Chrome run records check_order_status, saves its reviewed contract, reconnects a browser session, then returns fresh status for a new account and order ID. The replay makes 0 TERX model calls; it refuses instead of silently starting an agent if the policy no longer matches.

Measured, not promised

One real Browser Use Cloud v4 smoke on a different public task returned www.iana.org in 16.017 seconds at $0.002516 (48,492 input and 218 output tokens). A separate Browser Use native rerun smoke after a browser restart took 4.032 seconds and reported 1,033 Groq tokens and $0.000648. These are one-run observations, not TERX-versus-Browser-Use winner claims.

Read the raw scope, limits, memory observation, and four-mode benchmark protocol.

Released: 1.0.0

1.0 commits to a stable, semantically versioned API. On a 15-scenario hard eval that checks each page's real outcome, the replay rate rose from 40% to 100%, false refusals fell from 16.7% to 0%, and unsafe outcomes from 1 to 0, while all five must-refuse pages are still refused. CI fails on any unsafe outcome or false refusal.

1.0.0 release notes · Threat model · Versioning policy · Eval results

Verify

pip install terx
terx eval-local
terx eval-hard --gate
pytest tests/ -v

The local eval launches a deliberately slow temporary web page and headless Chrome. It covers a saved order-status tool across browser-session reconnection, changed inputs, and an ambiguous-target refusal. It is not a universal website or competitive benchmark claim.

Deliberately narrow

TERX does not replace Playwright, Stagehand, Browser Use, or hosted browser automation. Those products cover broad automation and agent capabilities. TERX provides the smaller trust boundary: reuse a known workflow only when the evidence still matches.

GitHub · quick start · integrations · developer guide · security · changelog