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.31.1rc6.tar.gz (783.7 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.31.1rc6-cp311-abi3-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.11+Windows x86-64

pyagentbrowser-0.31.1rc6-cp311-abi3-manylinux_2_28_x86_64.whl (9.2 MB view details)

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

pyagentbrowser-0.31.1rc6-cp311-abi3-manylinux_2_28_aarch64.whl (8.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

pyagentbrowser-0.31.1rc6-cp311-abi3-macosx_11_0_arm64.whl (8.3 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

pyagentbrowser-0.31.1rc6-cp311-abi3-macosx_10_12_x86_64.whl (8.7 MB view details)

Uploaded CPython 3.11+macOS 10.12+ x86-64

File details

Details for the file pyagentbrowser-0.31.1rc6.tar.gz.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc6.tar.gz
  • Upload date:
  • Size: 783.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.31.1rc6.tar.gz
Algorithm Hash digest
SHA256 79e096c6efad562d630b31d46a640e0c9402b3cdfce222106d441500eb79d08f
MD5 04e54a5de074e62352191f81153df04e
BLAKE2b-256 58f4e50c461123ff72311f4114b8e9a5eccf566bababae4b7d42819bfcb642bc

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.31.1rc6-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc6-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 8.6 MB
  • Tags: CPython 3.11+, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.31.1rc6-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 b649f93fe401026c1e17dfc2fa21b7aba4bebeb15f16d8874d077631b101282c
MD5 eb8d8c6b24a177b12cdea12b72a70f0c
BLAKE2b-256 eaa0cfb4d869385d09a8830beac7618c0d3e9cd3427c1ddb92bb99f88a68ab25

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.31.1rc6-cp311-abi3-manylinux_2_28_x86_64.whl.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc6-cp311-abi3-manylinux_2_28_x86_64.whl
  • Upload date:
  • Size: 9.2 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.28+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.31.1rc6-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7f59eb2f2bc89386c967af4411d3b8376bf815a622093f005408869528db4a5e
MD5 237c7be29b2d87ce3b7c7bb26de91546
BLAKE2b-256 1559b6bb7831619dafb6d6350bd9018251aaf40ad440ac5e6f3f0f240301506e

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.31.1rc6-cp311-abi3-manylinux_2_28_aarch64.whl.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc6-cp311-abi3-manylinux_2_28_aarch64.whl
  • Upload date:
  • Size: 8.9 MB
  • Tags: CPython 3.11+, manylinux: glibc 2.28+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.31.1rc6-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 28563112a41729cfb324be2b26360061e766b1cecd03a36b8262fff58544927f
MD5 6765c20d9c611d071700b3efc58b2622
BLAKE2b-256 d8daa57e88cca1e28982cf9f3b1c8faaf65bcdc75b318585200a4a9aacac6203

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.31.1rc6-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc6-cp311-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 8.3 MB
  • Tags: CPython 3.11+, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.31.1rc6-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 3aba6fd18a5aa42d2bb27c859516c7acf1df2cdefc3a0fa46c3640a57861050d
MD5 bdbc1f93c04e86de98c059b1614353ed
BLAKE2b-256 48a61f042c4a5a889273bfa2f9b9ec3552124d9b471719511d5c5e048e0d983b

See more details on using hashes here.

File details

Details for the file pyagentbrowser-0.31.1rc6-cp311-abi3-macosx_10_12_x86_64.whl.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc6-cp311-abi3-macosx_10_12_x86_64.whl
  • Upload date:
  • Size: 8.7 MB
  • Tags: CPython 3.11+, macOS 10.12+ x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","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.31.1rc6-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 cf44e1a3aa3d59268d3717e323d4651702ce63b25e2e4d66a027a1641c78c134
MD5 6f98c71a981c0e5f9940468dac909cf4
BLAKE2b-256 6c3e47798e565b94707154a5ce49aa9004f96929a4ec4b3d2d57694be744dd90

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