computer
v0.1.2Drive a full desktop on the iii bus. Start a session on the local machine, a sandboxed desktop, or a remote one, screenshot it, click and type by coordinate, and stream the live screen.
- macOS: arm64 · x64
- Linux: arm64 · armv7 · x64
- Windows: arm64 · x64 · x86
exact versions are immutable; binary and bundle artifacts are digest-pinned.
skill doc
computer
The computer worker turns a live desktop into iii functions. Start a session
with neither image nor endpoint to drive the local machine this worker runs
on (unless the operator configured a default image or endpoint, which is
resolved first), pass an image to boot a sandboxed desktop, or an endpoint
to drive a remote one. Take a
screenshot to see the screen, then act on it by pixel coordinate: the screenshot
is the source of truth for where things are, and computer::act clicks and
types at those coordinates. The session stays alive, so you can act, screenshot
the result, and act again.
Sessions usually survive a worker restart (it reconnects them best-effort, so an id can still go away — start a new session if one does) and cost one driver connection each; the configured session cap is small. Stop sessions when a task is done. Screenshots are large; take one when you need to see the screen, not after every action.
When to Use
- Operating a desktop GUI application that is not a web page (an installer, a native app, a settings panel).
- End-to-end tasks that span the whole screen: move a window, drag between apps, use a system dialog.
- Watching the effect of a change on screen: run the command with the
shellworker, thencomputer::screenshotto see the result.
Boundaries
- Web-only tasks belong to the
browser worker (a real
Chromium tab with an accessibility outline and page console) or
web::fetchfor a one-shot page. Do not start a desktop session just to open a URL. - Shell and files are not this worker's job;
computeronly sees the screen and drives the cursor. Reach forshell::exec/shell::fs::*when the session is native (the desktop is that host),sandbox::exec/sandbox::fsfor a sandboxed desktop, and the guest's own executor for a remote one.shellalways runs on the worker's host, not inside a guest. - With neither argument it drives whatever the configuration defaults to, and
the local machine when nothing is configured; an
imageboots a sandboxed desktop through the iii-sandbox worker; anendpointconnects to a desktop somebody else booted. computer::screencast::*andcomputer::frameare console-UI plumbing, not agent surface.- Coordinates are integer pixels, top-left origin, in the space of the most recent screenshot. Re-screenshot after the screen changes before acting.
Functions
computer::sessions::start— connect a desktop session; returns the session_id every session-scoped function needs (all butcomputer::sessions::listandcomputer::displays), plus the screen size.computer::sessions::list— live sessions with endpoint, OS, and screen.computer::sessions::stop— stop a session; idempotent.computer::screenshot— the desktop as a viewable image; how you see the screen before acting.computer::observe— screenshot plus, on macOS guests, the accessibility tree (include_a11y: true).computer::act— click, right_click, double_click, move, drag and scroll are addressed by pixel coordinates; type, press and hotkey carry their owntextorkeysand land wherever the desktop's focus is.
Keeping context small
Desktop screenshots are large and land in the transcript, so a few careless
captures fill the context window. Screenshot when you need to see the screen,
not reflexively after each action; a computer::act returns a short confirming
detail on its own. Reuse one session across steps and stop it when done.
Reactive triggers
Bind a computer::* trigger when another function should react to session
activity instead of polling. The types: computer::session-started (payload
carries endpoint, os, screen) and computer::session-stopped (payload
carries reason). Both accept an optional session_id equality filter.
How to bind
- Register a handler:
registerFunction('mywatcher::on-desktop', handler). - Register the trigger:
iii.registerTrigger({
type: 'computer::session-stopped',
function_id: 'mywatcher::on-desktop',
config: { session_id: 'c1' },
})Omit session_id to receive events for all sessions. For event payload shapes,
call get function info on the trigger type.