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.
Supported replay actions
TERX persists only an HTTP(S) navigation, a click resolved by exact accessible role and name, and text entry with a named variable placeholder. Raw CDP, coordinate clicks, 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: v0.5.3
v0.5 adds named local MCP tools: save a reviewed semantic workflow, discover its exact input/result schema, call it with new values, and get fresh declared output. A wrong scope, drift, missing record, or ambiguous target is a refusal—not a hidden agent run.
Feature release guide · CI patch notes · GitHub release · PyPI package
Verify
pip install terx terx eval-local pytest tests/ -v ruff check .
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