Skip to content

feat(antigravity): add ax-harness launcher with runtime install fallback - #8

Merged
Lukeluds merged 3 commits into
agentexecutor:mainfrom
Lukeluds:feat/antigravity-harness
Nov 18, 2026
Merged

Lukeluds merged 3 commits into
agentexecutor:mainfrom
Lukeluds:feat/antigravity-harness

Conversation

@Lukeluds

@Lukeluds Lukeluds commented Nov 13, 2026 •

Copy link
Copy Markdown
Collaborator

Adds agents/antigravity/{ax-harness,install-agy.sh,test_harness.sh,README.md} and .github/workflows/antigravity.yaml for running headless Antigravity CLI (agy) tasks under the AX in-container wrapper contract:

  • Reads $AX_GOAL_FILE (exits 2 when empty) and optional $AX_CONFIG_FILE (spec.config JSON), mapping camelCase keys to sorted agy --kebab-case CLI flags.
  • Prints agy's answer to stdout/logs by default, and optionally also writes spec.config.outputFile while preserving agy's exit code.
  • Configures headless defaults (--dangerously-skip-permissions, --add-dir=<cwd>), Substrate HTTPS MITM CA trust (SSL_CERT_FILE / CURL_CA_BUNDLE when /run/ate/egress-trust-bundle/trust-bundle.pem is mounted), and authentication: automatically passes "modelProvider": "gemini" in --settings when GEMINI_API_KEY is set (with optional GOOGLE_GEMINI_BASE_URL gateway override), or uses Vertex AI ADC when AGY_ADC_AUTH=true.
  • Includes install-agy.sh (version-pinnable Linux amd64/arm64 installer with SHA-512 manifest verification) and runtime-install fallback when agy is missing on PATH.
  • Adds agents/antigravity/test_harness.sh testing flag mapping, auth modes, outputFile, runtime-install fallback, CA trust-bundle wiring, and empty-goal handling.

@Lukeluds
Lukeluds force-pushed the feat/antigravity-harness branch from db89349 to 352eb1f Compare November 16, 2026 23:25
@mayawang

Copy link
Copy Markdown
Collaborator

@Lukeluds sorry these sat, I'm picking up the Antigravity ones (#8–#10) and the Gemini fake today. @MushuEE are you covering Claude Code (#3–#5), or should I take those too?

@mayawang mayawang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Luke, the harness is clean and nothing secret reaches the logs. Before merge: the runtime fallback downloads agy@latest on every container start (and again on every resume, since it lands outside /workspace), and the sha512 comes from the same bucket as the binary. Could the fallback be opt-in with an exact version, and the version + sha512 pinned in the repo? Non-blocking: under the AX runner AX_GOAL_FILE isn't set today, so the harness exits, see #9.

@MushuEE

MushuEE commented Nov 17, 2026

Copy link
Copy Markdown
Contributor

@Lukeluds sorry these sat, I'm picking up the Antigravity ones (#8–#10) and the Gemini fake today. @MushuEE are you covering Claude Code (#3–#5), or should I take those too?

I will review all these as well but I can take CC ones first.

…_CONFIG_FILE servers

Aligns ax-harness with the launcher contract in google/ax#621: the goal
comes from spec.goal.text, the answer is written to AX_OUTPUT_FILE (and
still printed to stdout), and the Workspace's MCP servers are registered
with agy mcp add before the task runs.
…l opt-in

install-agy.sh now pins agy 1.5.10 with each platform's release URL and
SHA-512 in the repo, so the only request is the tarball download and the
checksum no longer comes from the same bucket. Unpinned versions,
including latest, are rejected.

ax-harness installs agy at runtime only when AGY_RUNTIME_INSTALL=true,
into <workspace>/.ax/bin so a resumed sandbox reuses it.
@Lukeluds

Copy link
Copy Markdown
Collaborator Author

Thanks @mayawang ! I addressed these issues:

  • install-agy.sh pins agy 1.5.10 with the linux-x64/linux-arm sha512 in the repo. It only downloads the tarball (no more manifest from the same bucket) and rejects unpinned versions, including latest.
  • The runtime install is opt-in (AGY_RUNTIME_INSTALL=true) and goes to /workspace/.ax/bin, so a resume doesn't download it again. feat(antigravity): add pure Dockerfile and multi-arch build/verify CI #9's CI and preinstall build use the same pin.

AX_GOAL_FILE is covered by google/ax#621. I also updated the harness to that contract: it writes the answer to AX_OUTPUT_FILE and registers AX_MCP_CONFIG_FILE servers via agy mcp add.

Tested with the unit tests and a live Gemini run on KinD. Preinstall vs. runtime install is still open until the runner discussion settles.

@mayawang mayawang left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Luke, the pin plus in-repo sha512 and opt-in install look good, LGTM. Let's keep #9 (shipping agy in the image) on hold until the runner approach Jaana and Aprajita are working on settles.

@MushuEE MushuEE left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks Luke. I checked the harness at 8f9f9aa against the launcher contract on google/ax main (runner/launcher.go): the goal, spec.config, MCP servers and AX_OUTPUT_FILE are all handled, and a bad spec.config fails the task instead of running agy without flags (I ran it locally with a fake agy). Two things, neither blocking this PR:

1. Interactive and long-lived sandboxes (google/ax#632). AX only starts ax-harness for a task that has spec.goal.text and no spec.commands. A task with no goal runs nothing, so that users can attach with ax ssh. The harness is currently the only thing that installs agy and puts .ax/bin on PATH, so:

  • a user who attaches to a task with no goal has no agy at all;
  • a user who attaches after a goal task ran has agy in /workspace/.ax/bin, but not on their PATH.

install-agy.sh is already a separate script, so this is mostly documentation: could the README say that for ax ssh use you run /usr/local/share/ax/install-agy.sh "" /workspace/.ax/bin once? The PATH part belongs in the image, see my comment on #9.

2. State across suspend. Only /workspace survives a suspend. A task that is suspended while agy is still running starts the harness again from scratch on resume, because AX only records that the launcher finished after it exits. Where does agy keep its conversation state? If it is under $HOME, it is lost on suspend, both for that restarted run and for interactive users. Could it be kept under /workspace/.ax, with the harness passing --conversation when a previous run exists? Fine as a follow-up, since the README already notes AX_SESSION_FILE isn't used yet.

@MushuEE

MushuEE commented Nov 18, 2026

Copy link
Copy Markdown
Contributor

Tracking: this is part of #15 (get the Antigravity image ready to publish), under the release epic #12.

@Lukeluds
Lukeluds merged commit 269115e into agentexecutor:main Nov 18, 2026
4 checks passed
aprajitaarora13 added a commit that referenced this pull request Nov 19, 2026
…e output atomically (#25)

Follow up on #8 to persist Antigravity CLI (agy) conversation state
across suspend/resume and multi-turn sessions via AX_SESSION_FILE, and
to write AX_OUTPUT_FILE atomically on exit:

- When AX_SESSION_FILE is non-empty, validate the session ID (rejecting
  path traversal), isolate HOME under <workspace>/.ax/sessions/<id>
  (overridable via AX_SESSION_HOME), and pass --continue when
  conversation state already exists (unless spec.config sets continue
  or conversation).
- Deduplicate AX_OUTPUT_FILE / spec.config.outputFile, tee to per-PID
  temp files, and rename into place on exit.
- Wait on the Python arg-parser process substitution so config errors
  propagate under set -e.
- Add unit tests in agents/antigravity/test_harness.sh and document
  AX_SESSION_FILE in agents/antigravity/README.md.

Part of #15.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants