If you have ever lost six hours of agent work because your laptop slept, your SSH dropped, or a tool call timed out at minute 200, Google's new Agent Executor (project name AX) is the fix you have been waiting for. Released open-source on May 21, 2026 under Apache 2.0, AX is a distributed runtime that wraps any AI agent loop with durable execution, sandboxed isolation, and crash-resume from event logs. This tutorial walks through moving an existing Claude Code, Cursor, or Gemini CLI agent onto AX in 30 minutes, end-to-end: install the binary, register your agent loop, swap your local executor for the AX controller, validate crash-resume, and deploy to Google Kubernetes Engine via the companion Agent Substrate project. Total time: 30 minutes for a single-machine setup; add 15 minutes if you also push to GKE.

What You Need

  • Go 1.22 or later (AX is shipped as a Go binary; go.dev/dl for the install).
  • An existing agent harness: Claude Code, Cursor, Gemini CLI, or any framework that exposes its agent loop as a callable function.
  • About 1 GB of free disk for the AX event log (snapshotting is incremental; a 35-hour agent run averages 100-300 MB).
  • Optional for the GKE step: a Google Cloud project with billing enabled and the gcloud CLI installed.
  • API keys for whatever model your agent calls. AX is harness-agnostic; it does not care whether you are calling Anthropic, OpenAI, Google, or a local Ollama endpoint.

Cost note: AX itself is free. The model API calls and (optionally) the GKE cluster are your only spend. A single-machine setup costs $0 beyond your existing agent's model usage.

The Workflow

Step 1: Install AX in One Command

From any machine with Go installed:

go install github.com/google/ax/cmd/ax@latest
ax --version

That puts the ax binary in $GOPATH/bin. Verify it works against the sample skill from the repo at github.com/google/ax:

ax exec --input "Can you list me this directory?"

Expected output: the model spins up inside an AX sandbox, the controller logs each event to ~/.ax/events.log, the agent calls the file-listing tool, and the directory contents return as the final response. Time-to-first-token is roughly 2-3 seconds on a warm machine.

Troubleshooting: if you see permission denied on the sandbox creation, AX is trying to create a namespaced Linux user. On macOS it falls back to a process-isolation sandbox; on Linux you need either root or the CAP_SYS_ADMIN capability. The repo's README has the full matrix.

Step 2: Register Your Agent Loop

The AX runtime expects your agent to expose a "skill" interface: a callable that takes a session ID, an input message, and returns a stream of events (tool calls, model outputs, terminal). Most modern harnesses already follow this pattern. To wrap a Claude Code agent:

// myskill.go
package main

import "github.com/google/ax/sdk/go/skill"

func main() {
    skill.Register(&skill.Spec{
        Name: "claude-coder",
        Run: func(ctx skill.Context, input string) error {
            // hand off to your existing Claude Code loop
            return runClaudeCode(ctx, input)
        },
    })
    skill.Serve()
}

Build with go build -o myskill, then register it with the AX controller:

ax skill register ./myskill

The same pattern works for Gemini CLI and Cursor: wrap the agent loop in a skill.Spec, return events through the SDK helpers, build, register. The repo includes example skills for each major harness.

Step 3: Swap Your Local Executor for the AX Controller

This is the migration step that pays for itself the first time you crash mid-task. Instead of running claude-code run "refactor the auth module" directly, invoke through the AX controller:

ax exec --skill claude-coder --input "refactor the auth module" --session refactor-1

What changes under the hood: the controller starts the skill inside a fresh sandbox, opens a single-writer session keyed on refactor-1, and streams every model call, tool call, and intermediate output to the event log. Your agent code is unmodified; only the entry point changes.

Two AX features matter here. First, single-writer session consistency: only one controller process can write to refactor-1 at a time, preventing the split-brain bugs where two agents stomp each other in a shared workspace. Second, per-skill sandbox isolation: even if the agent calls a malicious tool or runs rm -rf, the blast radius is contained to the sandbox filesystem.

Step 4: Validate Crash-Resume

This is the test that convinces every senior engineer to ship AX. Start a long-running agent task:

ax exec --skill claude-coder --input "summarize all transcripts in ./episodes/" --session test-resume &

Let it run for two or three tool calls, then kill the controller process (kill %1 or close the terminal). Wait 30 seconds. Then resume:

ax exec --session test-resume --resume

The controller reads the event log, replays state up to the last completed sequence, and continues from exactly where the previous run died. The model does not redo work; tool outputs that were already produced are replayed from the log rather than recomputed. For a 35-hour autonomous run, this is the difference between "lost the night" and "lost three seconds."

