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

Uploaded CPython 3.11+manylinux: glibc 2.28+ ARM64

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

Uploaded CPython 3.11+macOS 11.0+ ARM64

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc4.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.1rc4.tar.gz
Algorithm Hash digest
SHA256 aa1a56a9ad480d44e52b805e723c3880e15e2470bedfb4a7ab3b2ce8f873a497
MD5 e609ad3140004f0f4c2595ff9abc63ab
BLAKE2b-256 8cad9223eff29976d7d2f53f54349320a69f7b023f6d00b905169a82f2e87052

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc4-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.1rc4-cp311-abi3-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ca3c9dc070f8972f57fc9b4b8140dc618b3dddb52e47d6064245bab65935e31c
MD5 8036497f844e40b2e67bca4d30f05268
BLAKE2b-256 6fa5f0ecf87d011d1c1a538e42f32fd651729437b3f554ecd4938c9c5e09e75e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc4-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.1rc4-cp311-abi3-manylinux_2_28_aarch64.whl
Algorithm Hash digest
SHA256 2f9c9379bb8122cb7bee4490e823938aeb7858feba6b5cb897fa0b8b5d988542
MD5 c2a145fe1804120c53e06878829bc953
BLAKE2b-256 968a00765ffa92424c25e39ab19ea4a35029faf9f3cbbb7a193981cd85234f00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc4-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.1rc4-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 9352e1aa2b435c409143747678d0830ee32fbd9f0fabb4789d0bca556423d976
MD5 4b8b7a690146f5ddeddd4de01189077b
BLAKE2b-256 bc63155230f4c3000c2c6688e8e243e3cdd0cc6bc1f47e84811df2f528944490

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyagentbrowser-0.31.1rc4-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.1rc4-cp311-abi3-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 4b2bfd2266aa6116d054ec587a890eceddb16c54532e00bb0569a35656b1d749
MD5 138f10bbaf0c6acacd663246200dc6a7
BLAKE2b-256 34236ddd1ec59b9113156bba43069ce6bee2f9d167c4f6be67fecd4d55efc11c

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