Browser Automation — AI Surfs the Web
Browser Automation — AI Surfs the Web — easy-to-understand guide based on official docs
Imagine hiring a tireless personal assistant who sits at your computer, opens websites, fills out forms, clicks buttons, and gathers information—all you have to do is say, “Go get it done.”
That’s exactly what Hermes Agent’s browser automation does. It lets AI operate a web browser just like a human would, handling your online tasks from start to finish.
What Can It Do?
- Open web pages — type a URL, and it navigates there automatically
- Click elements — buttons, links, menus, anything interactive
- Fill out forms — usernames, passwords, search terms, shipping addresses
- Extract information — pull text and data straight from the page
Hermes turns every webpage into a “text map” (called an Accessibility Tree). The AI can see where every button and input field sits, then interact with them using simple labels like @e1, @e2, and so on.
The main tool is browser_exec, which runs model-written Python against the browser over the Chrome DevTools Protocol (CDP). Each call sends a block of Python with browser helpers already imported (like new_tab(url), goto_url(url), wait_for_load(), js(expr), fill_input(selector, text), and capture_screenshot()), and whatever the code prints comes back as the result. The browser session persists across calls, so the model can batch a whole sub-procedure—navigate, wait, extract, act—into one call.
Multiple Ways to Run It
1. Cloud Mode (No Local Browser Needed)
- Browser Use — managed Chromium with stealth, residential proxies, CAPTCHA solving, and reusable profiles
- Browserbase — great for sites with anti-bot protection or proxy requirements
- Firecrawl — includes built-in web scraping
Just add your API keys to the config file:
BROWSERBASE_API_KEY=your_key_here
BROWSERBASE_PROJECT_ID=your_project_id
Note that these keys only supply credentials. The active provider is picked in hermes tools → Browser Automation, and once you’ve chosen one, adding or removing a key won’t switch it.
Browser Use’s own cloud browsers need BROWSER_USE_API_KEY. Other browser sources just use their existing credentials, unchanged.
2. Local Mode (Free & Private)
- Local Chromium (default) — Hermes launches its own packaged Chromium, headless, one browser per session. No API key, no setup.
- Camofox — a local anti-detection browser that masks your fingerprint
- Lightpanda — a lightweight headless engine that starts instantly and uses far less memory than Chrome
- Connect your own browser — via CDP protocol, let AI control the Chrome, Brave, Chromium, or Edge you already have open
/browser connect
That single command makes your existing browser obey the AI’s commands.
The Default Mode
If you never touch browser.backend, you get the default: a single tool called browser_exec. Its engine is browser-harness (the Browser Use CLI is just a thin wrapper around it), and it’s a normal Python dependency of Hermes—so every install ships with it, including the Desktop app. No separate download, no setup.
With no cloud provider, /browser connect endpoint or real-profile toggle configured, Hermes starts a Chromium for the session itself and points browser_exec at it. Your installed Chrome is never touched, and it works on headless servers with no desktop browser at all. The browser is headless by default; set browser.headed: true for a visible window. Idle browsers close automatically after browser.inactivity_timeout seconds (default 120).
If browser-harness ever goes missing from Hermes’s environment, Hermes falls back to the built-in browser tools, and running hermes update restores it.
If Hermes reports it can’t find a Chromium, one command fixes it:
hermes pm install chromium
That also undoes an earlier --skip-browser (-SkipBrowser) choice, so updates keep the browser current. On Linux, Chromium may also need distribution system libraries (npx playwright install-deps chromium).
The Companion Tools
browser_exec does the driving, but the toolset ships three specialists:
| Tool | Purpose |
|---|---|
browser_cdp |
Send one raw CDP command — cookies, network control, evaluating inside a cross-origin iframe, or any verb the helpers don’t cover |
browser_dialog |
Answer a native JavaScript dialog (alert / confirm / prompt / beforeunload) — an unanswered dialog freezes that page’s JS thread |
browser_vault |
Fill saved logins, cards, addresses and 2FA codes into the page without the secrets entering the conversation |
Practical details:
browser_cdpandbrowser_dialogonly appear while a CDP endpoint is configured (/browser connect,BROWSER_CDP_URLorbrowser.cdp_url). A locally launched or cloud browser doesn’t bring them.- Dialog behavior is set by
browser.dialog_policy:must_respond(default — wait for an explicit answer, auto-dismiss afterbrowser.dialog_timeout_s, 300s by default),auto_dismiss, orauto_accept(handy on pages with aggressivebeforeunloadprompts). browser_vault(action="list")shows saved items as handles; thenfill,save_login,enter_code. A fill is refused unless the page origin matches the saved item. See the credential vault page for password-manager backends.
Built-In Convenience Features
- Session isolation — each task gets its own browser, so nothing interferes
- Auto-cleanup — idle sessions close themselves after
browser.inactivity_timeoutseconds (default 120), saving resources - Visual analysis — screenshots plus AI recognition to understand page layouts
- Anti-detection — random fingerprints and CAPTCHA handling (via Browser Use or Browserbase)
- Hybrid routing — when a cloud provider is set, private/LAN URLs like
localhostautomatically use a local browser instead, so the cloud never sees them. This routing is not governed bysecurity.allow_private_urls: the local sidecar runs on the Hermes host, so a hosted Hermes can reach that host’s own loopback and LAN services. Cloud-metadata URLs (169.254.169.254,metadata.google.internal) are always refused.
Special Note for Nous Subscribers
If you have a paid Nous Portal subscription, you can use browser automation directly through the Tool Gateway—no extra API keys needed. For new installs, run:
hermes setup --portal
Existing users can select “Nous Subscription” with hermes model or hermes tools.
Summary & Practical Advice
Browser automation is one of Hermes Agent’s most useful features. Whether you’re auto-filling forms, scraping data, or testing websites, it saves you hours of repetitive work.
Pro tip for beginners: Start with the default local Chromium—no setup needed. If you want to watch the AI work step by step in real time, set browser.headed: true for a visible window, or connect your own browser with /browser connect. Once you’re comfortable, switch to cloud mode for 24/7 unattended automation.
If you want the agent to browse as you—with your existing logins and cookies—turn on real profile browsing (browser.use_real_profile: true). It copies your active profile into a snapshot and runs headless in the background. If Hermes can’t copy your profile, the agent still gets a fresh browser without your logins for that session, and its first browser result says why (real_profile_unavailable). That happens when your default browser isn’t a supported Chromium (Firefox, a Beta/Dev/Canary channel), the pinned profile doesn’t exist, or the cookie database is unreadable or corrupt. On Windows, a running Chrome/Edge/Brave holds its cookie database with an exclusive lock, so you must fully quit the browser first, including any background/tray instance. On macOS and Linux, a running Chrome locks the saved-password and autofill files, but Cookies still copies—and cookies are what keep you signed in—so you can keep your browser open.
Now go ahead—ask the AI to book a flight, check tomorrow’s weather, or order your favorite coffee. Your new digital assistant is ready to surf.
Keep reading: Hermes Computer Use — Browser automation stops at the page; Hermes Computer Use drives the whole desktop.
📖 Official Docs
This article is based on the official Hermes Agent documentation:Official docs › user-guide/features/browser