Documentation
¶
Overview ¶
Command worker runs the BYOC (bring-your-own-compute) sandbox worker: it polls the control plane's self_hosted work queue over HTTP, runs the built-in toolset inside per-session Docker containers on the customer's own compute, and posts the user.tool_result events back over the session API. It is the customer-hosted twin of the executor — no inbound network access into the customer's environment is required, and it reaches the control plane only through the wire, authenticating with an environment key. One session at a time; run as many worker processes as needed.
Configuration is environment-driven:
ANTHROPIC_BASE_URL control-plane URL (required) — never
api.anthropic.com; the platform this worker serves
ANTHROPIC_ENVIRONMENT_ID the environment whose work queue to poll (required)
ANTHROPIC_ENVIRONMENT_KEY the environment key, sent as Authorization: Bearer
(required)
ANTHROPIC_WORKER_ID worker identity for the control plane's poll
metrics (default "<hostname>-<random>")
WORKER_IMAGE sandbox base image (default "debian:stable-slim")
WORKER_WORKDIR working directory inside the sandbox (default
"/workspace")
SANDBOX_BACKEND "docker" (default) or "k8s"
DOCKER_HOST Docker daemon address for the docker backend
(falls back to the well-known socket)
SANDBOX_K8S_KUBECONFIG kubeconfig path for the k8s backend; empty,
together with an empty SANDBOX_K8S_CONTEXT, uses
in-cluster config, then the default loading rules
SANDBOX_K8S_CONTEXT kubeconfig context for the k8s backend
SANDBOX_K8S_NAMESPACE namespace for sandbox pods (default "default")
SANDBOX_K8S_NETSETUP_IMAGE image carrying `ip` for the limited-networking
init container (default "busybox")
OTEL_EXPORTER_OTLP_ENDPOINT optional OTLP/gRPC collector endpoint
OTEL_EXPORTER_OTLP_INSECURE "true" to export without TLS (default TLS)
Click to show internal directories.
Click to hide internal directories.