Skip to main content
Worker is the supported runtime interface for one Devin Outposts outpost.

Constructor

string
required
Durable name for this deployment. It must contain a non-whitespace character.
string
required
Devin Outposts outpost ID.
string
default:"https://api.beta.devinenterprise.com"
Devin API base URL. Credentials, query strings, and fragments are rejected.
WorkerSettings | None
default:"None"
Validated runtime policy. Defaults to WorkerSettings().

Worker.from_env()

Creates a worker whose runtime settings come from MODAL_DEVIN_* environment variables.

Properties

controller_image()

Returns the image used by the generated scheduler. Most applications should leave it unchanged.

base_image()

Returns the customizable image for new session workspaces. It includes the Devin CLI, common system tools, and /root/workspace.

prepare_image()

Finishes a customized workspace image. Call it once after every custom image operation, and keep the generated application wiring unchanged.

run_session()

Runs one accepted session from workspace startup through worker execution, resumability, and cleanup.
string
required
Devin session ID supplied by the scheduler.
modal.App
required
Deployed Modal application.
modal.Image
required
Prepared workspace image for a new session.
Additional supported keywords follow modal.Sandbox.create, including resources and region. Positional commands and the managed timeout, workdir, and readiness_probe options are rejected. The containing function must receive the configured Devin credential.

dispatch_pending_sessions()

Finds queued sessions for the configured outpost and starts Modal invocations. Pass the generated session function’s asynchronous spawn method:
The scheduler function must receive the configured Devin credential and retain the generated single-container limit.