{"slug": "jev-ultrafast-a-browser-agent-with-a-dynamic-indexed-action-space", "title": "Jev Ultrafast: A browser agent with a dynamic, indexed action space", "summary": "TypeSafe's Jev Ultrafast browser agent completed a natural-language Google Flights search from Zürich to London in 7.1 seconds, including text generation and loading waits, according to the project's published measurements. The agent uses a dynamic, indexed action space of eight operations — CLICK, TYPE_TEXT, SELECT, SCROLL_UP, SCROLL_DOWN, WAIT, DONE, and BLOCKED — with operation and target decisions resolved in one TypeSafe network round trip, and a small LLM generating text only for TYPE_TEXT. The code is available on GitHub via browser-use/jev-ultrafast, with the demo configured to use inception/mercury-2.5 through an OpenRouter key with reasoning disabled.", "body_md": "**A browser agent with a dynamic, indexed action space.**\n\nGive it one goal. [TypeSafe's Jev](https://docs.typesafe.ai/introduction) picks an operation and an element. A small LLM writes text only when the operation is `TYPE_TEXT`.\n\n**Zürich → London on Google Flights in 7.1 seconds.** One natural-language goal, actual text generation, and loading waits included.\n\n[Watch the MP4](https://github.com/browser-use/jev-ultrafast/blob/main/docs/demo.mp4) · [Measurements](https://github.com/browser-use/jev-ultrafast/blob/main/docs/performance.md) · [Read the loop](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/agent.py)\n\nEvery observation produces a new element table:\n\n```\n[1] button    Change ticket type · Round trip\n[2] combobox  Where from?        · San Francisco\n[3] combobox  Where to?          · empty\n[4] textbox   Departure          · empty\n...\n```\n\nThe operations are `CLICK`, `TYPE_TEXT`, `SELECT`, `SCROLL_UP`, `SCROLL_DOWN`, `WAIT`, `DONE`, and `BLOCKED`. Only supported operations and targets are offered.\n\n```\n                      one TypeSafe request\n                     ┌───────────────────────────┐\npage → element table → operation                 │\n                     │ click_target              │\n                     │ type_text_target          │\n                     │ select_target, if present │\n                     └─────────────┬─────────────┘\n                         use the matching target\n                                   │\n                    CLICK [7] ─────┤──→ browser\n                TYPE_TEXT [3] ─────┘\n                          ↓\n                   small LLM → text → browser\n```\n\nTarget questions are speculative. If the operation is `CLICK`, only `click_target` can execute. Two decisions, **one network round trip**. Each target head contains only compatible elements. Native dropdown choices carry an observed element/option index.\n\nThere are no site-specific action scripts or prepared field strings in the policy. The Flights example supplies a goal and independently verifies the outcome. The screenshot renderer adds labels afterward; it does not drive the browser.\n\n```\ngit clone https://github.com/browser-use/jev-ultrafast.git\ncd jev-ultrafast\nuv sync\ncp .env.example .env\n# Add TYPESAFE_API_KEY and TEXT_MODEL_API_KEY.\nuv run jev\n```\n\nOpen **[http://127.0.0.1:8766](http://127.0.0.1:8766)** and click **Start demo → Run automatically**. The inspector shows numbered elements, operation probabilities, target probabilities, and executed actions. **Choose next** pauses before execution.\n\nChrome connects through [Browser Harness](https://github.com/browser-use/browser-harness), installed by `uv sync`. Run `uv run browser-harness --doctor` if it needs connecting. Allow remote debugging in Chrome when prompted.\n\n`TEXT_MODEL_API_KEY` is an OpenRouter key in the example configuration. The current demo uses `inception/mercury-2.5` with reasoning disabled. Gemini, GLM, and DeepSeek can also use the OpenAI-compatible text helper; configure the appropriate model, endpoint, and reasoning setting.\n\n``` python\nfrom jev_ultrafast import Agent\n\nwith Agent(\n    \"https://www.google.com/travel/flights?hl=en\",\n    \"Find one-way flights from Zurich to London on September 20, 2026, \"\n    \"for one adult in economy. Stop when matching flight options are visible.\",\n) as agent:\n    for state in agent.run():\n        print(state[\"elapsed_ms\"], state[\"status\"])\n```\n\nRun with `uv run --env-file .env python your_script.py`. The same policy can run a different task:\n\n```\nuv run --env-file .env python examples/run.py \\\n  --url https://en.wikipedia.org/wiki/Main_Page \\\n  --goal 'Find and open the Wikipedia article about Gödel’s incompleteness theorems.'\n```\n\n`uv run --env-file .env python examples/flights.py --keep-open` performs the flight search, checks the actual route/date/results, and saves its trace. It does not select or book a flight.\n\n- **One request per decision cycle.** Operation and target heads share the same observed state.\n- **No screenshots in the default agent loop.** Jev consumes structured state. The inspector opts into screenshots; the video uses a separate continuous screencast.\n- **One browser call per snapshot.** Read visible controls, their names, values, and text atomically. Keep references to the actual DOM nodes.\n- **Validate the selected target.** Clicks check the document, form values, target, and nearby context. Animation alone does not force another prediction. Resolve current geometry and reject covered controls before input.\n- **Wait for useful state.** After typing into a combobox, wait for visible suggestions, capped at 200 ms. Other interactions get at most two animation frames or 50 ms. These reads happen after execution is logged.\n- **Keep hidden tabs rendering.** Focus emulation prevents background animation throttling without switching Chrome's visible tab.\n- **Send visible text.** Offscreen article bodies and footers do not fill the model context.\n- **Reuse an interrupted text request.** A generated value survives a stale-page retry only if the entire text-helper input is unchanged.\n\nEvery executed target is resolved from an observed node. The executor rechecks page freshness and click occlusion. Model output never becomes selectors, coordinates, shell commands, or executable JavaScript. Text-helper output must parse as a small JSON object before typing.\n\n| File | Job | \n|---|---|\n| [agent.py](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/agent.py) | The complete loop and text-helper handoff | \n| [snapshot.js](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/snapshot.js) | Atomic DOM snapshot, indexed controls, freshness guards | \n| [browser.py](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/browser.py) | Browser connection, current geometry, execution | \n| [model.py](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/model.py) | Dynamic operation/target heads and text generation | \n| [questions.py](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/questions.py) | Model instructions | \n| [demo.py](https://github.com/browser-use/jev-ultrafast/blob/main/jev_ultrafast/demo.py) | Local inspector | \n\nThe current video is a **7,073 ms** Google Flights run. Timing starts after initial page observation and includes model calls, generated text, browser work, stale decisions, and loading waits. A fresh independent check verifies the one-way setting, Zürich, London, September 20, 2026, and visible flight options. The video plays at 1×, with no opening hold and a 0.5-second final hold.\n\nIn six alternating runs with identical models and settings, both versions passed **3/3**. Median task time went from **9.450 s → 7.092 s**, a **25% reduction**; median browser protocol calls went from **1,092 → 101**. This is three repeats of one task on one browser profile, not a general reliability benchmark.\n\nThe same policy opened the requested Wikipedia article in **2.798 s** and passed a local hotel search/filter task in **1.896 s**. Runs, failures, source hashes, and measurement boundaries are in [performance.md](https://github.com/browser-use/jev-ultrafast/blob/main/docs/performance.md).\n\nA `DONE` choice still requires independent outcome verification. The DOM reader handles common HTML and ARIA controls, not the full accessible-name specification. Shadow roots, frames, canvas, uploads, pop-up tabs, nested scrolling, and arbitrary keyboard widgets remain outside this MVP. Owned tabs share the existing Chrome profile.\n\n```\nuv run ruff check .\nuv run pytest\nnode --check jev_ultrafast/static/app.js\nnode --check jev_ultrafast/snapshot.js\nuv build\n```\n\nTests are offline. `uv run python scripts/check_guards.py` checks real controls in a local browser without model calls. Live examples and recording scripts make paid API calls. `scripts/record_flights.py <new-folder>` captures original browser timestamps; `scripts/render_demo.py <recording-folder>` renders that verified run at 1× and crops out the Google account strip. Credentials and raw traces stay ignored.\n\n[Browser Use](https://github.com/browser-use/browser-use) · [Browser Harness](https://github.com/browser-use/browser-harness) · [TypeSafe speculative fan-out](https://docs.typesafe.ai/patterns/fan-out)", "url": "https://wpnews.pro/news/jev-ultrafast-a-browser-agent-with-a-dynamic-indexed-action-space", "canonical_source": "https://github.com/browser-use/jev-ultrafast", "published_at": "2026-09-17 03:12:05+00:00", "updated_at": "2026-09-17 03:23:53.948423+00:00", "lang": "en", "topics": ["ai-agents", "ai-tools", "large-language-models", "ai-products"], "entities": ["TypeSafe", "Jev Ultrafast", "Google Flights", "Browser Harness", "Chrome", "OpenRouter", "inception/mercury-2.5", "GitHub"], "alternates": {"html": "https://wpnews.pro/news/jev-ultrafast-a-browser-agent-with-a-dynamic-indexed-action-space", "markdown": "https://wpnews.pro/news/jev-ultrafast-a-browser-agent-with-a-dynamic-indexed-action-space.md", "text": "https://wpnews.pro/news/jev-ultrafast-a-browser-agent-with-a-dynamic-indexed-action-space.txt", "jsonld": "https://wpnews.pro/news/jev-ultrafast-a-browser-agent-with-a-dynamic-indexed-action-space.jsonld"}}