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.
Released: v0.5.0
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.
Release guide · 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