If the resume fails, the most common cause is event log corruption from kill -9 rather than kill -TERM. Use ax log inspect --session test-resume to find the last consistent snapshot; AX can roll back to it and continue from there with minor recomputation.

Step 5 (Optional): Deploy to GKE via Agent Substrate

Single-machine AX is great for solo creators. For team workloads (multiple long-running agents, shared event log storage, autoscaling), Google released Agent Substrate alongside AX. It is a set of Kubernetes manifests and operators built with the GKE team. From the AX repo:

kubectl apply -f https://raw.githubusercontent.com/google/ax/main/deploy/agent-substrate.yaml
kubectl get pods -n agent-substrate

Substrate handles controller scheduling, event log persistence on cloud storage, and the network plumbing for multi-tenant sandboxes. You can run it on any conformant Kubernetes cluster, not just GKE, though the published manifests assume GKE-style networking and storage classes.

Troubleshooting

Skill registration fails with "unknown SDK version". The Go SDK is versioned independently of the AX binary. Match versions: ax --version and go list -m github.com/google/ax/sdk/go should show compatible majors. AX is in preview; the SDK API will break before 1.0.

Sandbox creation hangs on first run. AX pulls a small base image for the sandbox filesystem. First-run pull can take 30-60 seconds on slow networks. Set AX_VERBOSE=1 to see the progress.

Event log grows too fast. Tool calls that produce large blob outputs (multi-MB images, video frames) inflate the log. Use ax log gc --session NAME to compact snapshots, or configure your skill to write large blobs to disk and pass file paths through the event log instead.

Crash-resume returns wrong state. The model itself is stateless across resume; only tool outputs and conversation history are replayed. If your agent depends on external state (a database, a filesystem outside the sandbox), make sure that state is idempotent or the agent re-reads it on resume.

Multi-agent coordination is unclear. AX is single-writer per session. If you need two agents to collaborate, give them separate sessions and use a shared blackboard (filesystem, queue, database) for handoff. The AX docs include a worked example under examples/multi-agent.

What to Try Next

Three natural extensions once your basic AX setup works:

First, compare AX against alternative runtimes. Temporal and Inngest are the closest production-grade peers from outside the AI ecosystem, both offering durable execution with retry and replay. Anthropic's Claude Managed Agents is the closest in-AI peer but ties orchestration to the Anthropic harness. AX's harness-agnostic stance is the unique angle.

Second, add MCP tunneling for private data. AX does not ship its own equivalent of Model Context Protocol tunnels yet, but you can pair it with a private MCP server inside your sandbox to give the agent access to internal databases without exposing them publicly.

Third, migrate a real overnight pipeline. The biggest payoff for AX is workflows that previously needed manual babysitting: re-tagging large media archives, refactoring entire codebases, summarizing year-scale transcript corpora. Pick one such workflow, put it behind AX with crash-resume validated, and the next time your laptop sleeps mid-task you will see the value directly.

FAQ

How does AX differ from the Agent Development Kit (ADK)?

ADK is Google's framework for building agents; it defines how an agent loop is structured, how tools are declared, and how multi-agent coordination works. AX is the runtime that executes those agents (or any other agent) reliably. Think of ADK as Express.js and AX as Kubernetes. The two are designed to work together: ADK agents drop straight into AX with the SDK wrapper, but AX is happy to run agents from any framework or vendor.

Can I run AX without Google Cloud?

Yes. AX is a standalone Go binary under Apache 2.0; the only requirement is a host that can run Go binaries and create sandboxes. The Agent Substrate companion is Kubernetes-based, and while the manifests assume GKE for storage and networking, they work on any conformant Kubernetes distribution with minor tweaks.

What is the relationship to Gemini CLI and Antigravity?

Gemini CLI and the Antigravity 2.0 platform are Google's first-party agent harnesses, optimized for Gemini models. AX is the underlying execution layer that those harnesses use, and that any other harness can also use. Releasing AX as open source signals Google's stance that the runtime layer should be commoditized while the model layer competes on capability.

What happens to in-flight state on an AX upgrade?

The event log format is versioned. A patch-level upgrade resumes existing sessions cleanly; a minor or major upgrade may require running ax log migrate on existing sessions. The repo's CHANGELOG documents which version transitions require migration. During the preview period, expect at least one breaking change before 1.0.

Is AX production-ready or preview-only?

Preview. Google labels AX as preview with breaking changes expected, and the documentation explicitly warns against using it for mission-critical workloads without pinning a specific commit. For solo creators and small teams, the trade-off is usually worth it: durable execution and crash-resume are the difference between a working agent pipeline and one that needs babysitting. For regulated production workloads, wait for the 1.0 release or pair AX with a more mature runtime like Temporal as a backup.