AgentConnect
Optional services

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.

PieceNeeded forDefault
Console featureShowing Computers in the consoleOff
Desktop containerRunning a Linux desktop on a server instead of a user machineNot running
STUN and TURNLive video when browser and desktop are on different networksOff (viewer polls screenshots)
Screenshot storageSaving agent screenshots for the session timelineOff
Computer poolOn-demand cloud computers provisioned by the deploymentOff

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: true

Docker Compose: Add computer-use to FEATURE_FLAGS in compose.env, then recreate web:

FEATURE_FLAGS=computer-use
docker compose --env-file compose.env up -d --force-recreate web

FEATURE_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:

ConnectionPurpose
HTTPS and WSS to the Control Plane's public URLRegistration, status, policy, and control turn coordination
WSS to each relay's daemon addressAgent tool calls, viewer signaling, and screenshots
HTTPS to github.com on first startDownloading 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 .env

Create 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
SettingMeaning
AGENTCONNECT_CP_URLControl Plane URL, copied from the console
AGENTCONNECT_REGISTER_TOKENOne-time registration token (consumed on first start)
AGENTCONNECT_REGISTER_TOKEN_FILEFile containing the token instead, such as a Docker secret
AGENTCONNECT_COMPUTER_NAMEComputer name when none was set in the console (defaults to the hostname)
AGENTCONNECT_VERSIONImage tag; pin this to the release your Control Plane runs
AGENTCONNECT_COMPUTER_RESOLUTIONScreen resolution (1280x800x24 by default), matching agent screenshots 1:1
AGENTCONNECT_COMPUTER_BROWSERBrowser kept open and maximized (chromium by default, or none)
RTC_ADDRESSPublic IP browsers reach this server on for direct viewer video
AGENTCONNECT_COMPUTER_RTC_PORTSPublished 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 run docker compose pull && docker compose up -d.
  • Re-register: After revoking the computer, put a new token in .env and run docker 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:

OptionWhat it providesCompose overlayHelm values
Published UDP rangeDirect video from a desktop container with a public addressContainer's own .env—
STUN on the relayPeer-to-peer video across NATs (the relay only helps both ends discover each other)compose.stun.yamlrelay.stun
TURN on the relayRelayed video when direct connections fail (symmetric NATs, blocked UDP)compose.relay-turn.yamlrelay.turn
External TURN serverRelayed video via your own coturn or Cloudflare Realtime TURN (takes precedence)compose.turn.yamlcomputerViewer.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=3479
docker compose --env-file compose.env -f compose.yaml -f compose.stun.yaml up -d

Peer-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=3480
docker compose --env-file compose.env -f compose.yaml -f compose.relay-turn.yaml up -d

The 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.10

Open 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 for

Docker 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: true

This requires daemonPool.enabled and a public Control Plane URL (apiHost or publicUrl) so desktop pods can register.

ValueDefaultMeaning
computerPool.warmReplicas1Prewarmed desktops so a session gets one in seconds (0 starts cold)
computerPool.home.size5GiDesktop home volume size, preserved while asleep
computerPool.resources1 Gi to 3 GiMemory request and limit for each desktop pod
computerPool.ephemeralIdleSeconds600Idle seconds before deleting a per-session desktop
computerPool.sleepIdleSeconds1800Idle seconds before putting a per-agent or shared desktop to sleep
computerPlan.quotasbuilt-inPer-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?

On this page

How is this guide?