@dreki-gg/pi-browser-tools
Browser automation and web research tools for pi — search, visit, screenshot, interact, and inspect console output
Package details
Install @dreki-gg/pi-browser-tools from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@dreki-gg/pi-browser-tools- Package
@dreki-gg/pi-browser-tools- Version
0.1.0- Published
- Apr 29, 2026
- Downloads
- not available
- Author
- jalbarrang
- License
- MIT
- Types
- extension
- Size
- 66.6 KB
- Dependencies
- 4 dependencies · 3 peers
Pi manifest JSON
{
"extensions": [
"./extensions/browser-tools"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
@dreki-gg/pi-browser-tools
Browser automation and web research tools for pi.
It adds:
web_searchfor search-engine-backed web discoveryweb_visitfor readable markdown extraction via fetch or the selected browser backendweb_screenshotfor browser screenshots at desktop or mobile sizesweb_interactfor click/type/select/scroll/hover/wait actions on the open pageweb_consolefor captured browser logs, warnings, and uncaught page errors/browserfor a quick browser status check
Install
pi install npm:@dreki-gg/pi-browser-tools
Default browser backend: Playwright.
Optional agent-browser backend setup:
# Homebrew
brew install agent-browser && agent-browser install
# or npm
npm install -g agent-browser && agent-browser install
Tools
| Tool | Description |
|---|---|
web_search |
Search the web and return up to 10 filtered results |
web_visit |
Fetch a URL and convert it to readable markdown, with optional browser rendering |
web_screenshot |
Take a screenshot of the current page or navigate to a URL first |
web_interact |
Interact with the current browser page and return a fresh screenshot |
web_console |
Read captured browser console output, warnings, errors, and uncaught page errors |
Search providers
Default provider: DuckDuckGo HTML.
Optional env vars:
# Select provider: duckduckgo | google | brave
export WEB_SEARCH_PROVIDER=duckduckgo
# Google Custom Search
export GOOGLE_CSE_API_KEY=...
export GOOGLE_CSE_ID=...
# Brave Search
export BRAVE_SEARCH_API_KEY=...
If WEB_SEARCH_PROVIDER=google, both GOOGLE_CSE_API_KEY and GOOGLE_CSE_ID are required.
If WEB_SEARCH_PROVIDER=brave, BRAVE_SEARCH_API_KEY is required.
Browser backend selection
Use PI_BROWSER_BACKEND to choose the browser runtime:
export PI_BROWSER_BACKEND=playwright
# or
export PI_BROWSER_BACKEND=agent-browser
- Unset or invalid values fall back to
playwright. - If
agent-browseris selected but unavailable, browser-backed tools fail with install guidance.
Notes
web_visituses plain fetch by default and falls back to the selected browser backend when the fetched markdown is too thin.web_interactandweb_consolerequire an open browser session. Open one first withweb_screenshotorweb_visitusingrender: true.web_interact.textis best-effort onagent-browser; preferselectorfor reliable automation.web_consoleonagent-browsermerges console messages and page errors, so ordering and level attribution may differ slightly from Playwright.web_visit.details.methodcan now befetch,playwright, oragent-browser.- Browser sessions auto-close after a short idle timeout.
- See
docs/agent-browser-compatibility.mdfor known gaps and backend-specific notes.