Running on Kubernetes? devin-outpost-k8s
is an open-source operator that implements this loop for you: it watches the
queue, claims pending sessions, and runs each one as a worker pod on any
certified cluster (GKE, EKS, …). Install it with its Helm chart instead of
building your own orchestrator.
The core flow
1. Register an outpost
An outpost is a named queue of sessions served by many workers on your infrastructure (for example,rhel, gpu-h200, or my-outpost). Create one with devin worker outpost create:
In the fleet API, outposts are represented as
outposts resources, scoped to
your account (shared across all of its organizations). See the
outposts endpoints.2. Watch the fleet API for waiting sessions
Your orchestrator lists pending sessions for the outposts it serves:metadata.session_id and tolerate duplicates. See List queued sessions and Watch for changes for query parameters, response shapes, and full pagination semantics.
3. Claim before provisioning
Before starting a machine for a session, atomically claim it so no other worker picks it up. Pass anacceptor_id — a self-reported identity for your worker:
409. Claiming promises that a worker will be ready within the server-assigned claim deadline (status.claim_deadline); expired claims return to the queue automatically. If provisioning fails, release the claim so the session returns to the queue immediately.
4. Spawn a machine and run the worker
For each claimed session, provision a VM or container from your image. Inside it, run the worker from the directory where the session’s repositories are already checked out:--acceptor-id you used for the API claim, and provide the token via --token or DEVIN_OUTPOSTS_TOKEN (see the full flag list). The worker connects out to Devin’s cloud, marks the session ready, and begins executing tool calls.
5. Terminate the machine when the worker exits
Whendevin worker start exits, the session is over (or has been suspended). Terminate the VM or container. If your outpost is resumable, snapshot the machine before terminating so you can restore it if the session resumes.
Your orchestrator can track its claimed sessions and their states:
status.session_status of pending, running, suspended, or terminated.
Centralization-free scheduling
Planning to run more than ~16 coordinators (workers or orchestrators
watching and claiming from an outpost)? Contact your account team first — larger
fleets amplify claim contention and queue read load, and we want to make
sure the outpost is provisioned for it.
- Claims are the only coordination primitive. Every worker independently watches the queue and races to claim pending sessions. The claim is an atomic compare-and-swap on the server: exactly one worker wins, and every loser gets a
409and simply moves on to the next pending session. Losing a claim race is normal operation, not an error. - Each worker has its own identity. The
acceptor_idscopes a worker’s claims, renewals, and restart recovery to that worker alone.devin worker startgenerates and persists one automatically per machine, so a fleet needs no identity configuration. Never share an acceptor ID (or a copied worker data directory) across machines — colliding workers will steal each other’s claims. - Failures self-heal. If a worker dies after claiming, its claim expires at the claim deadline and the session returns to the queue for another worker to pick up. No fleet-level health tracking is required.
Building a custom orchestrator
Everythingdevin worker start does is available directly through the fleet API, so you can replace the CLI entirely: fetch the devin-remote binary from Devin’s static distribution and launch it yourself with the documented environment. See Remote binary distribution and the spawn contract in the reference.
