A deployment backend answers one question: where should this bundle image run? Remote calls decide which function runs. Bundles decide what code exists in the sandbox. Deployments decide where the image is started and how it is cleaned up.

Use a Backend

The Docker backend is the local development path:
pip install agentix-deployment-docker
In code, create a deployment, pass a SandboxConfig, and use the returned runtime_url with RuntimeClient.
from agentix import RuntimeClient
from agentix.deployment.base import SandboxConfig, session
from agentix.deployment.docker import DockerDeployment

deployment = DockerDeployment()
config = SandboxConfig(
    image="python:3.13-slim",
    bundle="my-rollout:0.1.0",
)

async with session(deployment, config) as sandbox:
    async with RuntimeClient(sandbox.runtime_url) as client:
        ...
session(...) creates the sandbox on entry and deletes it on exit. If the bundle was built for a non-default architecture, pass the same Docker/OCI platform so the task image and runtime overlay match:
config = SandboxConfig(
    image="python:3.13-slim",
    bundle="my-rollout:0.1.0",
    platform="linux/amd64",
)

Backend Plugins

Deployment packages register classes in the agentix.deployment entry point group.
pyproject.toml
[project]
name = "agentix-deployment-fly"
version = "0.1.0"

[project.entry-points."agentix.deployment"]
fly = "my_deploy:FlyDeployment"
After installation, the backend name becomes available to load_deployment:
from agentix.deployment.base import load_deployment

FlyDeployment = load_deployment("fly")

Backend Protocol

Backends are structural. They do not inherit a base class; they implement three async methods.
my_deploy/__init__.py
import os

from agentix.deployment.base import Sandbox, SandboxConfig, SandboxId, SandboxInfo


class FlyDeployment:
    def __init__(self) -> None:
        self._token = os.environ["FLY_API_TOKEN"]

    async def create(self, config: SandboxConfig) -> Sandbox:
        ...

    async def delete(self, sandbox_id: SandboxId) -> None:
        ...

    async def get(self, sandbox_id: SandboxId) -> SandboxInfo:
        ...
Backend constructors take no arguments. Read API keys, regions, and templates from environment variables so CLI and code paths behave the same way.

Configuration

VariableUsed byPurpose
AGENTIX_BIND_PORTruntime serverSandbox-side bind port, default 8000
DAYTONA_API_KEYdaytona backendAPI authentication
E2B_API_KEY / E2B_TEMPLATE_IDe2b backendAPI authentication and template selection
Fail fast in __init__ when required configuration is missing. The error should surface before the backend starts creating infrastructure.

Boundary

Deployment backends should not know about agent wrappers, dataset scorers, or remote-call targets. They only start bundle images and return the runtime endpoint.