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. 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.1rc5.tar.gz (777.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.1rc5-cp311-abi3-win_amd64.whl (8.6 MB view details)

Uploaded CPython 3.11+Windows x86-64

pyagentbrowser-0.31.1rc5-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.1rc5-cp311-abi3-manylinux_2_28_aarch64.whl (8.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11+macOS 11.0+ ARM64

pyagentbrowser-0.31.1rc5-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.1rc5.tar.gz.

File metadata

  • Download URL: pyagentbrowser-0.31.1rc5.tar.gz
  • Upload date:
  • Size: 777.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.1rc5.tar.gz
Algorithm Hash digest
SHA256 cc7455dc965668a07e3d6eae8f2a6ebee342a2ebc8ef0efa8689400ba3cea9e6
MD5 b4c1f2175e79d9f2edf5557dde30d1a6
BLAKE2b-256 49402babb0450bbdb641677168f73a2b372b169e3d8af5e4215d714f4a1b4c86

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc5-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.1rc5-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 f29fc01df08673d76f9c12f427de645a455d17dceb4f781965c7b92c4c81e356
MD5 29ff49c791341c8ba082f0a320521609
BLAKE2b-256 2080b100d07379a210dcbf8a1aad9c1745ce1bf5d77b1966690ef16b1152437e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc5-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.1rc5-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b3930322f13fe503b08ab264d947f35a0f0ad096ab75b9ae0ed26e367221aa8a
MD5 924e1eb4726eb87250a1c60ce2d69252
BLAKE2b-256 565651c762f223bfc937db91709283f5ba67ed26668644fef706ae5c91c7dfb1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc5-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.1rc5-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 956aedb796c106300eec4a2e29e1681f51e684d5de4412370daf1e3cdc2f4cd7
MD5 589ee29b4da8482367c1ceeed3c2833a
BLAKE2b-256 cdce50aa82755b6becbe810fc54e3a33183e1fc171c029121ad465aec517d3b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc5-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.1rc5-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a4dedf3f55b7f28cea77e29b83ccf748899b7bfc79945c00b5b062a747fe8d7e
MD5 396eb7b6fc4c6d1d466a3adf4b6ab84c
BLAKE2b-256 200cd60f7d8841460ee03441eee5a9fb93caef4c60f3ee30be09268b201f28ae

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc5-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.1rc5-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 768a5311bff8836288ef70e5ff12df75fbe862b2d6e73ad9bdefdf73e694110c
MD5 3c3522f03c440550aea9f59bed457f49
BLAKE2b-256 2cedb859acc266380813a73f953415512f31ed90149fcf466182b7258cf547c5

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