Providers and runtime configuration
Configure host-local runtimes for Local Envd and Docker, manage shared daemon pools, and separate runtime cleanup from target destruction.
Configure a Provider in three parts: a recipe describes the target, account settings and credentials reach the backend, and a runtime holds shared clients. Start with Choose a backend, then follow the matching setup below. Use Provider plugins to add your own adapter.
Built-in Providers
Choose a backend and Native or Envd execution in the backend selection table. Creation, stop, resume, and deletion belong to target management. This page covers Host-owned runtime clients; use Cloud Providers for cloud accounts, desktop preparation, and backend limits, or Provider plugins for catalog extensions.
Keep shared Device runtimes open until their borrowers finish. Each Envd execution opens an independent fixed-cwd Session. Sessions own execution resources; the Host still supplies tenant authorization and container allocation. Before deploying Sandbox or controlled egress, check the current prerequisites and verify the image.
Local Envd runtime
Install a compatible a13n-envd binary, then construct a Host-owned runtime:
from a13n_harness.providers.environment.local_envd.runtime import (
LocalEnvdProviderRuntime,
TemporaryLocalEnvdRuntimeAllocator,
resolve_a13n_envd_executable,
)
runtime = LocalEnvdProviderRuntime(
executable=resolve_a13n_envd_executable(),
allocate_private_runtime=TemporaryLocalEnvdRuntimeAllocator(),
)The resolver checks an explicit path first, then A13N_ENVD_EXECUTABLE, then the platform's a13n-envd executable on PATH. Set the environment variable in the Host process; the library does not load .env, install the binary, or fall back to Direct Local.
Pass runtime to the Local Envd connector. First acquisition launches one shared Device and checks exact daemon/client compatibility. Each opened execution gets an independent Session. Close executions after use and call await runtime.close() at Host shutdown.
Select launch Sandbox and egress settings before acquisition. Envd enforces those settings within the outer boundary supplied by the Host account, container, or VM; runtime construction performs no native-isolation probe. Follow the Local Envd example, or run the real Provider path with make local-envd-test.
Docker runtime
For a managed Docker target:
- Set
DockerConnectionConfiguration.docker_hostto the Engine the Host can reach. Reconnecting later requires access to the same Engine. Service's Compose deployment shows socket access for its non-root process. - Choose an image and execution route. Service's
DockerRecipedefaults toexecution="native"andghcr.io/converge-ai-labs/a13n-sandbox:dev. Native execution uses Docker exec;execution="envd_http"uses the image's Envd daemon. - Add resource limits and optional host bind mounts. Mount
sourcepaths must already exist on the Engine's machine;read_onlydefaults to true (Docker named volumes are unsupported). Keep/workspaceand private command metadata under the container's own filesystem. - Create the target, save its state, and open a connector. Pulling or rebuilding an image tag does not replace an existing container.
The default pull_policy="if_missing" pulls only absent images. "never" reports environment_image_missing when the image is absent. Use an immutable digest when you need exact image identity. Native user selection uses an explicit recipe user, then ai.a13n.environment.user, then the image USER. The standard sandbox image selects UID/GID 1000.
Custom native images need Linux, Python 3.10+, the configured shell, and writable /workspace and /tmp/a13n. Git is needed for git-ignore queries. init_script runs on new containers; failed initialization is not implicitly replayed. Its helper request timeout is separate from ordinary shell duration. Put ordinary variables in environment, and keep secrets out of recipe fields. memory_gb uses decimal GB, while cpus measures cores. disable_network=true selects Docker's none network. Destruction preserves external bind-mounted data.
For HTTP EIP, configure the connection's envd_http with a Worker-reachable host and bind address. Service preserves the image entrypoint and publishes container port 8888 to a Docker-assigned host port. Use a compatible Envd image and keep networking enabled. The image owns execution identities, so this route rejects recipe user overrides. Add desktop: true to include observable, input-ready desktop readiness. Plain HTTP requires loopback or an explicitly trusted private link. Follow Create a Docker desktop for the Console steps.
For headless Envd, select an official -slim sandbox tag matching your deployment and execution="envd_http" with desktop=false. Management bootstrap and credential reads rely only on POSIX shell and core utilities; Native Docker file operations additionally require Python in the container.
To use a custom base, build an explicitly compatible wrapper image: install a compatible Envd binary and the common a13n-sandbox-entrypoint, provision its Session user and writable workspace, and select the wrapper plus the daemon command in your Dockerfile. Service starts the image as root with its declared entrypoint and command, requiring Envd to be preinstalled in the image. Match the binary's architecture and userspace requirements (for example, pair glibc binaries with a glibc userspace). Desktop wrappers additionally supply the desktop launcher and its dependencies.
An embedding Host can borrow its own Engine client:
import docker
from a13n_harness.providers.environment.docker.runtime import DockerProviderRuntime, DockerSDKEngine
engine = DockerSDKEngine(docker.from_env())
runtime = DockerProviderRuntime(engine=engine)
# Construct and use Environment instances with this runtime, then:
# await engine.close()Keep the borrowed Engine open until its users finish, then close it at Host shutdown. Registry authentication, credential helpers, mirrors, and proxies use Docker client configuration.
Native execution overrides the image entrypoint, enables Docker init, and keeps the container alive between Runs. Relative tool paths start in /workspace; absolute paths address the container, with Harness adding its aggregate mount prefix. Execution close releases local observations while preserving the container and background processes. Re-entry uses the saved container; confirmed absence requires an explicit management decision. If a status check fails due to a transient network error, retry the query before assuming the target was destroyed.
Native Docker provides files, shell, process control, and output observation. Ports and Computer require envd_http; changing an existing Native recipe does not install a daemon. With HTTP EIP, Session close preserves the desktop, while stop/start preserves files and recreates GUI state. See the managed desktop image contract for startup and permissions.
Cloud Providers
Continue to cloud Provider setup and limits.
Reconnection and lifecycle
Continue to cloud Provider setup and limits.
E2B runtime
Continue to cloud Provider setup and limits.
E2B desktop preparation
Continue to cloud Provider setup and limits.
Daytona
Continue to cloud Provider setup and limits.
Modal
Continue to cloud Provider setup and limits.
Vercel Sandbox
Continue to cloud Provider setup and limits.
Fly.io Sprites
Continue to cloud Provider setup and limits.
Runloop
Continue to cloud Provider setup and limits.
boxd
Continue to cloud Provider setup and limits.
Embedded configuration
Continue to cloud Provider setup and limits.
Cloud validation
Continue to cloud Provider setup and limits.
Provider catalog and plugins
Follow Provider catalog and plugins to select or publish a trusted plugin.