hai-drivers
Local browser, desktop and shell tools for AI agents, by H Company.
web: read and control Chrome through text, page elements and screenshots.cua: inspect application windows and act on accessibility controls or coordinates.desk: control the active desktop with mouse, keyboard and screenshots.holotab: work in your signed-in Chrome through the HoloTab extension.
Use the tools from a shell or call the Python drivers directly. They run locally without an H Company API key.
The hai-agents SDK adds the agent loop, sessions, approvals and
event streaming. Documentation · PyPI
Quickstart
Requires Python 3.10+. Install the command-line tools with uv.
To try web, install Google Chrome or Chromium first:
uv tool install "hai-drivers[web-cli,cua-cli,desktop-cli]"
web goto https://example.com
web snap
web screenshot
web daemon stop
web starts Chrome in a separate profile and keeps the connection open between commands. Use references from
web snap to act on elements, for example web click @e4 or web type @e7 "search terms". It also supports
page text, tabs, JavaScript, uploads and downloads. web help click explains a command's arguments.
Run web help, cua --help, desk help or holotab help for a command reference. Give agents the instructions
from web skill, cua skill, desk skill or holotab skill. Commands return text; screenshot output includes
an @@attach /path/to/image.png line that your host can display as an image.
Browser profiles and sessions
Choose a profile directory to reuse across runs. Add --headless to run without a window:
web launch --profile "$PWD/agent-chrome" --headless
Or use your signed-in Chrome:
web profiles
web launch --profile user
If Chrome has several profiles, choose one from the list with web launch --profile user:Work. Chrome may ask
to allow remote debugging. web uses its own windows and leaves your existing tabs alone.
web daemon stop closes those windows and disconnects.
For concurrent runs with separate profiles, let Chrome choose its debugging port:
export CDP_PORT=0
export CHROME_PROFILE="$PWD/agent-chrome"
web launch --headless
Give each run a different profile directory. web discovers the port and separates its daemon and state by
profile. To share one Chrome, set a different WEB_SESSION for each agent; each gets its own tabs and daemon.
Stopping one session leaves the others running. CDP_PORT also accepts a fixed port.
Desktop tools
Application controls: cua
cua uses cua-driver to inspect windows and act on their controls.
With Calculator open:
cua windows
cua state "Calculator"
cua type -w "Calculator" "123"
cua key -w "Calculator" Return
cua shot
cua end
Click a control with cua click 12, using its number from the latest state. cua supports background actions
where the OS and application allow them; it refuses actions that need the foreground unless you request it.
Read cua skill for window selection, coordinates and action results. Install with the cua-cli extra.
Screen coordinates: desk
desk sends mouse and keyboard input to the active desktop:
desk screenshot
desk click 320 240
desk text "Hello"
desk key ctrl+s
Coordinates are screen pixels. desk coords 0-1000 selects normalized coordinates; desk aliases installs short
commands such as click and screenshot. Install with the desktop-cli extra.
Both desktop tools need a logged-in graphical session. On macOS, grant Accessibility and Screen Recording to
the terminal or app running them. Linux needs a compatible graphical session; headless web does not.
HoloTab
holotab is included in the base package. Install the HoloTab Chrome extension and enable "Connect to desktop
apps" in its settings. Each session works in its own tab group in your signed-in browser.
holotab goto url=https://example.com
holotab observe
holotab read
holotab screenshot
holotab stop
Arguments use key=value. Use references from observe in actions such as holotab click ref=e14.
holotab help lists commands and exit codes, including when the tool is waiting for consent or the user
has stopped the session.
Python drivers
Add the driver you need to your project, for example uv add "hai-drivers[web]" for Selenium.
Selenium
The web extra provides a synchronous browser API for navigation, tabs, input, screenshots, JavaScript and cookies.
from hai_drivers.web.selenium.driver import SeleniumWebDriver
browser = SeleniumWebDriver(headless=True)
try:
browser.goto("https://example.com")
print(browser.get_html())
finally:
browser.destroy()
Playwright
The playwright extra provides an asynchronous browser API. Install its browser binary once with
python -m playwright install chromium.
import asyncio
from hai_drivers.web.playwright.playwright_browser import PlaywrightBrowser
async def main():
browser = await PlaywrightBrowser.launch(headless=True)
try:
await browser.goto("https://example.com")
print(await browser.get_html())
finally:
await browser.destroy()
asyncio.run(main())
Use PlaywrightBrowser.connect(runner_host, runner_port) to attach to Chrome with remote debugging enabled.
Local desktop
The desktop extra provides screen capture, input, files and local commands through PyAutoGUI and pynput.
from hai_drivers.desktop.local.driver import LocalDesktopDriver
desktop = LocalDesktopDriver()
try:
screenshot = desktop.screenshot_b64()
print(f"Captured {len(screenshot)} base64 characters")
finally:
desktop.close()
Shell and files
The base package includes LocalCodeSandbox for commands, text and binary files, edits, and commands you submit
and poll while they run. On Windows, install Git for Windows so it can use Git Bash.
from hai_drivers.code_sandbox.local.driver import LocalCodeSandbox
with LocalCodeSandbox(workspace_path="./workspace") as shell:
shell.write_file("hello.txt", "Hello from the agent\n")
print(shell.execute("cat hello.txt").stdout)
Commands run with the Python process's user permissions. The workspace path alone does not restrict file or
network access. Pass policy= with a CommandPolicy such as Allowlist to hold commands for approval, or
sandbox= with a SandboxRuntime and an external srt installation to restrict access.
Your application supplies the approval decisions and sandbox settings.
The base package also includes shared interfaces: WebDriverInterface, AsyncWebDriverInterface,
DesktopDriverInterface and ManagedCodeSandboxInterface.
License
MIT.
Metadata
Release files for hai-drivers 0.2.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hai_drivers-0.2.6-py3-none-any.whl | Python 3 | none | any | Details for hai_drivers-0.2.6-py3-none-any.whl |
Release files / hai_drivers-0.2.6-py3-none-any.whl
| Download URL | hai_drivers-0.2.6-py3-none-any.whl |
|---|---|
| Size | 461.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f416c9566a184b2c242f7aec5126b673195d9888d5be3efd93b1340387b02d1b
|
|
BLAKE2b-256 checksum How to use checksums |
b6275fb728e157f282444931c06764718704247b32a554e340372f9e695d619e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logSecurity for hai-drivers 0.2.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
1 file in this release has been uploaded with provenance metadata.
Attestation for hai_drivers-0.2.6-py3-none-any.whl
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.