Skip to main content
modal-devin init writes an editable Modal application. Use the generator once, then maintain and deploy the generated file like other application code.

Worker and application

The worker connects the deployment to one outpost. The Modal App name, tags, and Secret name belong to your deployment and may be changed.

Workspace image

Add project tools and source before prepare_image(). New sessions start from this image; resumed sessions use their preserved filesystem when available.

Session entrypoint

Add Modal function retries only when you intentionally want failed invocations to make a fresh claim attempt. Customize the decorator using region controls. Pass supported Sandbox resource options such as CPU, memory, and region to run_session().

Scheduler entrypoint

Customize the schedule and its Modal placement policy. Keep its call structure and single-container limit unchanged.

Supported customization

You can change:
  • Application name, tags, and Modal Secret name.
  • Image build operations before prepare_image() and function resources, regions, retries, and schedule.
  • Supported Sandbox resource options in run_session().
  • Additional functions and resources in the same Modal application.

Required wiring

Keep these generated values in place: Keep the deployment scheduled while relying on long-lived resumability.