Help us shape the future of Go! Take the 2026 Go Developer Survey

executor

command
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2026 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Overview

Command executor runs the platform-managed sandbox worker: it claims tool_exec work from the shared Postgres queue, runs the built-in toolset inside per-session Docker containers, and appends the agent.tool_result events the brain resumes on. Disposable "hands" — run as many as needed; a container dying is one tool-call error, not a lost session. Configuration is environment-driven:

DATABASE_URL             Postgres DSN (required; same database as the
                         controlplane and brain)
EXECUTOR_IMAGE           sandbox base image (default "debian:stable-slim")
EXECUTOR_WORKDIR         working directory inside the sandbox (default
                         "/workspace")
EXECUTOR_LEASE_TTL       work-item lease, Go duration (default "15m") —
                         must comfortably exceed a single tool's timeout
EXECUTOR_POLL_INTERVAL   idle queue poll, Go duration (default "500ms")
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)

Jump to

Keyboard shortcuts

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