agent and session lifecycle you already use. Run a session that uses a local browser from the hai-agents Python SDK (the only SDK with local control today) and it launches Chrome and connects it to H for you.
Use it when the work has to happen where you are: a site you are signed in to on your machine, or anything behind your local network that a cloud browser cannot reach.
How it works
A local browser is a normal browser environment with itshost set to user_device. When a session starts with one, the SDK opens a connection inside your Python process. The connection receives the agent’s actions and carries them out in the Chrome it controls, and it is what ties this particular session to this particular machine. Everything else is unchanged: observe and steer the run and read its answer just as you would a remote one.
A Python process drives one local browser at a time. Starting a new session that uses the local browser while an earlier one is still running hands the browser to the new session and cancels the earlier one.
Because it drives your machine, a local browser skips the cloud-provisioning fields: vaults and browser profiles apply to cloud-hosted browsers only. Your local Chrome’s own logins and cookies fill that role.
Install the browser driver
The browser driver is an optional extra, provided by the
hai-drivers package:Install
Run a session
In Python, define the environment inline on the agent and run a session. There is nothing else to set up; the SDK starts Chrome if needed and drives it there. From the CLI, serve the browser with The session behaves like any other: observe and steer it, read changes, or watch it in Agent View. The Python connection closes when your process exits; Chrome stays open.Auto-connect covers agents defined inline in
hai local browser and point the agent at the session_id it prints.run_session, start_session, or create_session. A registered agent referenced by name, or a session started from the web app or another machine, expects its user_device environment to carry the session_id of a machine served with hai local browser, as in the CLI tab. Set HAI_AUTO_BRIDGE=0 to opt out of auto-connect entirely.The Chrome it drives
The SDK attaches to a Chrome instance with remote debugging open on port9222. If none is running, it launches one with its own profile in ~/.hai/chrome-profile. That profile persists across runs: sign in to a site once and the agent finds you signed in next time. Your everyday Chrome profile is never touched; Chrome does not allow remote debugging on it.
To drive a different Chrome, start it yourself before the session and the SDK attaches to it instead:
--user-data-dir, so pick a dedicated directory and keep it for the logins you want the agent to have.
Next steps
Browser configuration
Modes, start URL, profiles, and the rest of the browser environment.
Local desktop
Drive the whole desktop on your machine, not just the browser.
Observe & steer
Watch a local run, redirect it mid-task, and read the answer.
Sessions
The session lifecycle, including how to cancel a run.