AX (Agent Executor): Google's Open Agent Runtime, Explained for Builders (2026)
- Place AX correctly in Google's stack: Kubernetes, Agent Sandbox, Agent Substrate, AX, then your harness
- Read the four AX resources (Task, Workspace, Gateway, Model) and know what each one buys you
- Explain what really survives an AX suspend/resume, what does not, and what your runner image must do about it
- Run a first Task end to end with ax apply, ax watch and ax ssh, and know the three debugging traps
- Decide when a self-hosted runtime like AX beats Claude Managed Agents or the OpenAI Agents API, and when it does not
On the night of September 20, 2026, AX: Google's open agentic orchestrator went to the top of Hacker News with 507 points and 222 comments. Most of those comments were people asking what it is for. That is a fair question, because the project has been public since May 20, 2026 (v0.1.0) and has changed shape twice since, so most of the blog posts you will find describe a CLI that no longer exists.
Here is the short version. AX is not a model, not an agent framework and not a hosted service. It is a Kubernetes-style control plane, with a kubectl-shaped CLI, that takes a declared agent Task, gives it a sandbox, clones its repos, wires its MCP servers and skills, fences its network, and can freeze it to a snapshot and thaw it later on any free worker. It sits under whatever harness you already use, whether that is Claude Code, Google's ADK, LangChain, or a Python loop you wrote yourself.
The stack, bottom to top
The Google announcements use four names that are easy to confuse. They are four layers, and AX is the top one.
| Layer | What it is | Status (Sep 2026) | Numbers Google publishes |
|---|---|---|---|
| Kubernetes / GKE | The cluster | — | — |
| Agent Sandbox (kubernetes-sigs/agent-sandbox) | A Sandbox CRD: gVisor-isolated pods (Kata pluggable), warm pools, pod snapshots | GA on GKE since May 21, 2026 | 300 sandbox allocations/s per cluster; sub-second start, 90% within 200 ms |
| Agent Substrate (agent-substrate/substrate) | A minimal control plane that multiplexes many idle actors onto few warm workers by snapshotting RAM + files to object storage | Open source, early, "not an officially supported Google product"; managed flavour on GKE in evaluation | ~250 stateful actors on 8 pods; "10x higher density" than plain containers; sub-second activation |
| AX (google/ax) | Declarative Tasks/Workspaces/Gateways/Models + CLI on top of Substrate | v0.3.0, ax.io/v1alpha1, Apache-2.0, 4.3k stars | "billions of tasks per cluster" (marketing claim, not a benchmark) |
| Your harness | Claude Code, ADK, LangChain, A2A agents, your own loop | — | — |
Two things the table hides. First, Substrate is where the interesting engineering lives (the snapshot and teleport machinery); AX is the ergonomic layer. Second, Substrate lives in its own GitHub org, not under google/, which several HN commenters flagged as a signal about how official any of this is. Treat the whole thing as a serious but pre-1.0 open-source project from a Google team, not a product with an SLA.
The four primitives
Everything in AX is a YAML resource in an atespace (Substrate's tenancy unit; default unless you say otherwise). You ax apply -f them exactly as you would with kubectl.
Task: the unit of isolated execution
apiVersion: ax.io/v1alpha1
kind: Task
metadata:
name: fix-flaky-test
spec:
image: "ghcr.io/my-org/my-agent-image"
command: ["my-agent", "--goal", "fix the flaky test"]
env:
- name: ENVIRONMENT
value: "staging"
resources:
requests: { cpu: "500m", memory: "1Gi" }
limits: { cpu: "2", memory: "4Gi" }
workspaces:
- name: golang
path: "/workspace"
goal: "Ensure the Go toolchain is available and built from source"
gateway:
name: default-gateway
debug: true
A Task is deliberately small. The concepts doc describes agents creating many Tasks over their lifetime rather than living inside one long process. Three fields matter more than they look:
workspaces[].goalis a plain-English description of the environment the Task needs. AX's "generative" setup tries to complete the workspace from that sentence (install a toolchain, fetch dependencies). It is the one place where a model is in the loop before your agent starts.debug: trueis the only way to getax sshinto the sandbox. Without it the guest services are not exposed and the CLI refuses to connect.gatewayis optional in the schema, but if you leave it out you are relying on whatever the substrate's default egress policy is. Declare one.
Workspace: git + MCP + skills, materialised before the agent starts
apiVersion: ax.io/v1alpha1
kind: Workspace
metadata:
name: golang
spec:
git:
- name: origin
repo: "https://github.com/golang/go.git"
branch: "my-fix"
mcp:
registries:
- provider: google
query: "mcp.tags:build"
servers:
- name: git-tools
endpoint: "http://git-mcp.default.svc.cluster.local:8080"
skills:
registries:
- provider: google
query: "skills.tags:nodejs"
path: "/.agents/skills"
This is the resource that makes AX more than "Kubernetes Jobs with a sandbox". A Workspace pre-clones repositories, resolves MCP servers (by explicit endpoint or by a registry query), and drops skill packages into a path. Note the default skills path: /.agents/skills is the same directory convention the cross-agent SKILL.md standard uses for Codex, Cursor and Gemini CLI, so a Workspace can hand the same skills to whichever harness runs inside the Task.
Gateway: listeners in, allowlist out
apiVersion: ax.io/v1alpha1
kind: Gateway
metadata:
name: default-gateway
spec:
listeners:
- name: http
port: 8080
protocol: HTTP
egress:
allowlist:
hosts:
- host: "api.anthropic.com"
port: 443
The reference manifest ships with host: "*" on 443, which is an allow-everything policy. Change it. Egress allowlists are the single most effective control against the exfiltration patterns in our prompt-injection and what your agent uploads pages, and AX gives you a declarative place to put them. Listeners are how a Task exposes a port (for an A2A endpoint, a dev server, a debug UI); ax tunnel forwards them to your laptop.
Model: provider + model ID + a Kubernetes secret
apiVersion: ax.io/v1alpha1
kind: Model
metadata:
name: claude-model
spec:
provider: anthropic
model: claude-opus-5
secretKey:
name: anthropic-api-secret
key: ANTHROPIC_API_KEY
parameters:
maxTokens: 16000
temperature: 0.9
The reference docs show google and anthropic providers. The credential is a reference to a Kubernetes Secret, so the manifest never contains the key and the key is rotated where you already rotate secrets. AX is not Gemini-only; the runner docs do mention that GEMINI_API_KEY is injected automatically when the atespace has Gemini credentials, which is the one place Google's own model gets a shortcut.
What actually happens inside a Task
This is the part no launch post covers, and it is where you will lose an afternoon if you skip it. From docs/runner.md:
- The entrypoint is fixed. Whatever
spec.imageyou supply, the controller starts the container with/usr/local/bin/ax-task-runneras PID 1. Your image must contain an executable at that path (a symlink is fine). The published base image isgcr.io/ax-substrate/ate-images/ax-task-runner, and extending it is the normal route. - Your command arrives via environment, not argv. The runner receives
AX_TASK_YAML(the whole Task, including status) andAX_WORKSPACES_YAML(every bound Workspace as multi-document YAML), parsesspec.commandout of the Task, and starts it as a child process with the first workspace as the working directory. It also exposesAX_METADATA_URL, a small local HTTP metadata server. - Bootstrap has a 10-minute clock. Workspace materialisation (clones, MCP resolution, skill install, the generative
goalstep) must finish withinAX_BOOTSTRAP_TIMEOUT, default 10 minutes. Large monorepos on a cold worker can blow through it. - The control plane does not read your exit code. The runner logs the command's exit status but stays up as PID 1 whether or not your agent is still running. So a Task in phase
Runningdoes not mean your agent is alive. Write your own completion signal (a file in the workspace, a message to your own queue, a Task deletion from inside) and watch that. - Shutdown is SIGTERM, 10 seconds, SIGKILL. The runner forwards SIGTERM to the command's process group and waits a bounded grace period. Flush state early.
Suspend and resume: what survives
Suspend/resume is the feature that justifies the whole stack. Agents spend most of their wall-clock waiting on a model, a tool, or a human, and Substrate's bet is that an idle agent should cost storage, not a warm pod.
ax suspend task fix-flaky-test # Ready=False, snapshot taken
ax resume task fix-flaky-test # restored on any free worker
What the docs say survives, and what does not:
| Survives a suspend/resume | Does not survive |
|---|---|
The /workspace volume (files, clones, build artefacts) | The process tree: your agent restarts from its entrypoint |
| Substrate-level actor memory snapshot (RAM + files, at the Substrate layer) | Open network connections (GKE docs: agents must handle reconnection) |
| Task spec and status | Anything written outside the workspace volume |
The runner doc is explicit about the consequence: after resume, the runner sees the same files but a new process tree, so it must track whether workspace setup already ran (marker files are the suggested mechanism) or it will re-clone every repo. If your agent keeps its plan or its conversation only in process memory, a resume loses it; keep the transcript on disk in the workspace. This is the same lesson as our long-running agent harnesses page, enforced by the infrastructure.
- go install github.com/google/ax/cmd/ax@latest. AX follows your active kubeconfig context (kubectx works) and defaults to namespace ax-system and atespace default. For a laptop, the Agent Substrate repo's hack/ scripts stand up a kind cluster with the substrate installed; AX's control plane is then deployed with make deploy AX_IMAGE_REPO=<your registry>, which needs ko and a registry you can push to.
- FROM the published ax-task-runner image, apt-get or npm install your agent, keep /usr/local/bin/ax-task-runner as the entrypoint. Do not override ENTRYPOINT; put the agent in spec.command instead.
- One Model with a secretKey pointing at an existing Kubernetes Secret, one Gateway with a real egress allowlist (your model provider, your git host, nothing else), one Workspace with the repo and any MCP servers, one Task with debug: true for the first run.
- ax apply -f manifests/ then ax watch task <name>. Wait for the WorkspaceReady and GatewayReady conditions before Ready. If Ready never comes and the phase flips to Failed, the 10-minute bootstrap timeout is the first suspect.
- ax ssh <name> -- ls -al /workspace shows what the Workspace actually materialised; ax ssh <name> -- env | grep AX_ shows the runner contract. Both only work because you set debug: true.
- ax suspend task <name>, wait, ax resume task <name>, then confirm your agent picked up from disk rather than restarting the job. Finally ax delete task <name>: the phase goes to Terminating while the sandbox is torn down.
Have Claude draft the manifests for an agent you already run
I run an agent as a container image ghcr.io/acme/triage-agent:1.4. Its entrypoint is "triage --repo REPO_PATH --model MODEL_ID". It needs: the repo github.com/acme/backend on branch main, an MCP server for Linear reachable at http://linear-mcp.tools.svc.cluster.local:8080, outbound access only to api.anthropic.com:443 and github.com:443, and the Anthropic key from the Kubernetes Secret "anthropic-api-secret" (key ANTHROPIC_API_KEY). Write the four google/ax v1alpha1 manifests (Model, Gateway, Workspace, Task) for this, following docs/manifests.md in the repo. Then write a Dockerfile that extends the published ax-task-runner base image and installs my agent WITHOUT changing the entrypoint. Finally, list what I must change in the agent so that (a) it treats the first workspace as its working directory, (b) it survives a suspend/resume by keeping its plan and transcript on disk under /workspace and using a marker file to skip re-setup, and (c) it signals completion in a way the AX control plane can't (it ignores exit codes).
Where AX sits next to the hosted agent loops
The most-upvoted question in the HN thread was "what is the benefit over the OpenAI Agents API?" The honest answer is that they are different layers.
| AX + Agent Substrate | Claude Managed Agents | OpenAI Agents API | Cloudflare's isolate runtime | |
|---|---|---|---|---|
| Who runs the loop | You (any harness in the container) | Anthropic (the harness is theirs) | OpenAI (the Codex harness) | You, on Workers/Durable Objects |
| Where it runs | Your Kubernetes cluster, any cloud or on-prem | Anthropic's infrastructure | OpenAI's, or a self-hosted sandbox | Cloudflare's edge |
| Isolation | gVisor / Cloud Hypervisor sandbox per Task | Anthropic-managed environment | Hosted or self-hosted sandbox | V8 isolate, container on demand |
| Model choice | Any provider you put in a Model resource | Claude | OpenAI models | Any (via API) |
| Idle cost model | Snapshot to storage, resume on demand | Session-based billing | Session-based billing | Isolates hibernate |
| You own | Cluster, upgrades, secrets, egress policy | An API key | An API key | A Workers account |
Pick AX when you need data sovereignty, want to run more than one vendor's model behind one policy, already operate Kubernetes, or want agents that can sleep for days without paying for compute. Pick a hosted loop when you want a working harness today and do not want to own a cluster. Many teams will do both: a hosted loop for interactive sessions, AX-style infrastructure for fleets of background Tasks.
Gotchas and the pushback worth listening to
- The June-era docs describe a different tool. The May preview exposed a conversation-centric CLI (
ax exec --conversation … --resume,ax forkfor trajectory branching, an AgentService protocol with ADK and A2A bridges). The September README's command reference is resource-centric:apply,get,describe,watch,suspend,resume,delete,ssh,tunnel,ctx. If a tutorial showsax fork, it is from before the redesign. The five headline capabilities from the May blog (durable execution, isolation, single-writer session consistency, connection recovery, trajectory branching) are still the stated goals; how much of the branching story survives in the resource model is not documented as of this writing. v1alpha1means it. The README warns of major breaking changes before a stable release. Pin the CLI version and the runner image digest, and re-readdocs/manifests.mdon every upgrade.- Kubernetes is not optional. The most-repeated complaint in the thread. The Substrate quickstart runs on kind, so you can try it on a laptop, but production means a real cluster. If you do not already run Kubernetes, AX is not the reason to start.
- Managed GKE Agent Substrate has hard requirements. GKE 1.37+ (1.36 with beta flags), Workload Identity, beta APIs enabled at cluster creation, uniform machine types per ActorTemplate (no E2), a Cloud Storage bucket for snapshots, gVisor or Cloud Hypervisor isolation, and no GPU passthrough. Production use is behind an allowlisted private GA program.
- Egress defaults are permissive in the examples.
host: "*"on 443 lets an agent reach any HTTPS endpoint. That is the opposite of what you want for a Task that reads untrusted repos. Follow the same rules as securing local and hybrid agents. - Two projects, two orgs, one disclaimer. AX is under
google/; Substrate is underagent-substrate/and states it is not an officially supported Google product. Neither is eligible for Google's OSS vulnerability rewards program. Budget for reading source when something breaks.
Check yourself
0/6Sources & further reading
- google/ax on GitHub — README (primitives, CLI reference, deploy),
docs/concepts.md,docs/manifests.md,docs/runner.md,docs/sandbox.md,docs/networking.md; releases v0.1.0 (May 20, 2026) to v0.3.0 (Sep 20, 2026); Apache-2.0 - agentexecutor.io — the project site that hit Hacker News
- Agent Executor, Google's distributed Agent Runtime — Google Cloud blog, May 21, 2026 (Jaana Dogan, Ethan Bao): the five capabilities and the "new workload class" argument
- Bringing you Agent Sandbox on GKE and Agent Substrate — Google Cloud blog, May 21, 2026: Agent Sandbox GA, the 300 sandboxes/s and 200 ms figures, how Substrate and AX stack
- agent-substrate/substrate on GitHub — actor/worker model, the 250-actors-on-8-pods demo, kind quickstart, the "not an officially supported Google product" disclaimer
- About GKE Agent Substrate — requirements, no GPU passthrough, connections do not survive suspension, private GA for production
- kubernetes-sigs/agent-sandbox — the Sandbox CRD underneath
- Hacker News discussion (item 49780797) — the Kubernetes and YAML pushback, the gVisor/GKE Sandbox explanation, the "which org owns Substrate" thread
Next
- OpenAI Agents API vs Claude Managed Agents — the hosted loops AX is the self-hosted alternative to
- Agent runtimes: isolates vs containers — Cloudflare's answer to the same "agents are a new workload" claim
- Harnesses for long-running agents — what your agent must do so a suspend/resume is a pause, not a restart