Agents on other machines
You can attach another machine to a canvas on your computer. Then agents on your computer and agents on that machine sit on one canvas, wired together. This page shows how to attach a machine, run agents there, and keep their work in sync with git.
Figure: One canvas on two machines. The app carries tasks and results between them, and syncs git.
A canvas with an attached machine is a mixed canvas. Your computer is its home machine. Each
attached machine has a short name on the canvas, such as devbox or wsl-ubuntu.
Note
Attaching a machine needs Pro (or Team or Enterprise). See Plans, the free trial and pricing.
What you need
- A canvas on your computer. A remote project can’t have machines attached.
- A machine you reach over SSH, or a WSL distribution, that runs Linux. It needs the same things as a remote project’s host (see Remote projects).
- The project on that machine: a clone of the same git repository, if you want git sync.
- The agents you want to run there, installed on that machine.
Attach a machine
- Open the canvas.
- In the sidebar, click Attach a machine. A field opens.
- Type the machine and its project folder, in one of these forms:
devbox:/srv/apporme@devbox:/srv/app: a folder on an SSH host.me@devbox:2222:/srv/app: the same, when SSH listens on another port.wsl:Ubuntu:/home/me/app: a folder in a WSL distribution.
- Press
Enter.
The machine joins the canvas. Cuewire connects to it as it does for a remote project: it installs its server there if needed, and asks for a password or a new host key in a dialog.
The machine’s name on the canvas comes from the host: devbox, or wsl-ubuntu for
wsl:Ubuntu. If two machines would get the same name, the second gets -2.
Run an agent on the machine
New agents run on your computer. To run one on the attached machine:
- Right-click the agent and choose Configure….
- Under Run on, choose the machine, for example devbox. This PC is your computer.
- Click Save and restart.
The agent’s title now says where it runs, for example Builder · on devbox. Its terminal starts in the project folder on that machine.
Figure: Builder runs on devbox. The sidebar shows the machine, its relay switch, Detach and its git line.
Note
An agent that moves to another machine starts a fresh conversation there.
Agents talk across machines
Agents on different machines work together as agents on one machine do. They use the same
cuewire commands, through the wires on the canvas (see
Agents working together):
cuewire askandcuewire sendreach an agent on another machine. The task the agent receives says where it came from, for example from Lead (on the home machine).cuewire resultsends the answer back the same way.cuewire checkreads the screen of an agent on another machine.cuewire listsays where each agent and note is: — on devbox, — on the home machine. It adds waiting for Cuewire while tasks can’t reach that machine yet.cuewire tasksshows a task for another machine asforwarded:queuedwhile it waits to go, thenforwardedonce that machine has it.
The Cuewire app carries tasks between machines for the canvases open in it. Cuewire’s background service on your computer carries them for the other canvases, and for all of them once you close Cuewire (see While Cuewire is closed). Agents on the same machine keep working together as usual.
Notes
Notes live on the home machine. Agents on other machines still read and change them with
cuewire note. Cuewire carries the request to your computer and the answer back. This takes a
moment. If the home machine can’t be reached, the command says so.
Git sync
When agents on two machines work on one project, each needs to see the other’s commits. Cuewire syncs git for you. It never changes your branches. It adds read-only copies of the other machine’s branches:
| Where | What you see |
|---|---|
| On your computer | cuewire-devbox/<branch>: each branch on devbox |
| On devbox | cuewire-local/<branch>: the branch checked out on your computer |
For example, on your computer git log cuewire-devbox/feature-x shows what an agent on devbox
committed on feature-x. To use that work, merge or check it out as you would any branch.
Cuewire syncs:
- Before a task or a result crosses machines. The receiving agent’s text ends with a line such
as
Sender is on devbox, branch feature-x at 3653b8d; here it is cuewire-devbox/feature-x (git log cuewire-devbox/feature-x).Cuewire waits up to 30 seconds for the sync. If it takes longer or fails, the task still goes. - When an agent runs
cuewire sync, orcuewire sync devboxfor one machine. It prints what each machine has, and where. - When you click Sync git with devbox in the sidebar.
Only the branch checked out on your computer goes to the other machine. Your other branches stay on your computer.
The sidebar has a line for each machine, for example Git with devbox: synced; devbox is on feature-x at 3653b8d….
Note
Git sync needs the same repository on both machines: a clone, with the same first commit. If the machine’s folder is another repository, or not a repository, the sidebar says Git sync with devbox is off. Agents still work together.
While Cuewire is closed
Cuewire’s background service on your computer carries tasks, results, notes and cuewire check
between machines for every canvas that isn’t open in Cuewire, and for all of them when Cuewire is
closed. When you open a canvas, Cuewire takes it back. A canvas you leave stays with Cuewire while
its machines stay connected, then goes back to the service. The service works from what Cuewire
last told it about the canvas, and keeps no passwords.
- Git isn’t synced then. A task or result the service carries ends with
Git was not synced (Cuewire relayed this while the canvas was closed); run `cuewire sync` once it is open in Cuewire.Open the canvas and runcuewire sync, or click Sync git with devbox, to catch up. - Host keys and passwords. The service never accepts a host key. A machine whose host key
Cuewire hasn’t seen waits until Cuewire connects to it once, which it does when you open that
canvas. While Cuewire is closed, the service signs in only with an SSH key or an SSH agent, so a
machine that signs in only with a password waits until you open its canvas. While Cuewire is
open, the service may ask for that password in Cuewire’s dialog, which says it is the service:
This PC’s Cuewire service connecting to devbox to relay tasks. It can ask even for a canvas
you haven’t opened. The answer isn’t kept. Agents see why a machine waits, for example
waiting for sign-in to devbox, on tasks that wait for it. - A switch per machine. The machine’s sidebar line has Relay while Cuewire is closed: On. Click it to turn it Off: tasks for that machine then wait until you open that canvas. It is on by default, and doesn’t affect a canvas open in Cuewire.
When a machine is not available
- Reconnecting. If the connection to a machine drops, the sidebar says so, for example devbox: Reconnecting to devbox · attempt 3, with why the last try failed. Click Reconnect now under it to try at once. Agents there keep running. Tasks for them wait.
- Paused. If your plan no longer includes attaching machines, or a policy doesn’t allow the machine, its agents wait. The sidebar says why, for example Agents on other machines need Pro; upgrade to run agents on This PC and devbox together. Agents already running on devbox keep running there; their tasks wait. This applies at once when your plan or policy changes.
- Older Cuewire. If a machine runs an older Cuewire, the sidebar says Agents on devbox can’t message agents on other machines yet: update Cuewire there. If its Cuewire carries tasks only while the app is open, the sidebar says Update Cuewire on devbox to relay while Cuewire is closed.
- Another computer drives it. If another computer drives the machine, the sidebar says so. Tasks to and from agents there go through that computer.
Detach a machine
- In the sidebar, under the machine’s line, click Detach devbox.
- Cuewire asks Detach devbox? and says how many terminals running there it stops first.
- Click Detach (Enter). Or click Keep (Esc).
The machine leaves the canvas. Its terminals there stop, and its agents come back to your computer as drafts: they don’t start until you start them. If Cuewire can’t reach the machine, agents running there keep running; the dialog says so. A task that was waiting for an agent on that machine fails at once and says why, so you can send it again.
Limits
- Git isn’t synced for a canvas the service carries. Tasks, notes and checks still cross; run
cuewire synconce the canvas is open in Cuewire. - While Cuewire is closed, a machine that signs in only with a password waits for sign-in.
- On Linux and macOS, if you start Cuewire from a terminal, password prompts need OpenSSH 8.4 or later. With an older ssh, use a key.
- Cancelling a task stops it only on your side once the other machine has it. The agent there may still finish it.
- Layers are off on a mixed canvas: the canvas shows no layer chip.
cuewire ask --rawcan’t type into an agent on another machine. Send a task instead.
What’s next
- Remote projects: connecting to SSH hosts and WSL.
- Agents working together: wires, tasks and notes.
- Plans, the free trial and pricing: what Pro includes.