Floating panes for agents
An agent can show you something in a floating window instead of a docked pane, say where it goes and how big it is, and move, resize, dock or float a pane it opened. This page is for the person who reads what an agent did and for the agent that does it. For the window itself (tear-off, dock, the tack), see Floating panes.
Open a pane as a floating window
Section titled “Open a pane as a floating window”Pane open, Widget open and Browser open take floating: true. With it they also take a size and a place:
| Argument | Meaning |
|---|---|
width, height | CSS pixels (900) or a share of the work area ("60%") |
spot | A named place in the work area of the monitor the app window is on: center, right, left, top, bottom, top-right, top-left, bottom-right, bottom-left |
x, y | The window’s left and top edge in CSS pixels from the work area’s top-left; give both. They win over spot |
An agent does not know your screen, so it names a spot rather than a coordinate. A value outside the work area is pulled in, and the answer says so (clamped) and says where the window went (placed). A floating browser with no size is 1040 x 760 (at most 90% of the work area), flush right and centred vertically, so the left of your screen stays visible. Several floating panes from one agent step over each other instead of stacking exactly.
The window shows without taking your focus or caret, and a move or resize never raises it. On Windows that is exact. On Linux (X11 or XWayland) the window manager can give the new window the foreground; for a few seconds after it opens, AgentMux asks the window manager to give it back to the window you were using, which can flicker for a frame. An agent may have at most 4 floating panes open, and opening or placing them shares one limit of ten a minute with its other pane opens.
Place, resize, move, dock and float
Section titled “Place, resize, move, dock and float”On a pane it opened itself (never yours, never another agent’s), an agent can:
Pane action | What it does |
|---|---|
resize | New width and/or height; the position stays |
move | New spot, or x and y; the size stays |
place | Any of them in one call |
dock | Put a floating pane back in the agent’s own tab, beside its pane on the side split names, or where it came from. The pane keeps its id |
float | Give a docked pane a window of its own, with the same size and place arguments an open takes |
A browser is made again in its new window when it floats, so its page reloads at its address and loses form input and page state. An agent that wants a floating browser opens it with floating: true instead of floating it later.
When an agent is stopped, the floating panes it opened dock into its own tab. Nothing is closed.
Browsers
Section titled “Browsers”- Agent browsers float (Settings, Agents, Browser windows; off by default) makes every browser an agent opens float when the agent says nothing about where it goes. An agent that passes
floating: falseor asplitkeeps its choice, and past 4 floating panes the next browser opens docked. - Handing a page to you.
Browserhandoffleaves the pane where it is. Withfloating: truethe agent floats it first, so the step you are asked to do (a sign-in, a CAPTCHA) is in a window in front of you. The page reloads when it floats, so an agent that wants this asks before it fills anything in. The answer says when the pane could not float (it is not the agent’s, it has 4 floating panes, it is a popup window, it is already waiting on you).
Background browser sessions
Section titled “Background browser sessions”Browser open with visible: false opens a background session: a browser no screen shows, which the agent drives like any other browser pane. It works on Windows and macOS; elsewhere the open is refused, and the answer says to open a floating pane instead. An agent may hold at most 2 background sessions, and there are at most 6 on the machine. Opening one shares the ten-a-minute limit of the agent’s other pane opens.
Your agent pane tells you about them: a strip headed “Browsing in the background, with no window on your screen:” has one row per session, with the site and the page’s title, and a Show button that brings the page into view on the right of your screen. A shown session is a floating pane like any other, so it counts toward the agent’s 4 floating panes.
The agent has three more Browser actions for them:
Browser action | What it does |
|---|---|
list | The browser panes the agent opened: each pane’s id, address and title, whether it floats and whether it is a background session, and how many of its 2 sessions are in use |
show | Make one of its background sessions a floating pane you see, on the right |
hide | Put a floating browser pane it opened back in the background. It counts toward the limits again |
A hand-off, and any other question that needs you (an approval, a sign-in, a value it asks you to type), shows the session first, so the question is where you can see it. Each open, show and hide, whether the agent or you made it, is recorded in the Audit with the agent, the pane and the site’s host.
What an agent can read back
Section titled “What an agent can read back”Pane layout lists every window, tab and pane. For a pane an agent opened as a floating window it gives floating: true, rect (x, y, width, height in CSS pixels from the work area’s top-left, and the display’s scale) and always_on_top (your tack). rect is null, with the reason, when the window is hidden. For a docked pane it gives share (the fraction of its tab, 0 to 1, as the layout stores it) and, for a pane in the tab its window is showing, size (width and height in CSS pixels as drawn, including the pane header). Any other docked pane has size: null and says why: its tab is not showing, or the window does not draw it or did not answer in 2 seconds.
Checking a layout at several sizes
Section titled “Checking a layout at several sizes”resize sets an exact size without a mouse, so “the layout holds at 900 x 600” is two calls. An agent working on a floating pane in its own build of AgentMux can step through a list of sizes: Pane resize to the size, Pane layout to read the rect that came out, UI screenshot of the pane, and name each file by its size.
This covers the layout at a size. It does not cover the drag itself: grabbing an edge or a corner, snapping, the dock hover and the cursor shapes still need a real mouse. A docked pane’s size is a result of the layout, not something an agent sets; it reads it from size.
Containers
Section titled “Containers”Container agents get all of this: the calls go from the agent to AgentMux to the window, and no program runs on your machine because of them.