Skip to main content

Python SDK for controlling the native agent-browser engine in-process

Project description

pyagentbrowser

PyPI Release Check License

pyagentbrowser embeds the native Rust agent-browser engine in Python. It gives agents accessibility snapshots, stable element refs, and before-and-after evidence for browser actions.

uv add pyagentbrowser
from agentbrowser import Browser

browser = Browser()
browser.open("https://example.com")
page = browser.observe()

print(page.text)

Browser starts lazily and stays active until browser.close() is called. Keep the same object across notebook cells or interactive Python commands. browser.session.status() reports browser and restore lifecycle state. close() returns the terminal save result. Screenshots returned by browser.capture.screenshot() render inline in notebook frontends.

Snapshot binds accessibility refs to the page state that produced them. Ref actions return an ActionResult containing the original snapshot, the resulting snapshot, and their diff.

Use browser.find for live CSS, XPath, and semantic queries. Namespaces such as browser.capture, browser.tabs, browser.network, and browser.cdp expose focused browser capabilities. Every action in the pinned native engine remains available through browser.native.

Documentation

Installation options

The distribution is named pyagentbrowser. Python imports it as agentbrowser. Wheels support Python 3.11 through 3.14 on macOS, Linux, and x86-64 Windows.

uv add "pyagentbrowser[images]"  # Pillow-backed screenshot helpers
uv add "pyagentbrowser[cdp]"     # CDP frames, targets, and evaluation

Local launches find an installed Chromium browser or prepare Chrome for Testing through the native installer.

Development

make install
make check

make test-integration exercises the Python, PyO3, adapter, and CDP seams against a real browser. make check-release builds and installs both distribution artifacts.

License

Apache-2.0. See LICENSE and NOTICE.

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

pyagentbrowser-0.32.3.tar.gz (817.2 kB view details)

Uploaded Source

Built Distributions

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

pyagentbrowser-0.32.3-cp311-abi3-win_amd64.whl (8.9 MB view details)

Uploaded CPython 3.11+Windows x86-64

pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_x86_64.whl (9.4 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ x86-64

pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_aarch64.whl (9.1 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

pyagentbrowser-0.32.3-cp311-abi3-macosx_11_0_arm64.whl (8.5 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

pyagentbrowser-0.32.3-cp311-abi3-macosx_10_12_x86_64.whl (8.9 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file pyagentbrowser-0.32.3.tar.gz.

File metadata

  • Download URL: pyagentbrowser-0.32.3.tar.gz
  • Upload date:
  • Size: 817.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyagentbrowser-0.32.3.tar.gz
Algorithm Hash digest
SHA256 3f929308ad647920c2a8524e3db30cd7e80b6d210614b2df16585a540bd0533d
MD5 2f1e139181e0b8d97cfb13640f2eed83
BLAKE2b-256 35493eda3448f7820bbad109f552388654b586a0613e60f8f4cc343599f89263

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.32.3-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: pyagentbrowser-0.32.3-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyagentbrowser-0.32.3-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 d1b63f4a9e559410e6bfd156148fa254a2852f31721dcc96eb3daed33d4aae69
MD5 20a041c6b8798d8c921b80a27d516d15
BLAKE2b-256 33a3c0cdffa51466e720f7d5e2bcd630b1dc26ebbef1c2b35fdda34a3c0c7807

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 9.4 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5f53d138e4f93f856a0b068fb7614c08ae8e1087dd0eab685ca268b35f5fbe52
MD5 f566adb7e608c76b32d41dc30a8a4e31
BLAKE2b-256 5ccc32a5c1ec314c6b356bafb83930b5a218621c5d6115b13eb9e2ebad4c6803

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 9.1 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyagentbrowser-0.32.3-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 588d222c62f9f037912b0342bb6dd17d1f4256de8e0a8c59647d5d74c2b54434
MD5 9c53d4cf819a927979dbba08730604ea
BLAKE2b-256 ef4b6a52b2ee9498bfd43e2da010bd5cd211f4960d8e40b4db9101f0ba8492ba

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.32.3-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: pyagentbrowser-0.32.3-cp311-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 8.5 MB
  • Tags: CPython 3.11+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyagentbrowser-0.32.3-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 8a538270397367f980a902a1a0342a6e3242efceda8ddd7c4334953634f6af3a
MD5 100a2c6faf9f46e98553baa06070d145
BLAKE2b-256 4bc08606de9bc488e0517e1a5d806d15d9862b3177a9df4d47f1add5bee3b564

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.32.3-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: pyagentbrowser-0.32.3-cp311-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.11+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.29 {"installer":{"name":"uv","version":"0.11.29","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyagentbrowser-0.32.3-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 06dc567d177011708e4a6931164b9652f87a42759a32fa115794750ef8e75088
MD5 de9b0f43207e3fc6a26de20bc93b25f8
BLAKE2b-256 f8f69f20508a4df8c046cddcbba28fed24df0adbee82bf078d9ce13b69173b8b

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