Agents
The browser tab
Open an HTML file or a page on localhost in a tab next to the terminal, comment on it for your agent, and let the agent open and screenshot pages.
The browser tab shows a web page in the editor, next to the terminal: an .html file your agent wrote, or the app it is building on a dev server. You look at the page, point at what is wrong, and send your notes to the agent, the same way as comments on a Markdown document. The page is drawn by WebKit, the engine of Safari.
It is a tab for checking your own work, not a general web browser: there are no bookmarks, no history list, no downloads, no printing and no find in page, and a link that would open a new window opens in the same tab.
Opening a page
- A file — an
.htmlor.htmfile opens in a browser tab wherever you open it: the Files panel, ⌘P, or ⌘-click on its path in the terminal. There is no source view; editing the file is the agent's job. - An address — File → New Browser Tab, also in the command palette and in an editor tab's right-click menu, opens an empty tab with the keyboard in the address field.
- A link in the terminal — ⌘⇧-click a web address in the terminal and it opens in a browser tab in the editor. If a tab already shows that address, it comes to the front instead. A plain ⌘-click still opens your usual browser.
Opening a file that is already open in a tab switches to that tab. Browser tabs come back on their last page when you reopen the project.
The address field
Type an address and press ↩. ⌘L puts the keyboard in the field with its text selected; Esc puts back the address of the page shown.
localhost:5173, an IP address, or a host with a port opens overhttp://; any other bare host, such asexample.com, overhttps://.- A path such as
~/reports/index.htmlopens that file; a folder opens itsindex.html. - Anything that is not an address is searched on Google.
Back and Forward are the arrows left of the field, or a two-finger swipe on the trackpad. Reload, right of the field, is also ⌘R; while a page loads it becomes Stop, as does Esc. When a page cannot load, the tab says why.
Local files and reloading
A page opened from a file can load the files next to it — data files, scripts, modules — as it would from a web server. It can read the rest of its folder — the whole project when the file is inside it — but never a hidden file or folder such as .env or .git.
When one of the files the page loaded changes on disk, the page reloads by itself. A page from a dev server is left to the server's own reload.
Looking at the page
| Shortcut | Does |
|---|---|
| ⌘+ / ⌘- | zoom in / out |
| ⌘0 | actual size, also after a pinch |
| ⌘R | reload |
| ⌘L | the address field |
| ⌘⇧↩ | send your comments to the agent |
A pinch on the trackpad zooms too. The page follows the app's theme, light or dark, not the system's. The tab shows the site's icon, and hovering a link shows its address at the bottom-left of the page.
Pages work as they do in Safari: their alerts and questions appear as sheets on the window, a site that needs a name and password asks for them (remembered until you quit, never saved to disk), a page can go full screen (Esc comes back), and mail and phone links you click go to the apps macOS uses for them. A site asks before it gets the camera or the microphone.
All browser tabs share one set of cookies and site data, kept apart from Safari's. Sign in to your app once and every tab is signed in, after a restart too.
Right-click and choose Inspect Element for WebKit's Web Inspector.
While the page has the keyboard, the app's shortcuts — ⌘P, ⌘T, ⌘W, ⌘[ / ⌘] and the rest — still work. Copy, paste, select all and undo go to the page.
Comments for the agent
- Select text on the page. A small round button appears next to the selection.
- Click it and type your note in Comment for the agent….
- Press ↩ or click Comment. Esc closes the box without saving.
The text you commented on stays tinted. ⌥-click it to read, change or delete the note. A plain click on a commented link or button still works as usual.
Pointing at an element
To comment on a button, a picture or a block rather than on its text, click the Pick an element for the agent button right of Reload. The element under the pointer is outlined; click it, and the note box opens. The click does not reach the page, so a link is not followed and a button is not pressed. Hovering still works, so you can open a hover menu and point into it. Esc or the button again stops without picking.
The agent gets a selector that finds the element, its tag, its size on screen and its text, with your note.
Sending them
While there are comments, a button with their count appears in the toolbar. Click it, or press ⌘⇧↩. mxds writes them into one prompt — the page's address, then for each comment where it is on the page, the quoted text and your note — and types it into the terminal you were last in. That terminal comes to the front with the keyboard in it. The prompt is also copied to the clipboard.
As with Markdown, the prompt waits in the agent's input until you press ↩, unless Settings → Editor → Review comments → Press Enter after sending is on. The comments are cleared once the terminal has received them; with no terminal open they stay, and the prompt is only copied.
Comments survive reloads and a dev server's live updates: each one finds its text again. A comment whose text is gone stays in the list and is sent marked text not found on the current page. Comments made on one site are shown only on that site; moving between pages of the same app keeps them.
On macOS 14.0 and 14.1 comments work, but the commented text is not tinted.
What your agent can do
Through the mxds command and MCP, an agent can:
- open a page —
mxds browser open http://localhost:5173(an address needs itshttp://orhttps://here) ormxds browser open ./index.html. A tab already showing it comes to the front and reloads, so the agent can call it again after each change. - take a screenshot —
mxds browser shotsaves the visible part of a browser tab as a PNG and gives the agent its path. It never switches your tab, and works on a tab you are not looking at, as long as it has been shown once since mxds started.
An agent can open any address. Because the tabs share your sign-ins, it can also screenshot a page you are signed in to.