Skip to content
Edith

Agent docs

Coding agentsBeta

Run Crew agents on remote machines over SSH

Crew runs agents on any macOS or Linux machine you added in Machines, as easily as on this Mac. Edith copies the agents engine to the machine the first time you start an agent there, and the engine keeps running when your SSH connection drops.

Before you start

  • Add the machine in the Machines extension. Crew uses the same list, so a machine you can open there is one Crew can use. See Machines.
  • Install the coding agent CLI you want on that machine and sign in to it there. Edith does not copy agents, only the engine.
  • A machine that is disabled in Machines is refused with "is disabled. Enable it in Machines to run agents there."

Start an agent on a machine

  1. Press New agent (⌘N) on the Crew page and pick the agent.
  2. In the Machine step, pick the machine. This Mac and every machine you added are listed. Machines that cannot run agents are dimmed and say Agents cannot run here or Cannot be reached right now. Press Check machines again after fixing one.
  3. Pick a space, as on this Mac.

From the terminal

Terminal
ed crew open /srv/app --machine boxed crew thread launch . --machine auto -- run the slow integration suite

On a machine, pass an absolute folder. --machine takes a machine name, SSH alias or a unique prefix, and local means this Mac. --machine auto starts a thread on the machine with the most free CPU and memory among this Mac and the machines that have the project. ed machines balance sets how often each machine is picked.

What happens the first time

  1. Edith asks the machine which platform it runs.
  2. It copies the matching engine to ~/.edith/agents/bin/edith-agents on that machine.
  3. It checks the copy's SHA-256 digest and refuses one that does not match.
  4. It starts the engine detached from the SSH session.

A machine without the engine yet is not an error. It simply has no agents until you start one.

See and reach remote agents

Remote agents appear on the same board as local ones, with the machine named on each card. Click a card to open the agent, exactly as on this Mac. Filter (⇧⌘F) narrows the list to one machine.

To reach a remote agent from your own terminal, open Show details (⌥⌘B) and press Copy SSH, or right-click the agent and choose Copy open command. The line looks like this:

Terminal
ssh -tt box -- '"$HOME/.edith/agents/bin/edith-agents" --session default agent attach w3:p1N --takeover'

You can also SSH in yourself and run ~/.edith/agents/bin/edith-agents to pick an agent from a list. ctrl+] detaches. From the terminal, ed crew ls --machine box lists a machine's agents and ed crew attach w3:p1N --machine box attaches to one.

Terminals you open in a remote agent's tab (⌃` or ⌘J) open on that machine, in the agent's folder.

Keep the engine running

There is no launchd on other machines. The engine starts detached the first time an agent starts there and keeps running after you disconnect. To start it at login on a Linux machine, run there:

Terminal
edith-agents service install --linger

--linger asks logind to keep it running while you are logged out.

Update engines

Engines are updated from the terminal:

Terminal
ed crew updateed crew update --machine box --restart

This copies the current engine to every enabled machine that has an older one. An engine that can hand its agents over to the new build does so in place. Pass --restart to restart one that cannot; its agents resume when it starts.

Set the environment agents see

From the terminal:

Terminal
ed crew background env ls --machine boxed crew background env set ANTHROPIC_BASE_URL=https://proxy.example.test --machine boxed crew background env unset ANTHROPIC_BASE_URL --machine box

The engine reads KEY=VALUE lines from service.env in its home and passes them to every shell and agent it starts. New shells and agents see a change at once.

Run any command against a machine

Most ed crew groups take --machine: threads, checkpoints, worktrees, schedules, workflows, providers and integrations. For anything else, pass an engine command through:

Terminal
ed crew engine --machine box lsed crew engine --machine box worktree list --cwd /srv/app
Terminal
ed crew servers --machine boxed machines forwards add

ed crew servers shows the ports processes in agent panes listen on. See ed machines to forward one to this Mac.

Use this Mac only as a remote

If you never want agents to run on this Mac, turn the local environment off. See Local environment.

Where to go next