Skip to content
The agent's browser

The agent's browser

An agent’s browser runs on a browser machine: a small machine that only runs the browser (Chromium’s headless shell), which the platform makes for the agent’s machine the first time its browser is used, and deletes with it. The agent opens pages with it, reads them, clicks, types and takes screenshots. The agent’s own machine stays thin: no Chrome in it, and the browser’s memory is used only while the browser machine runs.

Every agent machine has one by default. To turn it off, in the agent’s machine:

space-env meta set browser/machine=off

It takes effect when the machine next resumes; space-env meta unset browser/machine turns it on again. Without it the agent has no browser tools. It needs a region that has the browser image; without one the tools answer that the browser is not available.

What the agent gets

The agent gets the browser as tools, through the chat’s ACP hub: an MCP server named browser in every session, with two tools: tool_search (find the browser’s tools by words, with their arguments; an empty query lists them) and tool_execute (run one by name). Mistral Vibe, Claude Code and Codex take it; pi has no MCP client and so no browser tools. Behind them are the browser machine’s own server with the tools of Google’s chrome-devtools-mcp:

ToolsFor
new_page, navigate_page, list_pages, select_page, close_page, wait_forpages and navigation
take_snapshot, take_screenshotreading a page: its text with ids to click by, or a picture
click, hover, fill, fill_form, type_text, press_key, drag, upload_file, handle_dialoginput
evaluate_script, list_console_messages, get_console_message, get_css_styles, set_logpointsdebugging a page
list_network_requests, get_network_requestwhat the page loaded
lighthouse_audita Lighthouse audit of the page, on a desktop or a phone: scores for performance, accessibility, SEO, best practices and agentic browsing, and the failed audits with the elements they flag
screencast_start, screencast_stopa video (MP4) of the page

lighthouse_audit runs Lighthouse itself. In mode navigation (the default) it reloads the page and measures its load. In mode snapshot it audits the page as it is, a page you signed in to as well, without performance: that needs a load. The answer gives the machine’s benchmark index beside the performance score. A browser machine has one processor, and a slow or busy machine scores lower, so compare performance scores from the same machine. An audit takes 10 to 20 seconds. A browser machine made before Lighthouse came to it answers that a new browser machine has it.

Performance traces, heap snapshots and device emulation are left out: they cost every session tokens and are rarely what a coding agent needs.

When it runs

Nothing starts with a session. The first browser call makes the browser machine, which takes longer once; after that it is suspended when idle and resumes with the next call. On the browser machine the browser is service browser, an on-demand service, started by its first use and stopped when the machine is suspended.

A browser machine doesn’t keep running without the machine it is for: it is suspended shortly after it, even when the browser was used a moment ago, and opening the browser of a suspended machine (its panel on a screen) resumes that machine first. A machine that can’t resume (refused by the quota, or failed) leaves its browser suspended, and the panel says why. A browser machine is always suspended when idle: its idle timeout can’t be turned off.

What it reaches

The browser machine reaches public addresses only. http://localhost:3000 there is the browser machine, not the agent’s machine or its tools machine: to look at its own work the agent opens the machine’s web portal at its public address. What a page says is content for the agent, not an instruction.

Its files

The browser machine has a disk of its own, so a path given to a browser tool names a file there, out of the agent’s reach. A screenshot is the exception: take_screenshot with a filePath saves the picture at that path on the agent’s machine (on its tools machine when its tools run on one), relative paths in the agent’s directory. A screenshot of 2 MB or more (a long full page) can’t be brought over: the tool says so, and a screenshot of the viewport or of one element works.

A screencast comes over too: screencast_stop saves the video on the agent’s machine, at the filePath given to screencast_start or as screencast-<time>-<n>.mp4 in the agent’s directory. A minute of video is about 1 MB; one over 20 MB stays on the browser machine, out of reach.

The other tools’ file paths (take_snapshot, evaluate_script and get_network_request save their output to one) are left out: the output comes in the tool’s answer, and the agent writes it to a file itself. upload_file uploads files from the browser machine, not from the agent’s machine. Lighthouse’s full reports (report.json and report.html) are written on the browser machine. The answer names their paths, and its summary is what the agent gets.

