| description | Choose and configure agent runtimes for GitHub Agentic Workflows. |
|---|---|
| disable-model-invocation | true |
Use these instructions when creating or updating workflows that mention Docker, gVisor, Docker sbx, Cloud Hypervisor, ARC DinD, self-hosted runners, or sandbox.agent.runtime-install.
- Omit
sandbox.agent.runtimefor the default Docker agent runtime. - Set
sandbox.agent.runtime: gvisoronly when the runner has a local Docker daemon and can install or already hasrunsc. - Set
sandbox.agent.runtime: docker-sbxonly when the runner supports KVM-backed microVMs. - Set
sandbox.agent.runtime: cloud-hypervisoronly for the preview microVM runtime on a GitHub-hosted Ubuntu x86_64 runner with/dev/kvm; preferdocker-sbxorgvisorwhen those host constraints are not guaranteed. - Do not set
sandbox.agent.runtime: docker; Docker is selected by omitting the field. - Do not set
sandbox.agent.runtime: sbx;sbxis not a validsandbox.agent.runtimevalue. - Set
runner.topology: arc-dindfor ARC or equivalent Kubernetes runners that use a Docker-in-Docker sidecar. This is a runner topology, not an agent runtime.
- Do not combine
runner.topology: arc-dindwithsandbox.agent.runtime: gvisor,sandbox.agent.runtime: docker-sbx, orsandbox.agent.runtime: cloud-hypervisor. - ARC DinD workflows must be rootless: do not add
sudo,apt-get install, or other host package bootstrap steps. - Docker sbx requires KVM and normally does not work on ARC DinD because the sbx daemon must run on the runner host.
- Cloud Hypervisor requires
RUNNER_ENVIRONMENT=github-hosted, Ubuntu Linux x86_64, and/dev/kvm; it is not supported on self-hosted or ARC DinD runners.
sandbox.agent.runtime-installdefaults totruefor gVisor and Docker sbx provisioning.- Set
runtime-install: falseonly when the runner image or pod is pre-provisioned with the runtime and required daemon or policy. - When any imported workflow sets
runtime-install: false, false wins during import merging. - With
runtime-install: false, gh-aw skips generated runtime checks and setup, so the runner must already satisfy those prerequisites.
- gVisor uses
runscfor the agent container while AWF infrastructure containers continue to use Docker. - The generated gVisor installer may use host
sudo; the compiler derives that fromruntime: gvisor. There is nosandbox.agent.sudofield. - Use gVisor when stronger kernel isolation is needed and the workload is compatible with gVisor syscall behavior.
- Docker sbx runs the agent in a KVM-backed microVM and requires a KVM-capable Linux runner.
- With runtime installation enabled, gh-aw installs
docker-sbx, adjusts/dev/kvm, starts the sbx daemon, authenticates CLIs, pulls the template, and runs a smoke test. The compiler derives the required host privileges fromruntime: docker-sbx. - Docker sbx requires both
DOCKER_USERNAMEandDOCKER_PAT操作 secrets.DOCKER_PATmust be a Docker Hub personal access token that can authenticate Docker Hub pulls for the sandbox template. DOCKER_USERNAMEandDOCKER_PATremain required even withruntime-install: false, because compiled workflows refresh sbx credentials immediately before agent execution.- Do not use Docker sbx for workflows triggered from untrusted forks unless the trigger and credential model safely provide those secrets.
- Preview scope is narrow: GitHub-hosted runners only, Ubuntu Linux x86_64 only, and
/dev/kvmmust be present. - The compiler emits host preflight and release-asset provisioning steps that download and checksum-verify the pinned Cloud Hypervisor binary,
virtiofsd, kernel, rootfs, and supervisor from thegh-aw-firewallrelease before AWF starts, and grants only the runner user scoped read/write access to/dev/kvm. - AWF launches with the host privileges required to create the VM but keeps strict network isolation; the guest defaults to 2 vCPUs and 4096 MiB, and its trusted topology attachment is limited to the MCP gateway on TCP 8080 (no CLI proxy).
- Not supported under Cloud Hypervisor:
tools.github.mode: gh-proxy, theintegrity-reactionsfeature,sandbox.agent.allow-host-ports, GitHub 操作services:with published ports, andenclaves:configuration. - Do not recommend this runtime for self-hosted, non-Ubuntu, or non-x86_64 runners; use
docker-sbxorgvisorinstead.
- Use
runner.topology: arc-dindwhenDOCKER_HOSTpoints to a DinD sidecar such astcp://localhost:2375ortcp://dind:2375. - Ensure the runner container and DinD sidecar share
/home/runner/_work. - Use a daemon-visible tool cache path such as
/tmp/gh-aw/tool-cache, not/opt/hostedtoolcache. - If the Docker socket is bind-mounted at a nonstandard path, set
GH_AW_DOCKER_SOCK_PATH. SetGH_AW_DOCKER_SOCK_GIDonly when group detection withstatfails.