Browser automation CLI for AI agents - reliable element targeting through accessibility tree refs
Project description
browse-now
Browser automation CLI for AI agents. Control your browser from the command line with reliable element targeting through accessibility tree refs.
Part of Nowledge Mem - Personal memory for AI agents.
Why browse-now?
- Low overhead: No tool definitions loaded into LLM context (unlike MCP)
- Reliable targeting: Uses accessibility tree refs (
@e1,@e2) for 95%+ click reliability - AI-agent optimized: Designed for the
snapshot → click → repeatworkflow - Multi-browser support: Works with Chrome, Arc, Edge, and other Chromium browsers
Installation
pip install browse-now
The PyPI package is useful when you want the CLI or Python API outside the desktop bundle, but it still must run on the same machine as the Nowledge Mem app and the connected browser extension.
Prerequisites
- Nowledge Memory Exchange Chrome extension (verson v2.0.71 or later) installed
- Nowledge Mem app running on the same machine (provides the local browser bridge)
Quick Start
# Navigate to a page
browse-now open https://example.com
# Get interactive elements with refs
browse-now snapshot -i
# Output:
# textbox "Search" [e1]
# button "Submit" [e2]
# link "About" [e3]
# Click by ref
browse-now click @e2
# Fill input
browse-now fill @e1 "AI agents" --submit
Core Workflow
The browse-now workflow matches the Claude Chrome Extension pattern:
1. browse-now open <url> # Open page (isolated agent tab)
2. browse-now snapshot -i # Get refs [e1], [e2]...
3. browse-now click @e5 # Click by ref
4. browse-now fill @e3 "text" # Fill by ref
5. (If page changed) → snapshot -i again
Command Reference
Navigation
browse-now open <url> # Navigate (isolated tab by default)
browse-now open <url> --no-isolated # Use current active tab
browse-now back # Go back
browse-now forward # Go forward
browse-now reload # Reload page
Snapshot (Page Analysis)
browse-now snapshot # Full accessibility tree
browse-now snapshot -i # Interactive elements only (recommended)
browse-now snapshot -i -w 1000 # Wait 1s for late-loading content
browse-now snapshot -s "main" # Scope to CSS selector
Interactions
# Click by ref (95%+ reliable - primary method)
browse-now click @e1
# Click by text (85% reliable - fallback for dialogs)
browse-now click -T "Submit"
browse-now click -T "确认" # Works with Chinese
# Fill and type
browse-now fill @e2 "text" # Clear and type
browse-now fill @e2 "text" --submit # Fill and submit
browse-now type @e2 "more" # Append without clearing
# Other interactions
browse-now press Enter # Press keyboard key
browse-now hover @e1 # Hover (reveal hidden UI)
browse-now scroll down 500 # Scroll page
Get Information
browse-now get text @e1 # Get element text
browse-now get title # Get page title
browse-now get url # Get current URL
browse-now get page-text # Extract full page text
Screenshots
browse-now screenshot page.png # Save to file
browse-now screenshot --full # Full page screenshot
browse-now screenshot -e @e1 # Element screenshot
Wait
browse-now wait @e1 # Wait for element
browse-now wait 2 # Wait 2 seconds
browse-now wait 500ms # Wait 500 milliseconds
Tabs
browse-now tabs # List open tabs
browse-now switch <tab_id> # Switch to tab by ID
browse-now agent-tab status # Check agent tab status
Multi-Browser
browse-now browsers # List connected browsers
browse-now -b arc_123 open <url> # Target specific browser
JSON Output
For programmatic use, add -j or --json:
browse-now -j snapshot -i
browse-now -j click @e1
browse-now -j get title
Local-only security model
browse-now talks to the browser bridge endpoints exposed by the Nowledge Mem app. Those endpoints are intentionally local-only. They are not exposed through Access Anywhere, Cloudflare tunnels, or other remote-access paths.
What this means in practice:
browse-nowmust run on the same machine as the Nowledge Mem app- the controlled browser must also be on that same machine with the Exchange extension active
- publishing to PyPI makes the CLI and Python API easier to install, but does not turn browser automation into a remote-access surface
NOWLEDGE_API_URL and NOWLEDGE_API_KEY can still point at another local deployment shape, but they are not a supported way to tunnel browser automation through Access Anywhere.
Python API
from browse_now import BrowserClient
async def main():
async with BrowserClient() as browser:
await browser.navigate("https://example.com")
await browser.click("#login-btn")
await browser.fill("#email", "user@example.com")
await browser.fill("#password", "secret", submit=True)
import asyncio
asyncio.run(main())
Sync API
from browse_now import BrowserClientSync
browser = BrowserClientSync()
browser.navigate("https://example.com")
browser.click("#btn")
Reliability Guide
| Method | Reliability | Use Case |
|---|---|---|
click @eN |
95%+ | Primary method (most reliable targeting) |
click -T "text" |
85% | Fallback for dialogs/menus |
Important clarification:
- High reliability means the CLI can target/click the intended element.
- It does not bypass login, paywalls, tokenized links, or anti-bot restrictions.
- For gated sites (social media, banking, etc.), always validate navigation using
browse-now get url/browse-now get titleafter clicks.
Decision tree:
snapshot -i→ Found ref? →click @eN- After click/fill:
wait 1-2→get url(detect redirect/404/login wall) - Sparse results? → Use screenshot +
click -T "visible text" - Re-snapshot with
-w 1000if content loads late
Example: Weibo Delete Flow
browse-now snapshot -i # Find "更多" [e45]
browse-now click @e45 # Open menu
browse-now snapshot -i # Find "删除" [e67]
browse-now click @e67 # Delete
browse-now snapshot -i # Find "确定" [e89]
browse-now click @e89 # Confirm
Troubleshooting
- No browser connected: Make sure the Nowledge Memory Exchange extension is installed and active
- Connection refused: Ensure Nowledge Mem is running on the same machine as
browse-now - Element not found: Run
snapshot -iagain after page changes - Sparse results: Site may have poor accessibility. Use
screenshot+click -T "visible text" - Multiple browsers: Use
-b <browser_id>to target specific browser
Documentation
- Full Documentation
- Nowledge Mem - Personal memory for AI agents
- Chrome Extension
Acknowledgments
Inspired by Claude Chrome Extension and vercel-labs/agent-browser for the browser automation approach.
License
Proprietary - see Nowledge Terms of Service
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
Built Distribution
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 browse_now-2.2.0.tar.gz.
File metadata
- Download URL: browse_now-2.2.0.tar.gz
- Upload date:
- Size: 32.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc997df9d70c4cfb7e81c0e14ada4e152704281940bb261d3b756d7df4174d65
|
|
| MD5 |
ed6da929593cf8f2a81dbc2cb2eb02b2
|
|
| BLAKE2b-256 |
5060e3ea751ed4ee91c3b1660dee53a24ff9981fd3d2c54bf3dbcdc4cd025ff6
|
File details
Details for the file browse_now-2.2.0-py3-none-any.whl.
File metadata
- Download URL: browse_now-2.2.0-py3-none-any.whl
- Upload date:
- Size: 34.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0ad1bd3a5dbd5c05e2e54240525e5043691e93da41ed72f1689f204754294a0
|
|
| MD5 |
86cb0004d69887d61230747811d81664
|
|
| BLAKE2b-256 |
ec00fb05b8557cc067e482a91bb43854786b16a4c53faab0617f0ee9f0fc0eb6
|