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 and Linux.

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.1rc3.tar.gz (776.9 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.1rc3-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.1rc3-cp311-abi3-manylinux_2_28_aarch64.whl (8.9 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11+macOS 11.0+ ARM64

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc3.tar.gz
  • Upload date:
  • Size: 776.9 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.1rc3.tar.gz
Algorithm Hash digest
SHA256 9e142f203e2e2c3357165a23e6706904d7edf62a66605cdc6aa0016fa15e7182
MD5 237e463fbb0a65e71f0d847a9b96d445
BLAKE2b-256 5f506024f6ce776d1b9b55056b7331e6d6522680789bbd2e9422ca44b8db6607

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc3-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.1rc3-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a16aea9eade19f427f0b16af0c2340a4eda014d4809a821504d8a30de57a939f
MD5 72a7c71fff228b70377c18c0f25843f8
BLAKE2b-256 2f873def6ddc6e9abb169b00d949941507f23e2cf9ed7de6ade28cddba8f21f2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc3-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.1rc3-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 eb58e27b597473cfe275ad9febee96c3719d4045b48fc79b0ce8445669ad2236
MD5 79159f198243e01a250f99ebc5f34a59
BLAKE2b-256 eb52c3542a3d6244d1ae1355890db532a02ff5d42242bda1b6085aa0428325e2

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc3-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.1rc3-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 4e86757d36eaf510e30c4a28bca73fdc74667d4377ea4d98fe37e691dd99c140
MD5 c48e9f913edf23428511379f80e4d348
BLAKE2b-256 67ab5606dbc7fbf1d55f430e94bd4f6c50713207bdcb8211ca37140b2e5a2c3d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc3-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.1rc3-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 032a64346087caf7888a3305e478d88479047f6854add3f9dd7412db6f1b5710
MD5 01091b9f855b45fe4e7e3f897c5e39d2
BLAKE2b-256 276318d0da535557792d3b43f1ba8a377ff98a0f3d0cb75128707eb3885e8b25

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