Skip to main content

Hybrid vision web agent — planner + UI-TARS grounder + Playwright

Project description

Sherpa

Sherpa is a hybrid web agent: a planner reads the page (screenshot + compact controls/content), a screenshot-only grounder picks click coordinates, and Playwright acts. Default models are Qwen3.5-35B-A3B (planner/verifier) and UI-TARS-1.5-7B (grounder) via OpenRouter.

Install (Browser Use–style)

With uv (recommended):

# From GitHub (until published on PyPI):
uv tool install git+https://github.com/AnilPuram/Sherpa.git

# Or from a local checkout:
uv tool install .

# After PyPI publish:
# uv tool install sherpa-agent
# uvx --from sherpa-agent sherpa --help

# One-shot without a permanent install:
uvx --from git+https://github.com/AnilPuram/Sherpa.git sherpa --help

Then:

sherpa install          # Playwright Chromium (+ Linux system deps)
sherpa init             # creates .env if missing
# edit .env → OPENROUTER_API_KEY=
sherpa "Confirm the page heading on https://example.com, then finish."

sherpa install runs the same pattern as Browser Use (uvx playwright install chromium, with --with-deps on Linux). If Chromium is missing when you run a task, Sherpa installs it automatically.

Dev checkout

uv sync
uv run sherpa install
uv run sherpa init
uv run sherpa "Confirm the page heading on https://example.com"

Usage

Config is one required key. Sherpa loads .env automatically (without overriding variables already set in your shell). Optional model/budget overrides are commented in .env.example.

# Start URL can be in the task, or passed explicitly:
sherpa "Confirm the page heading" --url https://example.com

# Headless + machine-readable result:
sherpa "…" --url https://example.com --headless --json

By default the browser is headed, steps print as they run, and artifacts go to artifacts/runs/<timestamp>/.

Verify offline

uv run ruff check .
uv run pytest
uv run sherpa eval

Use --real-model only when you intend paid OpenRouter calls for grounding eval:

uv run sherpa eval --real-model --output artifacts/eval.json

Benchmarks / research

WebVoyager subset tooling, judgment rubrics, run history, and the cross-agent bakeoff live under eval/ and the docs below. Live WebVoyager still requires --real-model so offline scoring stays safe and free.

uv run sherpa webvoyager --output artifacts/webvoyager-offline.json
uv run sherpa webvoyager --real-model --max-cost-usd 1.00 \
  --artifacts artifacts/webvoyager --output artifacts/webvoyager-live.json

See WEBVOYAGER_TESTS_AND_RESULTS.md, WEBVOYAGER_RUN_HISTORY.md, and eval/bakeoff-round2-comparison.md.

How it works

The loop keeps a bounded progress ledger and memories, recovers from grounding/execution errors, and requires a separate verifier to accept every done answer. Defaults: 20 planner steps, 5 consecutive corrections, high planner reasoning effort. Details: ARCHITECTURE.md.

Files

  • src/sherpa/cli.py: simple task CLI + research subcommands
  • src/sherpa/install_browser.py: sherpa install / auto Chromium setup
  • src/sherpa/agent.py: bounded progress, recovery, and hybrid-observation agent loop
  • src/sherpa/models.py: planner, grounder, and verifier OpenRouter boundary
  • src/sherpa/eval.py: point-in-box grounding evaluation
  • src/sherpa/webvoyager.py: offline validation and bounded live WebVoyager subset runner
  • ARCHITECTURE.md: agent flow and component diagrams
  • eval/bakeoff-round2-comparison.md: Sherpa vs Browser Use vs Magnitude bakeoff
  • scripts/bakeoff/: external-agent bakeoff runners

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sherpa_agent-0.1.0.tar.gz (133.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sherpa_agent-0.1.0-py3-none-any.whl (40.7 kB view details)

Uploaded Python 3

File details

Details for the file sherpa_agent-0.1.0.tar.gz.

File metadata

  • Download URL: sherpa_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 133.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.11

File hashes

Hashes for sherpa_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5bb6ab826f2e5731239c71198c2f786941183b47183f157997cc91260ff00ea1
MD5 73d1b3c87555bcf9d28fbd47b19f5185
BLAKE2b-256 13027b07a7cb3adf1f14cec6d43681d685f024afacb6b08b0aae79cedc7266e3

See more details on using hashes here.

File details

Details for the file sherpa_agent-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sherpa_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e2cad5b9bce1fc2ffddb9e9af30066d65bebf4defcff1a432b3f0d48bbef5643
MD5 71e1f19151a88669eedf9b547f3c8db5
BLAKE2b-256 f8390c63d722c23c324a2d4bf10d9a178a2b59160faf4df0e827e9daa3735d0b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page