A local-first multi-agent app development platform, built on PenguinHarness
A built-in browser that you and your agents share
- Date: 2026-09-24
- Type: feature
- Scope:
desktop,server,web,cli,plugins - PR: #848
The desktop app gained a web browser in its dock. People browse in it as in any browser; agents drive the same tabs from their shell with penguin browser, taught by the new preinstalled browser-automation plugin, and work signed in with the user's own accounts, which can be imported from the browsers already on the machine. The automation — reading a page as simplified HTML, running JavaScript in it and reporting what changed — was adapted from GenericAgent (MIT), credited in the README and in THIRD-PARTY-NOTICES.md.
The Browser panel
- A dock panel, Browser, beside the terminal. There is one set of tabs for the whole app, and every conversation's dock shows it.
- A tab strip (icon, title, close, new tab) and a toolbar: back, forward, reload or stop, and an address bar that opens a URL, opens a bare domain over
https://and searches anything else with Bing, with suggestions from the browser's history. The toolbar's menu holds Import from browser…, Clear browsing data…, Set homepage…, Open in system browser and Developer tools. - The new-tab page: a tab opened without an address opens the homepage when one is set, and otherwise a blank page with the address bar focused (unless the user is typing in another field). That covers +, the tab the panel opens by itself, and
POST /api/builtin-browser/tabswith nourl, which is an agent's new tab. Set homepage… takes an address the way the address bar reads one, or the page on screen with Use current page; a Home button beside reload then goes to it, and Clear removes it. It is kept in<data root>/builtin-browser/settings.json, served atGETandPUT /api/builtin-browser/settingswithout the desktop shell. - The panel always has a tab. Whenever it is on screen with none, it opens the new-tab page at once: the first time it opens, after a restart or a reload of the window, and once the last tab closes, whether by its ×, a page's
window.close()or an agent'spenguin browser close. A window opens one such tab however many triggers arrive together, and none while another tab is on its way. Out of sight it opens nothing, and the tab opens when the panel is next shown. There is no empty state; Import from browser… is in the toolbar's menu. - A new tab comes to the front as soon as its page exists. The window claims it the moment the
<webview>knows its webContents id, not at the page'sdom-ready, and until the first page commits, the tab strip and the address bar show the address the tab is opening instead of an empty "New tab".POST /api/builtin-browser/tabswith a web address still answers once that page has loaded: it waits for the page to commit before it waits for the load, since a new tab's initial empty document reads as loaded. - Links in the conversation: right-clicking a web link in a conversation, or Shift+F10 or the Menu key on a focused one, opens the app's menu with Open in built-in browser (the desktop app, while the browser is available; it opens a new tab and brings the panel up in that conversation's dock), Open in system browser (Open in new tab in a browser) and Copy link address. When conversation text is selected too, Copy and Add to conversation follow below a divider. Links to Workspace files keep opening the Files panel, and a right-click elsewhere keeps the menu for selected text.
- While an agent works in a tab, a pulsing ring runs around the page and an icon in the toolbar says so. When the conversation on screen is the one driving the browser, the dock switches to the panel by itself.
- Each tab is an Electron
<webview>in its own persistent partition,persist:penguin-browser, so the browser keeps its sign-ins and site data apart from the app and from the system browser. Pages see a plain Chrome user agent. The tab on screen is laid out at the dock's size; a tab out of sight, and every tab while the dock is closed, stays mounted at the size it was last shown at (1280×800 if never shown), so an agent keeps working in it. - A page can open at most three tabs every five seconds (pop-ups,
target=_blank); more are dropped. The browser holds at most 20 tabs, and a new tab beyond them is refused withtoo_many_tabs. - The panel exists only in the desktop app. The Web App served by
penguin web, Docker or a remote server does not offer it.
Automation over the DevTools Protocol
- The desktop shell hosts the guest pages and relays raw Chrome DevTools Protocol commands, the CDP events a command asks for, and cookie writes to them through
webContents.debugger, and nothing more. It admits a guest only in the browser's partition, onhttp,httpsorabout:blank, without a preload, Node integration or pop-ups; a page's attempt to open a window becomes a request for a new tab. - The server's new
builtin-browsermodule holds the product logic, delivered with the server: the tab registry, the driver, and the page scripts ported from GenericAgent'ssimphtml— the DOM simplification (hidden, floating and covered elements dropped, attributes trimmed, long lists cut to three items with a[FAKE ELEMENT] N more items hidden, selector: "…"hint, the text truncated to a budget) and the change monitor behind an exec (the number of changed elements, the most significant change, and transient text such as toasts). - Trusted input: a click is a CDP mouse move, press and release at the element's center after scrolling it into view; typing inserts the text through CDP and fires
inputandchange. - A dialog the page opens during an exec, click or type is answered so the page does not block: an alert is accepted, and a confirm or a leave-page dialog is dismissed (Electron does not support
prompt()) unless the call asks to accept it; the result lists each dialog. The tab's Page events are on only while an agent acts, so the user's own dialogs stay the browser's. /api/builtin-browserserves status and tabs, open, activate, navigate and close, scan, exec, click, type, screenshot, raw CDP, import, settings, history and clearing browsing data, all to administrators only. Without the desktop app it answers503 browser_unavailablewith the reason:not_desktop,shell_unsupportedorno_window.- The history of the built-in browser is kept in
<data root>/builtin-browser/history.json, up to the newest 5,000 pages.
Load and crashes
- The desktop shell measures its tabs every 10 seconds while any are open, and again shortly after one closes: each tab's memory (the private memory of its page's processes, its cross-site frames' included, not their working sets, which count shared memory in every process) and CPU, pushed to the server as a
metricsevent. - The server judges each measurement:
memorypast 1.5 GB in the tabs (cleared under 1.35 GB),low_system_memoryunder 10% of the computer's memory available (cleared over 12%; not on macOS, whose free count leaves out the memory it would hand back), andmany_tabspast 12 tabs, with the tabs holding the most memory named while a memory warning stands.GET /api/builtin-browser/statuscarries the result asmetrics, and each one reaches the windows asbuiltin_browser_metrics. - The panel shows an amber warning icon in its toolbar while a warning stands, with the tabs' memory and count in its tooltip; a toast says it once each time a warning begins; and the heaviest tabs carry a small warning mark in the strip.
penguin browser statusprints amemory:line, and awarning:line with what to close. - Tabs nobody is looking at and no agent is driving may be throttled while out of sight. The window tells the server which tab it shows (
POST /api/builtin-browser/tabs/on-screen), and the server tells the shell which tabs to throttle with a newthrottlecommand, leaving out the tab on screen, a tab while an agent acts in it and for 30 seconds after, and a new tab for its first 30 seconds. The shell applies it at once, by freezing and resuming the page for an instant: Electron would otherwise wait for the page's next change of visibility, which a parked page never gets. - A page whose process ends stays its tab. The shell reports
tab-crashedwith Electron's reason and marks the tabcrashed, refuses CDP commands for it withtab_crashed, and fails the commands its page had taken. The panel shows This page crashed with Reload in place of the page, and an agent action on the tab answers 409tab_crashed. - The tab list reaches the windows at most five times a second, and not at all when nothing changed. A
data:favicon over 4 KB, or an icon address over 2 KB, is dropped. - A frame or an event from the shell that fails is logged and dropped instead of escaping the server's port listeners, where it would have been an uncaught exception that stops the server; the updater and tray relay got the same guard.
penguin browser
status,tabs,open,switch,close,scan,exec,click,type,screenshot,cdp,importandhistory, each with--jsonand--server, and--tabon the commands that act on a page.- The output is written for a model to read.
scanprints a one-line tab header, the tab list and a---rule before the page.exec,clickandtypeprint labelled lines:status:andtab:,return:,diff:with the largest change indented beneath,transients:,new tabs:andnote:. A return value longer than 8,000 characters is cut with a pointer at--save, which writes the whole value to a file and prints its first 170 characters and the file's path. - An exec script comes from the argument, from
--file, or from stdin (-, or a heredoc when no argument is given). --accept-dialogsonexec,clickandtypeaccepts every dialog, not only alerts. Each answered dialog prints a line, such asdialog: confirm "Delete this item?" → dismissed (rerun with --accept-dialogs to accept).- An error is one line,
error: <code>: <message>, with exit code 1. The commands never auto-start a server; with none running they answerbrowser_unavailable. Inside a session they sendPENGUIN_SESSION_IDwith the calls that act on a page.
The browser-automation plugin
A preinstalled Office Productivity plugin with one skill, browser-automation, built on GenericAgent's browser operating notes: check status, then open → scan → exec → check the diff; navigate and act in separate calls; return explicitly; never guess selectors; use trusted click and type where scripted events are ignored; upload files through DataTransfer or DOM.setFileInputFiles. At a sign-in wall it never types a password: it asks the user to sign in in the panel or offers penguin browser import. It never orders, pays or changes an account without the user's confirmation. Amazon orders are the worked example (searching, extracting rows as JSON, paging, the other Amazon sites), with further page recipes in its reference files.
Importing from the system browser
- The profiles of Chrome, Edge, Brave, Arc (macOS), Vivaldi, Opera, Chromium and Firefox are discovered on each platform, named from
Local Stateorprofiles.ini. - Cookie values are decrypted as each platform stores them: the Keychain's "Safe Storage" password on macOS (the system asks the user to allow it), the fixed or keyring password read with
secret-toolon Linux, and the DPAPI-wrapped AES-GCM key on Windows, unwrapped through PowerShell with the key on stdin. Chrome's app-bound (v20) cookies on Windows cannot be read by another program; they are skipped with a warning. The SHA-256 host prefix of store version 24 is checked and removed. Firefox's cookies are read as stored, except those kept for a container or partitioned to another site. - An import can be limited to some sites (
amazon.comkeeps.amazon.comandwww.amazon.com), and it reads only: each store is copied to a temporary directory, with its write-ahead log, read there and deleted. Warnings give counts, never values. - Imported history merges into the built-in browser's, adding up visit counts.
Documentation
A Built-in Browser page in the docs, a penguin browser section in the CLI reference, the plugin in the Skills & Plugins library tables, the READMEs' plugin tables and an Acknowledgements section, and a GenericAgent entry with its MIT license in THIRD-PARTY-NOTICES.md.