Python SDK for controlling the native agent-browser engine in-process
Project description
pyagentbrowser
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyagentbrowser-0.31.2rc0.tar.gz.
File metadata
- Download URL: pyagentbrowser-0.31.2rc0.tar.gz
- Upload date:
- Size: 794.2 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ddae38cd18d033914a98759dbe8eb1478b1270afa10c55ed7fb655ed1ac0c27d
|
|
| MD5 |
38fc3dea85144654b9ecfd2453056ee8
|
|
| BLAKE2b-256 |
09d06f625ba415bf36d1b6df93d861bf31ac84ae29501931d4a61afe1bb5c039
|
File details
Details for the file pyagentbrowser-0.31.2rc0-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: pyagentbrowser-0.31.2rc0-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 8.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8bd7540cf79191eb8518b9e3f548e85b3fc5f8012c85ada3a1bf5256c76e7622
|
|
| MD5 |
16cd699b7c796cd6cd445a3669c1c08c
|
|
| BLAKE2b-256 |
506aa95b2c23970849b1838d0c1e106308937b44faa5febfe5ccb17a31139902
|
File details
Details for the file pyagentbrowser-0.31.2rc0-cp311-abi3-manylinux_2_28_x86_64.whl.
File metadata
- Download URL: pyagentbrowser-0.31.2rc0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb0f8cf25466b6569a5d3421711676a20db750e15fcaea941a16a8e56352aa36
|
|
| MD5 |
491cc4088ef8f3f840355989889cfdaf
|
|
| BLAKE2b-256 |
81173d115809ce9468aa9df4f15ef224184955a359e2690876e63228858cf795
|
File details
Details for the file pyagentbrowser-0.31.2rc0-cp311-abi3-manylinux_2_28_aarch64.whl.
File metadata
- Download URL: pyagentbrowser-0.31.2rc0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc9e4a34768c36e008b478f0dc4c4a27db7fa26cda2f23227b072801492e244d
|
|
| MD5 |
e9b68499a3fd337b7704fc94e7da7c52
|
|
| BLAKE2b-256 |
f075ce042a997f5729c84c9722911c84eb1ab1a801e2599b4616201bcdc10f57
|
File details
Details for the file pyagentbrowser-0.31.2rc0-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: pyagentbrowser-0.31.2rc0-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f42662ca278a0b6883168dece5e5d8f4171199f5abce702ba8c4871919d3335e
|
|
| MD5 |
a4240e8345d65a49bdf9b4d3d83b6e62
|
|
| BLAKE2b-256 |
dd13a01c3f45bd04d74c81385b2d714b04c840e5e1bcd7400d04a606718d2a49
|
File details
Details for the file pyagentbrowser-0.31.2rc0-cp311-abi3-macosx_10_12_x86_64.whl.
File metadata
- Download URL: pyagentbrowser-0.31.2rc0-cp311-abi3-macosx_10_12_x86_64.whl
- Upload date:
- Size: 8.8 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e1f17e84a36ead9a732c933a148aa1e14fc8d4dad274b33dbc4f5c5ef86a9602
|
|
| MD5 |
3d86c5af32c0e4f9718067cd60c53ccf
|
|
| BLAKE2b-256 |
c061781360e90adf01eb8b7906ec3909f9026c5c83b102c07d385782ba8094f1
|