ipenywis/laya-ultrafast on GitHub
- Stars
- 145
- Forks
- 25
- Language
- Python
- License
- MIT
- Last push
- 22 Sep 2026
Read from GitHub on . Counts change daily.
Reported by the author
- Decision latency
- ~33ms
The median is about 33 ms on an M1 Max.
github.com
Laya Ultrafast is a local port of Browser Use’s jev-ultrafast agent, changed by ipenywis to swap the original hosted Jev call for Laya, Convai Innovations’ open-weight typed-decision model, running locally through MLX on Apple Silicon. The browser agent, DOM snapshot, executor, safety checks and inspector come from the original project. Setting DECISION_MODEL=typesafe switches back to the original hosted Jev policy.
Where jev-ultrafast asks Jev to choose each browser action over the network, this port runs that decision as a local forward pass on an M-series Mac, with a reported median of about 33 ms on an M1 Max and no per-step API cost. A separate OpenAI-compatible text model still runs once per task, to turn the user’s goal into field values, the item to open, and a finish condition; if that model is also local, the whole agent runs offline apart from the sites it visits.
The author notes Laya answers narrow questions well, such as which field is the destination or which autocomplete suggestion matches a date, but doesn’t reliably answer an open-ended “what should the browser do next,” so the port combines narrow Laya questions with fixed rules that apply on any site: fill the stated values, choose from whatever options appear after typing or opening a control, then submit and open the named item or wait for matching results.
How it uses Jev
started = time.perf_counter()
result = post_json("https://api.typesafe.ai/v1/systemone", os.environ["TYPESAFE_API_KEY"], body)
operation_answer = validate_choice(result["answers"].get("operation", {}), operations)
operation = operation_answer["choice"]
target = None
target_answer = None
probabilities = {}
if operation in targets:
# Unused target heads cannot cause an action. Validate the head selected by the operation.
target_answer = validate_choice(result["answers"].get(operation.lower() + "_target", {}), targets[operation])
target = target_answer["choice"]
choice = targets[operation][target]["id"]
probabilities = {a["id"]: target_answer["probabilities"][index] for index, a in targets[operation].items()}
else:
choice = controls[operation]["id"] if operation in controls else operationView in laya_ultrafast/model.py


