Computers
Enable Computers in a self-hosted AgentConnect deployment, run Linux desktop containers with Docker Compose, configure STUN and TURN for viewer video, store screenshots, and run cloud computers on Kubernetes.
Computers let agents see and operate a graphical desktop. The Control Plane and relay already include Computers support in every deployment. This page covers the optional pieces you can enable around it.
| Piece | Needed for | Default |
|---|---|---|
| Console feature | Showing Computers in the console | Off |
| Desktop container | Running a Linux desktop on a server instead of a user machine | Not running |
| STUN and TURN | Live video when browser and desktop are on different networks | Off (viewer polls screenshots) |
| Screenshot storage | Saving agent screenshots for the session timeline | Off |
| Computer pool | On-demand cloud computers provisioned by the deployment | Off |
Turn on the console
The console hides all Computers UI until the computer-use feature is enabled: the Computers section under Infra, individual computer pages, the Computers card on an agent's Tools tab, and computer usage in Analytics.
Helm:
features:
computerUse: trueDocker Compose: Add computer-use to FEATURE_FLAGS in compose.env, then recreate web:
FEATURE_FLAGS=computer-usedocker compose --env-file compose.env up -d --force-recreate webFEATURE_FLAGS is a comma-separated list, so keep any entries you already have.
What a desktop must reach
A desktop only makes outbound connections. Whether it's a user's machine or a container, it needs:
| Connection | Purpose |
|---|---|
| HTTPS and WSS to the Control Plane's public URL | Registration, status, policy, and control turn coordination |
| WSS to each relay's daemon address | Agent tool calls, viewer signaling, and screenshots |
HTTPS to github.com on first start | Downloading the pinned, checksummed ffmpeg build for live video |
| UDP or TCP to the TURN server (when configured) | Viewer video when the browser can't reach the desktop directly |
These are the same addresses a daemon uses (AGENTCONNECT_PUBLIC_CP_URL and AGENTCONNECT_RELAY_DAEMON_URL in the Compose stack). A stack publishing them as localhost is reachable only from the host machine. Before adding desktops on other machines, publish these URLs under an address they can reach (see Network and public URLs).
Run a desktop container
The computer image provides a Linux desktop with Chromium, LibreOffice, and common language toolchains, running the same desktop daemon as a user's machine. It needs Docker on amd64 or arm64, about 2 GB of disk space, and 1 to 3 GB of memory.
The quickest way to start is the docker run command on the Docker tab of Add computer (see Add a computer). Docker Compose keeps settings in a file and lets you upgrade with one command:
mkdir agentconnect-computer && cd agentconnect-computer
base=https://raw.githubusercontent.com/agentconnect-md/agentconnect/main/packages/computer/docker
curl -fsSLO "$base/compose.yaml"
curl -fsSL "$base/compose.env.example" -o .envCreate a token with Add computer in the console, then set the two required values in .env:
AGENTCONNECT_CP_URL=https://cp.example.com
AGENTCONNECT_REGISTER_TOKEN=<one-time token>docker compose up -d
docker compose ps # STATUS turns (healthy) once the daemon passes its own checks| Setting | Meaning |
|---|---|
AGENTCONNECT_CP_URL | Control Plane URL, copied from the console |
AGENTCONNECT_REGISTER_TOKEN | One-time registration token (consumed on first start) |
AGENTCONNECT_REGISTER_TOKEN_FILE | File containing the token instead, such as a Docker secret |
AGENTCONNECT_COMPUTER_NAME | Computer name when none was set in the console (defaults to the hostname) |
AGENTCONNECT_VERSION | Image tag; pin this to the release your Control Plane runs |
AGENTCONNECT_COMPUTER_RESOLUTION | Screen resolution (1280x800x24 by default), matching agent screenshots 1:1 |
AGENTCONNECT_COMPUTER_BROWSER | Browser kept open and maximized (chromium by default, or none) |
RTC_ADDRESS | Public IP browsers reach this server on for direct viewer video |
AGENTCONNECT_COMPUTER_RTC_PORTS | Published UDP port range for direct video (7700-7709 by default) |
The volume stores the computer's key, browser profile, and files:
- Upgrade: Update
AGENTCONNECT_VERSION, then rundocker compose pull && docker compose up -d. - Re-register: After revoking the computer, put a new token in
.envand rundocker compose up -d. - Remove: Delete the computer in the console, then run
docker compose down -v. - Multiple desktops on one server: Give each container its own directory, registration token, and UDP port range.
Because docker inspect exposes container environment variables, prefer AGENTCONNECT_REGISTER_TOKEN_FILE if that's a concern. Once used, the token can't be reused.
The container is the only isolation boundary around Chromium, which runs without its internal sandbox. Don't mount host directories or credentials into the container unless you want agents to access them.
The repository's desktop container guide covers secret files, host networking, and evaluating on the same host as the Compose stack.
Viewer video
Watching a computer works without exposing any ports: signaling and screenshots travel over the desktop's outbound link through the relay. Without further configuration, the viewer falls back to Screenshots at a few frames per second. Live video requires a media path between browser and desktop:
| Option | What it provides | Compose overlay | Helm values |
|---|---|---|---|
| Published UDP range | Direct video from a desktop container with a public address | Container's own .env | — |
| STUN on the relay | Peer-to-peer video across NATs (the relay only helps both ends discover each other) | compose.stun.yaml | relay.stun |
| TURN on the relay | Relayed video when direct connections fail (symmetric NATs, blocked UDP) | compose.relay-turn.yaml | relay.turn |
| External TURN server | Relayed video via your own coturn or Cloudflare Realtime TURN (takes precedence) | compose.turn.yaml | computerViewer.turn |
STUN on the relay: Set the host address browsers and desktops reach, include the overlay, and open the UDP port:
AGENTCONNECT_STUN_HOST=203.0.113.10
# AGENTCONNECT_STUN_PORT=3479docker compose --env-file compose.env -f compose.yaml -f compose.stun.yaml up -dPeer-to-peer connections expose the desktop's public IP address to viewers' browsers, so each computer's Peer-to-peer viewing policy controls whether it's allowed.
TURN on the relay: Open the port for both UDP and TCP. No shared secret or extra port range is needed:
AGENTCONNECT_RELAY_TURN_HOST=203.0.113.10
# AGENTCONNECT_RELAY_TURN_PORT=3480docker compose --env-file compose.env -f compose.yaml -f compose.relay-turn.yaml up -dThe Control Plane issues short-lived credentials per viewer and per desktop, and the relay forwards video only between its own allocations. For networks that allow outbound traffic only on port 443, the relay can also serve TURN over TLS.
External TURN server: compose.turn.yaml adds coturn and points the Control Plane at it:
AGENTCONNECT_TURN_SECRET=<openssl rand -hex 32>
AGENTCONNECT_TURN_EXTERNAL_IP=203.0.113.10Open UDP and TCP 3478 plus UDP 49160-49199 on that host, and don't run another UDP service on that address. For Cloudflare Realtime TURN, set COMPUTER_TURN_CLOUDFLARE_KEY_ID and COMPUTER_TURN_CLOUDFLARE_API_TOKEN instead without using the overlay.
In the Helm chart, relay.stun and relay.turn each create one Service per relay pod and require a public host. See the chart README for all available values.
Store screenshots
By default, screenshots taken by agents are sent to the model and aren't stored. With storage enabled, screenshots appear in the session timeline and are retained according to each computer's Keep screenshots policy. Image bytes upload directly from the desktop to the bucket via signed URLs. The Control Plane only signs requests and stores metadata.
Helm (with a Source Cache bucket configured):
computerScreenshots:
enabled: true
retentionDays: 30 # for a computer whose policy sets none
maxRetentionDays: 365 # the most a computer's policy may ask forDocker Compose: Set AC_COMPUTER_SCREENSHOTS in compose.env to a single-line JSON object with the same bucket fields as AC_FILE_TRANSFER, plus an optional retention object containing defaultDays and maxDays.
The Control Plane deletes expired screenshots automatically, so the bucket doesn't need lifecycle rules for them.
Cloud computers on Kubernetes
With the chart's daemon pool enabled, the deployment can also provision desktops on demand. They appear in the console as Cloud computers: members can add shared desktops, and agents can get a fresh desktop per session or a dedicated persistent one. See Cloud computers.
computerPool:
enabled: trueThis requires daemonPool.enabled and a public Control Plane URL (apiHost or publicUrl) so desktop pods can register.
| Value | Default | Meaning |
|---|---|---|
computerPool.warmReplicas | 1 | Prewarmed desktops so a session gets one in seconds (0 starts cold) |
computerPool.home.size | 5Gi | Desktop home volume size, preserved while asleep |
computerPool.resources | 1 Gi to 3 Gi | Memory request and limit for each desktop pod |
computerPool.ephemeralIdleSeconds | 600 | Idle seconds before deleting a per-session desktop |
computerPool.sleepIdleSeconds | 1800 | Idle seconds before putting a per-agent or shared desktop to sleep |
computerPlan.quotas | built-in | Per-organization limits on running and total desktops, hours, and storage |
Cloud computer pods don't expose a UDP port reachable by browsers, so live viewing requires TURN. Enable relay.turn or computerViewer.turn for live video; otherwise the viewer falls back to screenshots.
Without custom quotas, each organization can run up to 3 cloud computers at once, keep 10 total, and use 300 desktop hours per month. Usage appears under Analytics.
How is this guide?