OPEN-SOURCE EXTENSION
pi-browser: a browser for pi agents
Your agent gets its own browser, and you can take over and hand it back. It reads pages, clicks, types and takes screenshots, and it files every page it reads as evidence.
What it adds to your agent
Its own browserThe agent drives a Chrome of its own: a local Chrome, Browserbase or Kernel. It reads pages, clicks, types and takes screenshots. A local Chrome needs no key.You can take over and hand it backA host mounts the live view in a few lines, and then a person sees the agent's page, uses the mouse and keys, and lets the agent go on. While the person is driving, the agent's browser calls are refused.Credentials you register stay out of what the model seesCredentials you register, and keys of the common shapes, are replaced with [redacted] in every tool result, failure, filed page and log.Every page the agent reads is filed as evidenceThe file holds the page's URL, its title and its SHA-256.Bot walls get a name, and failures get a codeA CAPTCHA, a login wall, a paywall or a region block is named, with a next step, when you give the package a page judge. Every failure is one envelope with one of 15 codes.
The limit. The credential guards are not in this release. Until they ship, use the live view with test accounts on practice sites only. The model's own page code can read what a person types there.
What the credential redaction does not cover: a value nobody registered and no shape matches, and what a person types into a page.
Install
pi install npm:@parcha/pi-browser@beta # the pi coding agent's extension
npm install @parcha/pi-browser@beta # the library: providers, driver, durable adapterpi install loads the extension. A Chrome starts on the model's first browser call, and not before.
Node 22.19 or later, ESM only. Apache-2.0.
Try it
The demos live in the repository, not the npm package. Each needs Chrome or Chromium; CHROME_PATH names it.
one-script-three-providersthe same script on a local Chrome, Browserbase or Kernel.hold-an-irreversible-actionunder the ask policy, a form post waits until a person approves it.read-a-pdfweb_fetch on a PDF the fetch service cannot convert: it fetches the raw file and hands it to your extractor.
git clone https://github.com/Parcha-ai/agentrun && cd agentrun
npm ci && npm run build
node packages/pi-browser/examples/one-script-three-providers.mjs https://github.com/Parcha-ai/agentrunBrowsers it runs on
Local Chromea Chrome the package starts and stops, with its own profile directory. It needs no key.Browserbasea Browserbase session. It needs BROWSERBASE_API_KEY.Kernela Kernel browser, through its REST API. It needs KERNEL_API_KEY.