Skip to content

Direct Agent Runner

The Direct Agent Runner is a small program you run on your own machine. It connects out to Direct and runs agent workers there, in Docker, the same way the Direct cluster runs them. Work that Direct schedules can land on your machine when it meets the work’s requirements and has capacity.

Use a runner when agents need something only your machine has: more CPU or memory than the cluster gives you, a fast local disk, or access to a network you control.

  1. You install the runner. You, or a maintainer, create a single-use enrollment code under Settings → Runners → Add runner.
  2. You start the runner with that code. No browser or further approval is needed on the runner machine.
  3. You allow worker images locally by their exact repository and SHA-256 digest. An empty allow-list refuses all workers.
  4. Direct checks enrolled capabilities, who the runner runs for, availability, protocol and capacity before choosing where work runs. Cluster fallback is possible only when the cluster meets the same requirements.
  5. For admitted work, the runner starts a worker container in your local Docker and streams its console back to Direct.

Current Direct asks each connected runner to report its processor, memory and disk use every ten seconds. That is how Direct knows where there is room.

  • A machine running macOS or Linux, on x64 or arm64.
  • Docker (Docker Desktop or any engine), running. Workers run as containers.
  • Outbound HTTPS access to your Direct address (https://cratis.direct unless your organization runs its own).

The local page binds to loopback. The relay workers call back through also binds to Docker’s bridge on Linux so containers can reach it. Do not expose either port to other machines.

A runner is handed the credentials of every piece of work it runs. Treat the machine like any other place you keep your organization’s secrets.

  • Any active member can create an enrollment code. A runner enrolled with a member’s code runs work only for that member and is enrolled with the minimal capability set. Only a maintainer can enroll a runner for more people or with more capabilities. Create a code only for a machine you control and trust.
  • The local page requires authentication. Run direct-runner open as the daemon’s user and open the one-time address it prints within a minute. Do not share that address or the local authentication files.
  • An enrollment code works once. Direct stores only a hash of it, it stops working when it expires or is revoked, and the runner removes it from its settings after use. Only create a code for a machine you control, and treat it like a password until it is used.
  • Removing a runner revokes its authority for new work. Do not rely on removal to stop containers already running on the machine.