Agent Executor (AX) is Google's open agentic orchestration runtime
Go
- Deleted the deprecated old manifests/ directory. (#174)
Jaana Doganb60ee71e3303
diff --git a/hack/install-ax.sh b/hack/install-ax.shindex 4024fc7..ea1b781 100755--- a/hack/install-ax.sh+++ b/hack/install-ax.sh@@ -20,6 +20,13 @@ set -o pipefailROOT=$(git rev-parse --show-toplevel)cd "${ROOT}"+if [[ -n "${PROJECT_ID:-}" ]]; then+ export KO_DOCKER_REPO="gcr.io/${PROJECT_ID}"+ echo "Using KO_DOCKER_REPO: ${KO_DOCKER_REPO}" >&2+fi++export KO_DEFAULTPLATFORMS="${KO_DEFAULTPLATFORMS:-linux/amd64}"+# ANSI color codes for prettier outputCOLOR_CYAN='\033[1;36m'COLOR_RESET='\033[0m'@@ -29,12 +36,43 @@ function log_step() {echo -e "${COLOR_CYAN}[step]: ${step_name}${COLOR_RESET}"}+# wait_with_spinner runs a blocking command while showing a simple spinner on an+# interactive terminal, then reports "done"/"failed" and returns the command's+# exit status.+wait_with_spinner() {+ local msg="$1"; shift+ if [[ ! -t 2 ]]; then+ "$@"+ return $?+ fi++ local out; out="$(mktemp)"+ "$@" >"${out}" 2>&1 &+ local pid=$! frames='|/-\' i=0+ while kill -0 "${pid}" 2>/dev/null; do+ i=$(( (i + 1) % ${#frames} ))+ printf '\r%s %s' "${frames:${i}:1}" "${msg}" >&2+ sleep 0.1+ done++ local status=0+ wait "${pid}" || status=$?+ if [[ "${status}" -eq 0 ]]; then+ printf '\r\033[K%s... done\n' "${msg}" >&2+ else+ printf '\r\033[K%s... failed\n' "${msg}" >&2+ cat "${out}" >&2+ fi+ rm -f "${out}"+ return "${status}"+}+function usage() {echo "Usage: $0 [options]"echo ""echo "Options:"- echo " --deploy-ax-server Deploy AX server and components using ko"- echo " --delete-ax-server Delete AX server and components from cluster"+ echo " --deploy-ax-server Build images and deploy AX server and components"+ echo " --delete-ax-server Delete AX server and components, preserving the event-log database"echo " -h, --help Show this help message"}@@ -44,10 +82,106 @@ run_kubectl() {"$@"}-run_ko() {- ko apply \- ${KUBECTL_CONTEXT:+--context=${KUBECTL_CONTEXT}} \- "$@"+# detect_container_engine selects the OCI build/push tool when CONTAINER_ENGINE+# is not set explicitly. It prefers a *working* docker (daemon reachable), then a+# working podman, so a docker CLI installed without a running daemon does not+# shadow a working podman. As a last resort it picks whichever CLI exists so the+# build step can surface an actionable daemon error.+detect_container_engine() {+ if [[ -n "${CONTAINER_ENGINE:-}" ]]; then+ return # Respect an explicit override; do not second-guess it.+ fi+ if docker info >/dev/null 2>&1; then+ CONTAINER_ENGINE=docker+ elif podman info >/dev/null 2>&1; then+ CONTAINER_ENGINE=podman+ elif command -v docker >/dev/null 2>&1; then+ CONTAINER_ENGINE=docker+ elif command -v podman >/dev/null 2>&1; then+ CONTAINER_ENGINE=podman+ else+ CONTAINER_ENGINE=docker+ fi+}++# build_ax_image builds and pushes the comprehensive ax image (the Go ax binary+# plus the Antigravity Python sidecar) and echoes its digest-pinned reference on+# stdout. Requires KO_DOCKER_REPO and a container engine.+build_ax_image() {+ if [[ -z "${KO_DOCKER_REPO:-}" ]]; then+ echo "Error: KO_DOCKER_REPO environment variable must be set" >&2+ exit 1+ fi+ detect_container_engine+ if ! command -v "${CONTAINER_ENGINE}" >/dev/null 2>&1; then+ echo "Error: container engine '${CONTAINER_ENGINE}' not found in PATH." >&2+ echo "Install it or set CONTAINER_ENGINE to an available builder." >&2+ exit 1+ fi++ local repo tag image digest+ repo="${KO_DOCKER_REPO}/ax"+ tag="$(git rev-parse --short HEAD)"+ image="${repo}:${tag}"++ log_step "build_ax_image -> ${image}" >&2+ "${CONTAINER_ENGINE}" build \+ --platform linux/amd64 \+ -f cmd/ax/Dockerfile \+ -t "${image}" \+ . 2>&1 \+ | awk '{ sub(/^\[[0-9]+\/[0-9]+\] /, ""); print; fflush() }' >&2++ # Push the readable tag, then resolve the pushed manifest digest so the+ # ActorTemplate can reference the image by digest (snapshot-safe).+ if [[ "${CONTAINER_ENGINE}" == *podman* ]]; then+ local digestfile+ digestfile="$(mktemp)"+ "${CONTAINER_ENGINE}" push --digestfile="${digestfile}" "${image}" >&2+ digest="$(cat "${digestfile}")"+ rm -f "${digestfile}"+ else+ "${CONTAINER_ENGINE}" push "${image}" >&2+ local repo_digest+ repo_digest="$("${CONTAINER_ENGINE}" image inspect --format '{{index .RepoDigests 0}}' "${image}")"+ digest="${repo_digest##*@}"+ fi++ if [[ "${digest}" != sha256:* ]]; then+ echo "Error: could not resolve a sha256 digest for ${image} (got '${digest}')." >&2+ exit 1+ fi++ echo "${repo}@${digest}"+}++build_ateom_image() {+ if [[ -n "${ATEOM_IMAGE:-}" ]]; then+ echo "${ATEOM_IMAGE}"+ return+ fi+ if [[ -z "${KO_DOCKER_REPO:-}" ]]; then+ echo "Error: KO_DOCKER_REPO environment variable must be set" >&2+ exit 1+ fi++ # Resolve the substrate source for the version AX is pinned to in go.mod.+ go mod download github.com/agent-substrate/substrate+ local sub_dir ateom_ref+ sub_dir="$(go list -m -f '{{.Dir}}' github.com/agent-substrate/substrate)"+ if [[ -z "${sub_dir}" ]]; then+ echo "Error: could not locate the substrate module (go list -m)." >&2+ exit 1+ fi++ log_step "build_ateom_image (from ${sub_dir})" >&2+ ateom_ref="$(cd "${sub_dir}" && KO_DOCKER_REPO="${KO_DOCKER_REPO}" GOFLAGS="" ko build --platform=linux/amd64 -B ./cmd/ateom-gvisor)"++ if [[ "${ateom_ref}" != *@sha256:* ]]; then+ echo "Error: ko did not return a digest-pinned ateom image (got '${ateom_ref}')." >&2+ exit 1+ fi+ echo "${ateom_ref}"}deploy_ax_server() {@@ -65,26 +199,61 @@ deploy_ax_server() {echo "Using GCS Bucket: ${BUCKET_NAME}"- # Render template and apply with ko- sed -e "s|\${GEMINI_API_KEY}|${GEMINI_API_KEY}|g" \+ # Build and push the images, capturing their digest-pinned references.+ local ax_image ateom_image+ ax_image=$(build_ax_image)+ ateom_image=$(build_ateom_image)++ # Resolve a stable Postgres password for the event log.+ local pg_password="${POSTGRES_PASSWORD:-}"+ local existing_pw+ existing_pw="$(run_kubectl -n ax get secret ax-eventlog-postgres -o go-template='{{.data.password | base64decode}}' 2>/dev/null || true)"+ if [[ -n "${existing_pw}" ]]; then+ pg_password="${existing_pw}"+ elif [[ -z "${pg_password}" ]]; then+ pg_password="$(openssl rand -hex 16)"+ fi++ # Render the manifest and apply it.+ if ! sed -e "s|\${GEMINI_API_KEY}|${GEMINI_API_KEY}|g" \-e "s|\${BUCKET_NAME}|${BUCKET_NAME}|g" \- manifests/ax-deployment.yaml.tmpl \- | run_ko -f -+ -e "s|\${AX_IMAGE}|${ax_image}|g" \+ -e "s|\${ATEOM_IMAGE}|${ateom_image}|g" \+ -e "s|\${POSTGRES_PASSWORD}|${pg_password}|g" \+ manifests/ax-deployment.yaml \+ | run_kubectl apply -f -; then+ echo >&2+ echo "Error: cluster rejected the manifest. An \"unknown field\" error usually means the" >&2+ echo "cluster's substrate is incompatible with AX's go.mod pin — see" >&2+ echo "manifests/README.md (\"Substrate compatibility\")." >&2+ exit 1+ fi- # Apply service- run_kubectl apply -f manifests/ax-service.yaml+ # Wait for the event-log Postgres to be ready before ax-server relies on it.+ log_step "wait for statefulset/ax-eventlog-postgres to be ready"+ wait_with_spinner "waiting for postgres (timeout ${AX_WAIT_TIMEOUT:-5m})" \+ run_kubectl -n ax rollout status statefulset/ax-eventlog-postgres \+ --timeout="${AX_WAIT_TIMEOUT:-5m}"++ # Wait for the antigravity ActorTemplate's golden snapshot to be ready.+ log_step "wait for actortemplate/ax-harness-template to be Ready"+ wait_with_spinner "waiting for golden snapshot (timeout ${AX_WAIT_TIMEOUT:-5m})" \+ run_kubectl wait --for=condition=Ready actortemplate/ax-harness-template \+ -n ax --timeout="${AX_WAIT_TIMEOUT:-5m}"}+# delete_ax_server removes the AX server and harness resources but preserves the+# event-log database: it leaves the namespace and the Postgres subsystem+# (Service/Secret/StatefulSet and its PVC) intact so a later redeploy reuses the+# existing data.delete_ax_server() {log_step "delete_ax_server"- # Delete resources using a dummy key and bucket so credentials aren't required for deletion- sed -e "s|\${GEMINI_API_KEY}|dummy-key|g" \- -e "s|\${BUCKET_NAME}|dummy-bucket|g" \- manifests/ax-deployment.yaml.tmpl \- | run_kubectl delete --ignore-not-found -f --- run_kubectl delete --ignore-not-found -f manifests/ax-service.yaml+ run_kubectl -n ax delete --ignore-not-found \+ replicaset/ax-server \+ configmap/ax-server-config \+ actortemplate/ax-harness-template \+ workerpool/ax-harness-workerpool}if [ "$#" -eq 0 ]; thendiff --git a/hack/run-antigravity-streaming.sh b/hack/run-antigravity-streaming.shdeleted file mode 100755index 7e80428..0000000--- a/hack/run-antigravity-streaming.sh+++ /dev/null@@ -1,74 +0,0 @@-#!/bin/bash-# Copyright 2026 Google LLC-#-# Licensed under the Apache License, Version 2.0 (the "License");-# you may not use this file except in compliance with the License.-# You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--set -e--# Check if GEMINI_API_KEY is set-if [ -z "$GEMINI_API_KEY" ]; then- echo "ERROR: GEMINI_API_KEY environment variable is not set."- echo "Please set it using: export GEMINI_API_KEY=\"your-key\""- exit 1-fi--PORT=50053-ADDRESS="localhost:$PORT"-AGENT_FILE="examples/antigravity_agent/agent.py"--# 1. Start Python gRPC server in the background-echo "Starting Python gRPC Harness Server on port $PORT..."-PYTHONPATH=python:. .venv/bin/python -m python.antigravity.harness_server --agent_file "$AGENT_FILE" --port "$PORT" > /tmp/antigravity_harness.log 2>&1 &-SERVER_PID=$!--# Register trap to ensure server is killed on script exit-cleanup() {- echo "Cleaning up: killing Python server (PID: $SERVER_PID)..."- kill "$SERVER_PID" || true- wait "$SERVER_PID" 2>/dev/null || true- echo "Cleanup complete!"-}-trap cleanup EXIT--# 2. Wait for the Python server to be healthy-echo "Waiting for Python server to become healthy..."-MAX_ATTEMPTS=30-ATTEMPT=1-HEALTHY=false--while [ $ATTEMPT -le $MAX_ATTEMPTS ]; do- # We can check if the port is open using nc (netcat)- if nc -z localhost "$PORT"; then- HEALTHY=true- break- fi- sleep 0.2- ATTEMPT=$((ATTEMPT + 1))-done--if [ "$HEALTHY" = false ]; then- echo "ERROR: Python server failed to start within 6 seconds."- echo "Server logs (/tmp/antigravity_harness.log):"- cat /tmp/antigravity_harness.log- exit 1-fi-echo "Python server is active!"--# 3. Build and run the Go E2E V2 demonstration-echo "Building e2e..."-/opt/homebrew/bin/go build -o bin/e2e ./cmd/e2e--echo "Executing E2E Demo with Antigravity gRPC Harness..."-bin/e2e--echo "Success!"diff --git a/internal/hack/install-ax.sh b/internal/hack/install-ax.shdeleted file mode 100755index 4cf59a3..0000000--- a/internal/hack/install-ax.sh+++ /dev/null@@ -1,286 +0,0 @@-#!/bin/bash-# Copyright 2026 Google LLC-#-# Licensed under the Apache License, Version 2.0 (the "License");-# you may not use this file except in compliance with the License.-# You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--set -e-set -u-set -o pipefail--ROOT=$(git rev-parse --show-toplevel)-cd "${ROOT}"--if [[ -n "${PROJECT_ID:-}" ]]; then- export KO_DOCKER_REPO="gcr.io/${PROJECT_ID}"- echo "Using KO_DOCKER_REPO: ${KO_DOCKER_REPO}" >&2-fi--export KO_DEFAULTPLATFORMS="${KO_DEFAULTPLATFORMS:-linux/amd64}"--# ANSI color codes for prettier output-COLOR_CYAN='\033[1;36m'-COLOR_RESET='\033[0m'--function log_step() {- local step_name="$1"- echo -e "${COLOR_CYAN}[step]: ${step_name}${COLOR_RESET}"-}--# wait_with_spinner runs a blocking command while showing a simple spinner on an-# interactive terminal, then reports "done"/"failed" and returns the command's-# exit status.-wait_with_spinner() {- local msg="$1"; shift- if [[ ! -t 2 ]]; then- "$@"- return $?- fi-- local out; out="$(mktemp)"- "$@" >"${out}" 2>&1 &- local pid=$! frames='|/-\' i=0- while kill -0 "${pid}" 2>/dev/null; do- i=$(( (i + 1) % ${#frames} ))- printf '\r%s %s' "${frames:${i}:1}" "${msg}" >&2- sleep 0.1- done-- local status=0- wait "${pid}" || status=$?- if [[ "${status}" -eq 0 ]]; then- printf '\r\033[K%s... done\n' "${msg}" >&2- else- printf '\r\033[K%s... failed\n' "${msg}" >&2- cat "${out}" >&2- fi- rm -f "${out}"- return "${status}"-}--function usage() {- echo "Usage: $0 [options]"- echo ""- echo "Options:"- echo " --deploy-ax-server Build images and deploy AX server and components"- echo " --delete-ax-server Delete AX server and components, preserving the event-log database"- echo " -h, --help Show this help message"-}--run_kubectl() {- kubectl \- ${KUBECTL_CONTEXT:+--context=${KUBECTL_CONTEXT}} \- "$@"-}--# detect_container_engine selects the OCI build/push tool when CONTAINER_ENGINE-# is not set explicitly. It prefers a *working* docker (daemon reachable), then a-# working podman, so a docker CLI installed without a running daemon does not-# shadow a working podman. As a last resort it picks whichever CLI exists so the-# build step can surface an actionable daemon error.-detect_container_engine() {- if [[ -n "${CONTAINER_ENGINE:-}" ]]; then- return # Respect an explicit override; do not second-guess it.- fi- if docker info >/dev/null 2>&1; then- CONTAINER_ENGINE=docker- elif podman info >/dev/null 2>&1; then- CONTAINER_ENGINE=podman- elif command -v docker >/dev/null 2>&1; then- CONTAINER_ENGINE=docker- elif command -v podman >/dev/null 2>&1; then- CONTAINER_ENGINE=podman- else- CONTAINER_ENGINE=docker- fi-}--# build_ax_image builds and pushes the comprehensive ax image (the Go ax binary-# plus the Antigravity Python sidecar) and echoes its digest-pinned reference on-# stdout. Requires KO_DOCKER_REPO and a container engine.-build_ax_image() {- if [[ -z "${KO_DOCKER_REPO:-}" ]]; then- echo "Error: KO_DOCKER_REPO environment variable must be set" >&2- exit 1- fi- detect_container_engine- if ! command -v "${CONTAINER_ENGINE}" >/dev/null 2>&1; then- echo "Error: container engine '${CONTAINER_ENGINE}' not found in PATH." >&2- echo "Install it or set CONTAINER_ENGINE to an available builder." >&2- exit 1- fi-- local repo tag image digest- repo="${KO_DOCKER_REPO}/ax"- tag="$(git rev-parse --short HEAD)"- image="${repo}:${tag}"-- log_step "build_ax_image -> ${image}" >&2- "${CONTAINER_ENGINE}" build \- --platform linux/amd64 \- -f cmd/ax/Dockerfile \- -t "${image}" \- . 2>&1 \- | awk '{ sub(/^\[[0-9]+\/[0-9]+\] /, ""); print; fflush() }' >&2-- # Push the readable tag, then resolve the pushed manifest digest so the- # ActorTemplate can reference the image by digest (snapshot-safe).- if [[ "${CONTAINER_ENGINE}" == *podman* ]]; then- local digestfile- digestfile="$(mktemp)"- "${CONTAINER_ENGINE}" push --digestfile="${digestfile}" "${image}" >&2- digest="$(cat "${digestfile}")"- rm -f "${digestfile}"- else- "${CONTAINER_ENGINE}" push "${image}" >&2- local repo_digest- repo_digest="$("${CONTAINER_ENGINE}" image inspect --format '{{index .RepoDigests 0}}' "${image}")"- digest="${repo_digest##*@}"- fi-- if [[ "${digest}" != sha256:* ]]; then- echo "Error: could not resolve a sha256 digest for ${image} (got '${digest}')." >&2- exit 1- fi-- echo "${repo}@${digest}"-}--build_ateom_image() {- if [[ -n "${ATEOM_IMAGE:-}" ]]; then- echo "${ATEOM_IMAGE}"- return- fi- if [[ -z "${KO_DOCKER_REPO:-}" ]]; then- echo "Error: KO_DOCKER_REPO environment variable must be set" >&2- exit 1- fi-- # Resolve the substrate source for the version AX is pinned to in go.mod.- go mod download github.com/agent-substrate/substrate- local sub_dir ateom_ref- sub_dir="$(go list -m -f '{{.Dir}}' github.com/agent-substrate/substrate)"- if [[ -z "${sub_dir}" ]]; then- echo "Error: could not locate the substrate module (go list -m)." >&2- exit 1- fi-- log_step "build_ateom_image (from ${sub_dir})" >&2- ateom_ref="$(cd "${sub_dir}" && KO_DOCKER_REPO="${KO_DOCKER_REPO}" GOFLAGS="" ko build --platform=linux/amd64 -B ./cmd/ateom-gvisor)"-- if [[ "${ateom_ref}" != *@sha256:* ]]; then- echo "Error: ko did not return a digest-pinned ateom image (got '${ateom_ref}')." >&2- exit 1- fi- echo "${ateom_ref}"-}--deploy_ax_server() {- log_step "deploy_ax_server"-- # Check dependencies- if [[ -z "${GEMINI_API_KEY:-}" ]]; then- echo "Error: GEMINI_API_KEY environment variable must be set" >&2- exit 1- fi- if [[ -z "${BUCKET_NAME:-}" ]]; then- echo "Error: BUCKET_NAME environment variable must be set" >&2- exit 1- fi-- echo "Using GCS Bucket: ${BUCKET_NAME}"-- # Build and push the images, capturing their digest-pinned references.- local ax_image ateom_image- ax_image=$(build_ax_image)- ateom_image=$(build_ateom_image)-- # Resolve a stable Postgres password for the event log.- local pg_password="${POSTGRES_PASSWORD:-}"- local existing_pw- existing_pw="$(run_kubectl -n ax get secret ax-eventlog-postgres -o go-template='{{.data.password | base64decode}}' 2>/dev/null || true)"- if [[ -n "${existing_pw}" ]]; then- pg_password="${existing_pw}"- elif [[ -z "${pg_password}" ]]; then- pg_password="$(openssl rand -hex 16)"- fi-- # Render the manifest and apply it.- if ! sed -e "s|\${GEMINI_API_KEY}|${GEMINI_API_KEY}|g" \- -e "s|\${BUCKET_NAME}|${BUCKET_NAME}|g" \- -e "s|\${AX_IMAGE}|${ax_image}|g" \- -e "s|\${ATEOM_IMAGE}|${ateom_image}|g" \- -e "s|\${POSTGRES_PASSWORD}|${pg_password}|g" \- internal/manifests/ax-deployment2.yaml \- | run_kubectl apply -f -; then- echo >&2- echo "Error: cluster rejected the manifest. An \"unknown field\" error usually means the" >&2- echo "cluster's substrate is incompatible with AX's go.mod pin — see" >&2- echo "internal/manifests/README.md (\"Substrate compatibility\")." >&2- exit 1- fi-- # Wait for the event-log Postgres to be ready before ax-server relies on it.- log_step "wait for statefulset/ax-eventlog-postgres to be ready"- wait_with_spinner "waiting for postgres (timeout ${AX_WAIT_TIMEOUT:-5m})" \- run_kubectl -n ax rollout status statefulset/ax-eventlog-postgres \- --timeout="${AX_WAIT_TIMEOUT:-5m}"-- # Wait for the antigravity ActorTemplate's golden snapshot to be ready.- log_step "wait for actortemplate/ax-harness-template to be Ready"- wait_with_spinner "waiting for golden snapshot (timeout ${AX_WAIT_TIMEOUT:-5m})" \- run_kubectl wait --for=condition=Ready actortemplate/ax-harness-template \- -n ax --timeout="${AX_WAIT_TIMEOUT:-5m}"-}--# delete_ax_server removes the AX server and harness resources but preserves the-# event-log database: it leaves the namespace and the Postgres subsystem-# (Service/Secret/StatefulSet and its PVC) intact so a later redeploy reuses the-# existing data.-delete_ax_server() {- log_step "delete_ax_server"-- run_kubectl -n ax delete --ignore-not-found \- replicaset/ax-server \- configmap/ax-server-config \- actortemplate/ax-harness-template \- workerpool/ax-harness-workerpool-}--if [ "$#" -eq 0 ]; then- usage- exit 1-fi--# If -h or --help appears anywhere in the command line, print the usage and exit.-for arg in "$@"; do- case "$arg" in- -h|--help)- usage- exit 0- ;;- esac-done--while [[ "$#" -gt 0 ]]; do- case $1 in- --deploy-ax-server) deploy_ax_server ;;- --delete-ax-server) delete_ax_server ;;- *)- echo "Error: unknown option: $1" >&2- echo ""- usage- exit 1- ;;- esac- shift-donediff --git a/internal/manifests/README.md b/internal/manifests/README.mddeleted file mode 100644index 4404a08..0000000--- a/internal/manifests/README.md+++ /dev/null@@ -1,149 +0,0 @@-# AX Harness Deployment on Kubernetes--> [!WARNING]-> 🚧 **The `harness` deployment path is under active development.**->-> This path is experimental and incomplete: the manifests, scripts, and-> runtime behavior will change and may break without notice.--This directory contains Kubernetes manifests and configurations to deploy-and verify the AX `harness` configuration path on Kubernetes using Agent-Substrate.--The target Kubernetes cluster is assumed to have-[Agent Substrate](https://github.com/agent-substrate/substrate) installed.--### Substrate compatibility--AX pins [Agent Substrate](https://github.com/agent-substrate/substrate) in-`go.mod`, and the **ateom** worker image is built from that pinned version. The-cluster's substrate **CRDs and control plane** must be compatible with the-manifest AX applies.--When installing substrate, keep three things aligned: the ax `go.mod` pin = your-local substrate checkout = the cluster's installed substrate.--```bash-# Get AX's pinned substrate commit:-commit=$(go list -m -f '{{.Version}}' github.com/agent-substrate/substrate | sed 's/.*-//')-echo "$commit" # e.g. fe93d160a1df--# Check it out on a normal branch in your substrate clone (avoids a detached HEAD):-git -C <substrate> fetch origin-git -C <substrate> switch -C ax-pinned "$commit"-```-------## 🚀 Deploying to Agent Substrate--### 1. Build and Deploy--> [!NOTE]-> Do not manually edit `internal/manifests/ax-deployment2.yaml`. The installation script automatically injects your `${GEMINI_API_KEY}`, `${BUCKET_NAME}`, and the built `${AX_IMAGE}` and `${ATEOM_IMAGE}` references during deployment.--The installation script builds the required images and applies the resolved-manifests to your cluster:--- the comprehensive **ax** image, built from `cmd/ax/Dockerfile` with Docker or- Podman (the `harness`-tagged Go `ax` binary plus the Antigravity Python sidecar- on a Debian base). The ax-server runs `ax serve`; the harness actor runs- `ax harness`, which forks the sidecar;-- the **ateom-gvisor** worker image, built with `ko` from the `go.mod` pinned- substrate module.--#### Build prerequisites--The ax image bundles the antigravity SDK and its `localharness` binary,-installed from PyPI at build time. The image targets the cluster's **linux/amd64**-nodes and is built with `--platform linux/amd64`.--You also need a container engine to build and push the ax image. The script-auto-detects one (preferring a **running** docker, then podman); force a choice-with `CONTAINER_ENGINE=docker` or `CONTAINER_ENGINE=podman`:--- **Docker** — Docker Desktop (macOS; cross-builds linux/amd64 via emulation) or- Docker Engine (Linux; native).-- **Podman** — on macOS, start a machine first with `podman machine init &&- podman machine start` (cross-builds linux/amd64 via emulation); on Linux it- runs natively (podman/buildah >= 4.0).--#### Registry authentication--`PROJECT_ID` sets `KO_DOCKER_REPO=gcr.io/$PROJECT_ID`. The deploy pushes two-images — the **ax** image (via your container engine) and the **ateom** image-(via `ko`) — and both authenticate through the gcloud credential helper:--```bash-gcloud auth login # authenticate gcloud-gcloud auth configure-docker # set up the gcr.io credential helper-```--#### Deploy--```bash-export PROJECT_ID="ax-substrate" # Your GCP project ID-export GEMINI_API_KEY="your-api-key"-export BUCKET_NAME="snapshot-substrate-test-$PROJECT_ID"--./internal/hack/install-ax.sh --deploy-ax-server-```--### 2. Port-Forward Services--The `harness` path has no Envoy router or `Service`; connect directly to the `ax-server` `ReplicaSet`:--```bash-# Port-forward the ax-server ReplicaSet-kubectl port-forward -n ax rs/ax-server 8494:8494-```--### 3. Test End-to-End--Run an execution targeting the port-forwarded server. The default `antigravity`-harness serves the example `examples/antigravity_agent/agent.py`, which exposes-a `get_weather` tool.--```bash-ax exec --server=localhost:8494 --input="what's the weather in NYC?"-```--The server should respond with something like:-```text-Conversation: fb344a18-3720-4c4f-8a6e-2ce34db975b3--⏺ what's the weather in NYC?--The weather in New York is sunny with a temperature of 25 degrees Celsius (77 degrees Fahrenheit).-```-*The request is served by the antigravity harness actor running on Substrate.*--## 🧹 How to Uninstall--To remove the AX server and its components, run:--```bash-./internal/hack/install-ax.sh --delete-ax-server-```--> [!NOTE]-> The event-log database is preserved by default. If you want to-> delete everything including the data, after the command above, be careful and-> run:->-> ```bash-> kubectl delete namespace ax-> ```-------## 🛠️ Inspection & Diagnostics--Use the **`kubectl ate`** CLI tool to inspect the live states of-active actors and allocated standby worker pool instances:--```bash-kubectl ate get actors--kubectl ate get workers-```diff --git a/manifests/README.md b/manifests/README.mdindex acbbca5..4404a08 100644--- a/manifests/README.md+++ b/manifests/README.md@@ -1,66 +1,140 @@-# AX Deployment on Kubernetes+# AX Harness Deployment on Kubernetes++> [!WARNING]+> 🚧 **The `harness` deployment path is under active development.**+>+> This path is experimental and incomplete: the manifests, scripts, and+> runtime behavior will change and may break without notice.This directory contains Kubernetes manifests and configurations to deploy-and verify the AX on Kubernetes using Agent Substrate.+and verify the AX `harness` configuration path on Kubernetes using Agent+Substrate.The target Kubernetes cluster is assumed to have[Agent Substrate](https://github.com/agent-substrate/substrate) installed.+### Substrate compatibility++AX pins [Agent Substrate](https://github.com/agent-substrate/substrate) in+`go.mod`, and the **ateom** worker image is built from that pinned version. The+cluster's substrate **CRDs and control plane** must be compatible with the+manifest AX applies.++When installing substrate, keep three things aligned: the ax `go.mod` pin = your+local substrate checkout = the cluster's installed substrate.++```bash+# Get AX's pinned substrate commit:+commit=$(go list -m -f '{{.Version}}' github.com/agent-substrate/substrate | sed 's/.*-//')+echo "$commit" # e.g. fe93d160a1df++# Check it out on a normal branch in your substrate clone (avoids a detached HEAD):+git -C <substrate> fetch origin+git -C <substrate> switch -C ax-pinned "$commit"+```+---## 🚀 Deploying to Agent Substrate-This option deploys AX as isolated, warm-standby actors. Workers are live-snapshotted on boot and instantly restored from GCS when a new conversation starts. Actors are automatically suspended when conversations stop emitting all of their outputs.-### 1. Build and Deploy> [!NOTE]-> Do not manually edit `manifests/ax-deployment.yaml.tmpl`. The installation script automatically injects your `${GEMINI_API_KEY}` and `${BUCKET_NAME}` environment variables during deployment.+> Do not manually edit `internal/manifests/ax-deployment2.yaml`. The installation script automatically injects your `${GEMINI_API_KEY}`, `${BUCKET_NAME}`, and the built `${AX_IMAGE}` and `${ATEOM_IMAGE}` references during deployment.++The installation script builds the required images and applies the resolved+manifests to your cluster:++- the comprehensive **ax** image, built from `cmd/ax/Dockerfile` with Docker or+ Podman (the `harness`-tagged Go `ax` binary plus the Antigravity Python sidecar+ on a Debian base). The ax-server runs `ax serve`; the harness actor runs+ `ax harness`, which forks the sidecar;+- the **ateom-gvisor** worker image, built with `ko` from the `go.mod` pinned+ substrate module.++#### Build prerequisites++The ax image bundles the antigravity SDK and its `localharness` binary,+installed from PyPI at build time. The image targets the cluster's **linux/amd64**+nodes and is built with `--platform linux/amd64`.-Use the core installation script to build the images and apply the resolved manifests to your cluster:+You also need a container engine to build and push the ax image. The script+auto-detects one (preferring a **running** docker, then podman); force a choice+with `CONTAINER_ENGINE=docker` or `CONTAINER_ENGINE=podman`:++- **Docker** — Docker Desktop (macOS; cross-builds linux/amd64 via emulation) or+ Docker Engine (Linux; native).+- **Podman** — on macOS, start a machine first with `podman machine init &&+ podman machine start` (cross-builds linux/amd64 via emulation); on Linux it+ runs natively (podman/buildah >= 4.0).++#### Registry authentication++`PROJECT_ID` sets `KO_DOCKER_REPO=gcr.io/$PROJECT_ID`. The deploy pushes two+images — the **ax** image (via your container engine) and the **ateom** image+(via `ko`) — and both authenticate through the gcloud credential helper:```bash-export GEMINI_API_KEY="your-api-key"-export BUCKET_NAME="your-gcs-bucket"-./hack/install-ax.sh --deploy-ax-server+gcloud auth login # authenticate gcloud+gcloud auth configure-docker # set up the gcr.io credential helper```-This command will:-- Build the AX server and proxy images using `ko`.-- Create the `ax` namespace.-- Create the `WorkerPool` and `ActorTemplate` for AX.+#### Deploy-Wait until the template is ready:```bash-kubectl wait --for=condition=Ready actortemplate/ax-template -n ax --timeout=5m+export PROJECT_ID="ax-substrate" # Your GCP project ID+export GEMINI_API_KEY="your-api-key"+export BUCKET_NAME="snapshot-substrate-test-$PROJECT_ID"++./internal/hack/install-ax.sh --deploy-ax-server```### 2. Port-Forward Services-To interact with the router locally:+The `harness` path has no Envoy router or `Service`; connect directly to the `ax-server` `ReplicaSet`:```bash-# Port-forward the Ax Router-kubectl port-forward -n ax svc/ax-router 8001:443+# Port-forward the ax-server ReplicaSet+kubectl port-forward -n ax rs/ax-server 8494:8494```### 3. Test End-to-End-Run an execution targeting the deployed server using the external IP:+Run an execution targeting the port-forwarded server. The default `antigravity`+harness serves the example `examples/antigravity_agent/agent.py`, which exposes+a `get_weather` tool.```bash-ax exec --server=localhost:8001 --input="hello"+ax exec --server=localhost:8494 --input="what's the weather in NYC?"```-*Envoy will intercept the request and route traffic using the conversation ID.*++The server should respond with something like:+```text+Conversation: fb344a18-3720-4c4f-8a6e-2ce34db975b3++⏺ what's the weather in NYC?++The weather in New York is sunny with a temperature of 25 degrees Celsius (77 degrees Fahrenheit).+```+*The request is served by the antigravity harness actor running on Substrate.*## 🧹 How to Uninstall-To remove AX resources from your cluster, run:+To remove the AX server and its components, run:```bash-./hack/install-ax.sh --delete-ax-server+./internal/hack/install-ax.sh --delete-ax-server```+> [!NOTE]+> The event-log database is preserved by default. If you want to+> delete everything including the data, after the command above, be careful and+> run:+>+> ```bash+> kubectl delete namespace ax+> ```+---## 🛠️ Inspection & Diagnosticsdiff --git a/internal/manifests/ax-deployment2.yaml b/manifests/ax-deployment.yamlsimilarity index 100%rename from internal/manifests/ax-deployment2.yamlrename to manifests/ax-deployment.yamldiff --git a/manifests/ax-deployment.yaml.tmpl b/manifests/ax-deployment.yaml.tmpldeleted file mode 100644index ed9796e..0000000--- a/manifests/ax-deployment.yaml.tmpl+++ /dev/null@@ -1,227 +0,0 @@-# Copyright 2026 Google LLC-#-# Licensed under the Apache License, Version 2.0 (the "License");-# you may not use this file except in compliance with the License.-# You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--apiVersion: v1-kind: Namespace-metadata:- name: ax-----apiVersion: ate.dev/v1alpha1-kind: WorkerPool-metadata:- name: ax-workerpool- namespace: ax-spec:- replicas: 5- ateomImage: ko://github.com/agent-substrate/substrate/cmd/ateom-gvisor-----apiVersion: ate.dev/v1alpha1-kind: ActorTemplate-metadata:- name: ax-template- namespace: ax-spec:- workerPoolRef:- name: ax-workerpool- namespace: ax- runsc:- amd64:- url: "gs://gvisor/releases/nightly/2026-05-19/x86_64/runsc"- sha256Hash: "a397be1abc2420d26bce6c70e6e2ff96c73aaaab929756c56f5e2089ea842b63"- arm64:- url: "gs://gvisor/releases/nightly/2026-05-19/aarch64/runsc"- sha256Hash: "1ba2366ae2efceba166046f51a4104f9261c9cb72c6db8f5b3fe2dc57dea86b9"- pauseImage: "gcr.io/gke-release/pause@sha256:bcbd57ba5653580ec647b16d8163cdd1112df3609129b01f912a8032e48265da"- containers:- - name: "ax"- image: ko://github.com/google/ax/cmd/ax- command: ["/ko-app/ax", "serve"]- ports:- - containerPort: 8494- env:- - name: GEMINI_API_KEY- value: "${GEMINI_API_KEY}"- - name: AX_SUBSTRATE- value: "1"- snapshotsConfig:- location: gs://${BUCKET_NAME}/ax/-----apiVersion: v1-kind: ServiceAccount-metadata:- name: ax-router- namespace: ax-----apiVersion: v1-kind: ConfigMap-metadata:- name: ax-router-config- namespace: ax-data:- envoy.yaml: |- admin:- address:- socket_address:- address: 0.0.0.0- port_value: 9901- static_resources:- listeners:- - name: listener_0- address:- socket_address:- address: 0.0.0.0- port_value: 8080- filter_chains:- - filters:- - name: envoy.filters.network.http_connection_manager- typed_config:- "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager- stat_prefix: ingress_http- stream_idle_timeout: 0s- generate_request_id: true- access_log:- - name: envoy.access_loggers.stdout- typed_config:- "@type": type.googleapis.com/envoy.extensions.access_loggers.stream.v3.StdoutAccessLog- http_filters:- - name: envoy.filters.http.ext_authz- typed_config:- "@type": type.googleapis.com/envoy.extensions.filters.http.ext_authz.v3.ExtAuthz- grpc_service:- envoy_grpc:- cluster_name: epp-cluster- timeout: 10s- transport_api_version: V3- with_request_body:- max_request_bytes: 1048576- allow_partial_message: true- pack_as_bytes: true- failure_mode_allow: false- - name: envoy.filters.http.dynamic_forward_proxy- typed_config:- "@type": type.googleapis.com/envoy.extensions.filters.http.dynamic_forward_proxy.v3.FilterConfig- dns_cache_config:- name: dynamic_forward_proxy_cache_config- dns_lookup_family: V4_ONLY- - name: envoy.filters.http.router- typed_config:- "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router- route_config:- name: ax-route- virtual_hosts:- - name: ax-virtual-host- domains: ["*"]- routes:- - match:- prefix: "/"- route:- cluster: dynamic_forward_proxy_cluster- timeout: 0s- idle_timeout: 0s # Support uninterrupted persistent stream socket bounds smoothly- typed_per_filter_config:- envoy.filters.http.dynamic_forward_proxy:- "@type": type.googleapis.com/envoy.extensions.filters.http.dynamic_forward_proxy.v3.PerRouteConfig- host_rewrite_header: x-backend-ip- clusters:- - name: dynamic_forward_proxy_cluster- lb_policy: CLUSTER_PROVIDED- cluster_type:- name: envoy.clusters.dynamic_forward_proxy- typed_config:- "@type": type.googleapis.com/envoy.extensions.clusters.dynamic_forward_proxy.v3.ClusterConfig- dns_cache_config:- name: dynamic_forward_proxy_cache_config- dns_lookup_family: V4_ONLY- allow_insecure_cluster_options: true- typed_extension_protocol_options:- envoy.extensions.upstreams.http.v3.HttpProtocolOptions:- "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions- explicit_http_config:- http2_protocol_options: {}- - name: epp-cluster- connect_timeout: 0.25s- type: STATIC- typed_extension_protocol_options:- envoy.extensions.upstreams.http.v3.HttpProtocolOptions:- "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions- explicit_http_config:- http2_protocol_options: {}- load_assignment:- cluster_name: epp-cluster- endpoints:- - lb_endpoints:- - endpoint:- address:- socket_address:- address: 127.0.0.1- port_value: 50051-----apiVersion: apps/v1-kind: Deployment-metadata:- name: ax-router- namespace: ax- labels:- app: ax-router-spec:- replicas: 1- selector:- matchLabels:- app: ax-router- template:- metadata:- labels:- app: ax-router- spec:- hostNetwork: true- dnsPolicy: ClusterFirstWithHostNet- serviceAccount: ax-router- containers:- - name: envoy- image: envoyproxy/envoy:v1.30-latest- command:- - /usr/local/bin/envoy- - -c- - /etc/envoy/envoy.yaml- - --component-log-level- - upstream:debug,router:debug,ext_authz:debug- ports:- - containerPort: 8080- name: http- - containerPort: 9901- name: admin- volumeMounts:- - name: envoy-config- mountPath: /etc/envoy- - name: axepp- image: ko://github.com/google/ax/cmd/axepp- args:- - "--grpc-server-cred-bundle=/run/servicedns.podcert.ate.dev/credential-bundle.pem"- ports:- - containerPort: 50051- name: grpc- volumeMounts:- - name: "servicedns"- mountPath: "/run/servicedns.podcert.ate.dev"- volumes:- - name: envoy-config- configMap:- name: ax-router-config- - name: "servicedns"- projected:- sources:- - podCertificate:- signerName: servicedns.podcert.ate.dev/identity- keyType: ECDSAP256- credentialBundlePath: credential-bundle.pemdiff --git a/manifests/ax-service.yaml b/manifests/ax-service.yamldeleted file mode 100644index 9fbc904..0000000--- a/manifests/ax-service.yaml+++ /dev/null@@ -1,36 +0,0 @@-# Copyright 2026 Google LLC-#-# Licensed under the Apache License, Version 2.0 (the "License");-# you may not use this file except in compliance with the License.-# You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--apiVersion: v1-kind: Service-metadata:- name: ax-router- namespace: ax- annotations:- cloud.google.com/backend-config: '{"default": "ax-backend-config"}'-spec:- type: ClusterIP- selector:- app: ax-router- ports:- - port: 443- targetPort: 8080-----apiVersion: cloud.google.com/v1-kind: BackendConfig-metadata:- name: ax-backend-config- namespace: ax-spec:- timeoutSec: 3600 # an hourdiff --git a/manifests/ax-shell.yaml b/manifests/ax-shell.yamldeleted file mode 100644index 337f54e..0000000--- a/manifests/ax-shell.yaml+++ /dev/null@@ -1,33 +0,0 @@-# Copyright 2026 Google LLC-#-# Licensed under the Apache License, Version 2.0 (the "License");-# you may not use this file except in compliance with the License.-# You may obtain a copy of the License at-#-# http://www.apache.org/licenses/LICENSE-2.0-#-# Unless required by applicable law or agreed to in writing, software-# distributed under the License is distributed on an "AS IS" BASIS,-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.-# See the License for the specific language governing permissions and-# limitations under the License.--apiVersion: v1-kind: Pod-metadata:- name: ax-shell- namespace: ax-spec:- volumes:- - name: shared-data- emptyDir: {}- containers:- - name: ax- image: gcr.io/ax-container-images/ax-shell/ax:latest- command: ["/bin/sh"]- args: ["-c", "while true; do sleep 3600; done"]- volumeMounts:- - name: shared-data- mountPath: /data- hostNetwork: true- dnsPolicy: Default