Its profile is the browser machine’s

Cookies and sign-ins are in the browser’s profile, on the browser machine’s disk. They survive a suspend, and are deleted with the machine the browser belongs to. Suspending stops the browser as it stops every service: it gets the time to write its profile before the machine powers off. Cookies with an expiry and local storage are there after it resumes. Cookies without one (a site that keeps you signed in “for this session” only) end with the browser, as they do when you close a browser. The browser starts again on the page you or the agent last opened, at its address: the page loads anew, so what was typed into it and other open pages are gone.

You don’t see the browser machine in the portal or in space. A browser panel of the machine shows this browser.

On a screen

A browser panel on one of the project’s screens shows a machine’s browser: you can use it yourself, and point at an element for an agent to change.

Preview

The browser in the panel is not inside the machine. Every machine gets a browser machine of its own the first time its browser is asked for: a small machine that only runs the browser, and is deleted with the machine it belongs to. It is the same browser the machine’s agent uses. It reaches the internet only, a machine’s web portal at its public address included.

Opening it

  • Put a browser panel on a screen (Add panel in edit mode, "type": "browser" bound to a machine in the page’s file), or
  • right-click the globe (Open site) on a machine’s card on the canvas and choose Open in built-in browser: the page opens the machine’s browser in its target stack (beside the canvas), or in a side sheet on a screen without one. A browser panel of that machine already on the page gets the focus instead. A plain click on the globe opens the site in a new tab of your own browser.

The panel’s toolbar has an address bar, back, forward, reload (stop while a page loads) and the connection’s state. The first time takes a few seconds: the browser machine is made and started. When the connection ends the panel says why, with Open again.

A browser panel on a project's screen, opened from machine web's card: its toolbar with back, forward, reload and the address of web's portal, and the portal's page below A browser panel on a project's screen, opened from machine web's card: its toolbar with back, forward, reload and the address of web's portal, and the portal's page below

Continue with AgentSpaces

A web portal that lets your organization’s members in with Continue with AgentSpaces signs you in from the panel without asking you to sign in again: opening the browser gives it a sign-in grant for you. The grant only signs you in to the web portals of the machine’s organization, and only while you are still a member. It lasts an hour and is renewed every half hour while the panel is open, so it holds as long as the panel is open and for up to an hour after you close it. When another member opens the same machine’s browser, the grant becomes theirs and yours is no longer renewed. It is not a session of the portal: in the browser you are not signed in to AgentSpaces itself, its pages, its API or other organizations. Each sign-in through it is in the organization’s audit trail, with the machine whose browser it came from.

The machine’s agent drives the same browser, so it can use the grant too: while the panel is open and for up to an hour after, it can sign in as you to those web portals, with the rights your account has there. Once you have signed in to a portal in the browser, that portal’s own session is in the browser anyway, as it would be in any browser you share.

Watching the agent

When the machine’s agent uses this browser you see what it does as it does it. Your clicks and keys still go to the page, so taking over is typing.

Copy and paste

Copy and paste use your own clipboard. Select text on the page and press Ctrl+C (Cmd+C on a Mac) to copy it; Ctrl+X cuts it from a field. Ctrl+V (Cmd+V) pastes your clipboard where the page’s cursor is. Your browser may ask once whether the page may read your clipboard.

Pointing at an element

The toolbar’s inspect button picks an element for the agent. Press it and move over the page: the browser highlights the element under the pointer. Click, and the element is quoted with a CSS selector, the page’s address, its size and place, and the start of its HTML:

> `main#app > button.save.primary` on https://shop.example.com/ (120×32 at 40,200)
> <button class="save primary">Save</button>

The quote goes into the message box of a chat panel on the same page whose agent runs on this machine; with no such chat, to your clipboard. Write what you want under it (“make this button green”) and send. Escape leaves inspect mode without picking anything.

Who sees what

  • The browser is the machine’s, the panel is yours: everyone with that machine’s browser open sees, and steers, the same page, and so does the machine’s agent when it uses this browser.
  • Opening the browser is opening the machine’s console: the same members may, and the audit trail has the same line. It resumes the browser machine, not the machine itself.
  • Closing the panel ends your connection; the browser runs on.
Last updated on