Browser and desktop
Agents in Cohort have two tools for what a terminal can’t do: cohort browser, a real browser of their own, and cohort computer, your screen, mouse and keyboard (on macOS). Cohort’s built-in skills tell them how and when to use each, so you only ask:
Open localhost:3000, sign up with a test account and check the welcome page shows the right name. Send me a screenshot.
The browser
Section titled “The browser”cohort browser drives Chrome, Chromium or Edge, whichever you have installed. It reads pages as a person sees them, JavaScript apps included: it opens a URL, lists the page’s buttons, links and fields, clicks, types, presses keys, waits for text to show and takes screenshots.
- One per thread. Each thread gets its own browser and profile, so agents never touch each other’s tabs. Cookies and logins stay for that thread’s next command and next turn.
- Hidden by default. It runs without a window. Ask the agent to start it with
--showto watch it work. - Logins. An agent never types a password you didn’t give it for this. When a page needs a login, it asks you to sign in yourself in a shown window; the login then stays in that browser’s profile. A named browser (
--session NAME) keeps one login across threads. - Asks first before anything that can’t be undone or that others see: buying, sending, posting, deleting.
Agents use it for what needs a browser, and curl for the rest. When it is done, the agent closes the browser; its profile and logins stay.
cohort browser open localhost:3000cohort browser snapshot # the page's elements, each with a ref: e3 textbox "Email"cohort browser type e3 "ada@example.com"cohort browser click e4cohort browser wait --text "Welcome"cohort browser screenshot # prints the PNG's pathcohort browser closeTo see a page on your phone instead, an agent can share the port.
The desktop (macOS)
Section titled “The desktop (macOS)”cohort computer takes screenshots of your screens and moves your real mouse and keyboard: clicks, drags, scrolling, typing, key combinations, bringing an app to the front. Agents use it last, for native apps and visual checks when no command line, script or browser can do the job.
While an agent has the desktop, Cohort’s status bar shows its thread’s title followed by “is using your desktop”. Click it to open that thread, or click Stop to stop its turn and take the desktop back. You are sharing the machine with it: anything you click meanwhile goes to the same screen.
One thread at a time. The first action takes the desktop for that thread. It’s freed when the turn ends, 2 minutes after the last action, or when the agent runs cohort computer release. Another thread that tries meanwhile is told who holds it and for how long, and waits.
Permissions. macOS asks once, for the app the command runs under (Cohort, or your terminal). Each is in System Settings → Privacy & Security:
| Setting | For |
|---|---|
| Screen & System Audio Recording | Screenshots (restart that app after turning it on) |
| Accessibility | Clicks, typing and keys |
| Automation (System Events) | Listing the apps with windows |
When one is missing, the command says which, and the agent tells you what to turn on and waits.
Agents ask before anything that can’t be undone: sending, deleting, buying, changing system settings, quitting an app with unsaved work.
Every cohort browser and cohort computer command is in the CLI reference.
