> ## Documentation Index
> Fetch the complete documentation index at: https://docs.anchorbrowser.io/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Anchor Browser provides cloud browsers for AI agents and automation: stealth browsing with residential proxies, managed authentication into third-party web apps, and browser sessions that run reliably at scale. AI agents that need Anchor credentials should start with https://docs.anchorbrowser.io/quickstart/agent-access. This flow lets agents obtain an API key programmatically without creating a dashboard account. Read that page before attempting authentication or API access.

# Jev Browser Agent

> Fast browser automation that classifies the next action with TypeSafe Jev and types with the model of your choice

Jev is a decision model from TypeSafe. Instead of generating text, it answers multiple-choice questions about a given state and returns one of the offered options with a probability. The Anchor `jev` agent turns browser automation into exactly that kind of question: at every step it shows Jev the controls on the current page and asks which one to act on next. A regular chat model is called only when a value has to be typed into a field.

In Anchor Browser, this agent is available through the agentic APIs with `taskOptions.agent = 'jev'`.

## Overview

The Jev agent provides:

* **Fast steps** — one classification call per action, no screenshots and no free-form reasoning
* **Choices, not guesses** — Jev can only pick from the controls that are actually on the page, so every action lands on a real element
* **Text generation only when needed** — typed values come from your configured `provider`/`model` (or BYOM); every other step is pure classification
* **Lean token usage** — classification returns a choice instead of text, and the text model runs just for the fields you fill

