worker

command
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

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_NODE_SELECTOR    node labels every sandbox pod requires, as
                             comma-separated key=value; empty places nothing.
                             Malformed fails startup
SANDBOX_K8S_TOLERATIONS      taints every sandbox pod tolerates, as a JSON
                             array of Kubernetes Toleration objects; empty
                             tolerates nothing. Malformed fails startup
SANDBOX_K8S_IMAGE_PULL_SECRETS   Secrets every sandbox pod pulls images
                             with, as comma-separated Secret names; empty
                             adds nothing. Malformed fails startup
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)

The one flag: --version (also -version) prints the build-time version stamp (internal/version) and exits before any configuration is read.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL