Concepts
Managed environments
An environment is a durable execution place managed by Mobius.
Sprites.dev is the first hosted provider, and worker-provided
environments let a connected mobius worker attach a local or
customer-hosted workspace.
Use environments when an automation or agent needs:
- A filesystem.
- Repository checkout and command execution.
- Generated files across multiple steps.
- Worker-backed model calls.
- A long-running workspace bound to an agent or automation.
Environments vs. artifacts
An environment is scratch space for doing work. An artifact is the durable output you want to publish, inspect, download, or hand to another step.
Do not rely on workspace files as the only copy of a deliverable. Write important outputs as artifacts.
Providers and lifetimes
Hosted environments are provisioned through the environment API:
POST /v1/projects/{project}/environments
POST /v1/projects/{project}/environments/acquire
POST /v1/projects/{project}/environments/leases/{lease_id}/releaseWorker-provided environments are attached instead of provisioned:
POST /v1/projects/{project}/environments/attachThe mobius worker CLI uses that attach flow when it advertises a
workspace it hosts itself.
Binding and ownership
Environment records carry scope, owner, purpose, provider status, lease metadata, and optional binding fields. Common bindings include:
- One environment for a specific agent.
- One environment for an automation or run family.
- Manual environments used by an operator.
- Worker-provided environments tied to a connected worker process.
Leases prevent two active workers from mutating the same environment at the same time when the environment policy requires exclusivity.
Starting workers and logs
For hosted environments, Mobius can start or reuse a worker inside the environment:
POST /v1/projects/{project}/environments/{environment_id}/workers/start
GET /v1/projects/{project}/environments/{environment_id}/worker/logsThe logs endpoint is diagnostic. Treat command output as untrusted and avoid printing secrets in environment commands.
Automation specs
Automation steps can route action or agent work to an environment by setting the execution location or model route. Repository targets can also prepare source checkouts before the authored steps run.
Use environment routing when work needs filesystem state. Use normal worker actions when the action can run statelessly.
Related
- Artifacts are the durable output plane.
- Workers attach worker-provided environments and execute jobs.
- Agents can use environments for coding, file generation, and worker-backed model routes.
- Interactive reference lists provider, lease, worker, and log endpoints.