Learn more about the model in the [Jev documentation](https://openrouter.ai/docs/guides/community/jev).

## Code Example

<CodeGroup>
  ```javascript node.js theme={null}
  import { client, agentTask } from 'anchorbrowser';

  client.setConfig({ auth: () => process.env.ANCHORBROWSER_API_KEY });

  const response = await agentTask(
    'Search Wikipedia for Alan Turing and open his article. From that article, open the linked "Enigma machine" article. Stop when it is visible.',
    {
      taskOptions: {
        url: 'https://www.wikipedia.org',
        agent: 'jev',
        // provider/model only affect typed text; Jev itself needs no model selection
        // provider: 'anthropic',
        // model: 'claude-sonnet-4-5',
      },
    }
  );

  console.log(response);
  ```

  ```python python theme={null}
  from anchorbrowser import Anchorbrowser
  import os

  anchor_client = Anchorbrowser(api_key=os.environ.get("ANCHORBROWSER_API_KEY"))

  response = anchor_client.agent.task(
      'Search Wikipedia for Alan Turing and open his article. From that article, open the linked "Enigma machine" article. Stop when it is visible.',
      task_options={
          'url': 'https://www.wikipedia.org',
          'agent': 'jev',
          # provider/model only affect typed text; Jev itself needs no model selection
          # 'provider': 'anthropic',
          # 'model': 'claude-sonnet-4-5',
      }
  )

  print(response)
  ```
</CodeGroup>

## How Jev Drives the Task

Jev is a classifier, not a planner. It never writes selectors, coordinates, or code. The agent owns the loop and uses Jev for one thing: deciding the next move from a closed list of options.

<Steps>
  <Step title="Observe the page">
    The agent reads the current page and builds a numbered list of the controls a user could act on right now: links, buttons, text fields, checkboxes, dropdown options, and so on, each with its label and current state. It also captures the visible text so Jev can tell whether the goal is already satisfied.
  </Step>

  <Step title="Ask Jev for the next move">
    Jev receives the goal, the page summary, the control list, and the recent action history, and returns a single decision:

    * `CLICK`, `TYPE_TEXT`, or `SELECT` on one specific control from the list
    * `SCROLL_DOWN`, `SCROLL_UP`, or `WAIT` when the needed control is not available yet
    * `DONE` when every requirement in the goal is visibly satisfied
    * `BLOCKED` when no offered action can make progress

    Because the answer is a choice rather than generated text, a step costs one round-trip and cannot reference an element that does not exist.
  </Step>

  <Step title="Generate the value for typed fields">
    Only `TYPE_TEXT` needs text. The configured text model receives the goal, the selected field's label and current value, and the page context, and returns the exact string to type. Secret placeholders such as `<secret>EMAIL</secret>` are kept verbatim and swapped for the real value at type time. If no value can be determined, the task stops as `blocked` instead of typing a guess.
  </Step>

  <Step title="Act and repeat">
    The agent performs the chosen action on the real element, confirms the page has not changed since Jev decided (and re-asks if it has), then observes again. The loop continues until Jev reports `DONE` or `BLOCKED`, or the step limit is reached.
  </Step>
</Steps>

### Example walkthrough

The Wikipedia task above completes in three actions and one closing decision:

| Step | Page | Jev decision | What happens |
| - | - | - | - |
| 1 | wikipedia.org | `TYPE_TEXT` → "Search Wikipedia" | Text model returns `Alan Turing`; the agent types it |
| 2 | wikipedia.org | `CLICK` → suggestion "Alan Turing" | Opens the article |
| 3 | Alan Turing article | `CLICK` → link "Enigma machine" | Opens the linked article |
| 4 | Enigma machine article | `DONE` | The end condition is visible |

Each row is one decision. The text model ran once, at step 1.

### Compared with the default agent

The same task, run once on each agent with `max_steps: 30`:

| | `jev` | `browser-use` (default) |
| - | - | - |
| Completed the task | Yes | Yes |
| Execution time | 7.6 s | 34.9 s |
| Text model calls | 1 | 6 |

Results vary with the site and the task. Jev's advantage is largest on click-through and form flows, where most steps need no generated text.

## Configuration Options

| Parameter | Type | Description |
| - | - | - |
| `agent` | string | Must be `jev` |
| `url` | string | Starting URL for the task |
| `provider` | string | Provider for typed text only (same values as other agents) |
| `model` | string | Model for typed text only. Defaults to the platform default model |
| `max_steps` | integer | Maximum actions, default and upper bound `60` |
| `secret_values` | object | Secure credentials (see [Secret Values](/agentic-browser-control/secret-values)) |
| `extended_system_message` | string | Extra instructions appended to the goal |

<Note>
  Jev is in beta and currently focuses on navigating and operating pages. Structured output (`output_schema`), human-in-the-loop (`human_intervention`), OS-level control (`use_os_control`), and element detection (`detect_elements`) are not available yet, so leave them unset when choosing this agent. `use_action_index_tools` is accepted and has no effect.
</Note>

### Which model does what

| Call | Model | Credentials |
| - | - | - |
| Next-action classification (every step) | Jev | Managed by Anchor. Not affected by `provider`, `model`, or BYOM |
| Typed text (`TYPE_TEXT` steps only) | Your `provider`/`model` | Platform, or your own when [BYOM](/agentic-browser-control/bring-your-own-model) is configured for the project |

With BYOM active, all BYOM providers are supported for typed text (`openai`, `anthropic`, `google`, `vertex`, `azure`, `custom`) and `model` is required.

## Result

The task returns plain text: a status line followed by the visible text of the final page.

```text theme={null}
Done at https://en.wikipedia.org/wiki/Enigma_machine after 3 steps.

Enigma machine
From Wikipedia, the free encyclopedia
…
```

A task that could not finish starts with `Stopped (blocked) at …`. Reported token usage includes both the classification calls and the text model.

## When the Agent Stops

* Jev answers `DONE` — every requirement is visibly satisfied on the current page
* Jev answers `BLOCKED` — no offered action can make progress
* `max_steps` is reached
* Several consecutive actions did not change the page
* The text model could not determine a value for a required field
* The page kept changing before an action could be confirmed

## Limitations

* **Decides, does not write** — Jev returns a choice, never text. The agent operates the page; it does not summarize, extract, or answer questions, and the result is the final page state. Use another agent when the deliverable is generated content.
* **Needs real controls** — Jev picks from the labeled controls a page exposes. Purely visual interfaces such as canvas apps, maps, games, and image CAPTCHAs offer nothing to pick from, so use a screenshot-based agent there.
* **One step at a time** — every decision is made from the current page and recent history. Tasks that hinge on comparing content across pages or interpreting ambiguous instructions are better served by a reasoning agent.
* **Done means visible** — Jev reports `DONE` only from what is on screen. Outcomes the page does not visibly confirm cannot be verified by the agent.

## Secure Credentials with Secret Values

Secret values are substituted at type time and never sent to Jev or the text model.

<CodeGroup>
  ```javascript node.js theme={null}
  const response = await agentTask(
    'Enter the API key in the key field and click Save',
    {
      taskOptions: {
        url: 'https://app.example.com/settings/api',
        agent: 'jev',
        secretValues: {
          API_KEY: process.env.APP_API_KEY,
        },
      },
    }
  );
  ```

  ```python python theme={null}
  response = anchor_client.agent.task(
      'Enter the API key in the key field and click Save',
      task_options={
          'url': 'https://app.example.com/settings/api',
          'agent': 'jev',
          'secret_values': {
              'API_KEY': os.environ.get('APP_API_KEY'),
          },
      }
  )
  ```
</CodeGroup>

Learn more about [domain-scoped secrets](/agentic-browser-control/secret-values).

## Best Practices

* **State the visible end condition** in the goal (for example, "stop when the order confirmation is visible"). Jev only answers `DONE` when the page shows that every requirement is met.
* **Prefer Jev for form-driven sites** such as search, filters, and multi-page flows with native controls. Use a computer-use agent for canvas or purely visual interfaces.
* **Pick a fast text model** — it is called only for `TYPE_TEXT`, so a small model keeps steps quick without affecting decision quality.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.