Skip to content

feat: add Antigravity CLI (agy) support#863

Closed
Joseph19820124 wants to merge 2 commits into
openabdev:mainfrom
Joseph19820124:feat/antigravity-cli-support
Closed

feat: add Antigravity CLI (agy) support#863
Joseph19820124 wants to merge 2 commits into
openabdev:mainfrom
Joseph19820124:feat/antigravity-cli-support

Conversation

@Joseph19820124
Copy link
Copy Markdown
Contributor

Summary

  • Add Dockerfile.antigravity — downloads the native agy binary from Google Storage, supports linux/amd64 and linux/arm64
  • Add commented [agent] block in config.toml.example for agy --acp
  • Add commented antigravity agent example in charts/openab/values.yaml
  • Update AGENTS.md Dockerfile count 7 → 8

Background

Google Antigravity CLI (agy) is Google's terminal-first coding agent, the successor to @google/gemini-cli. It supports ACP via agy --acp and authenticates via Google Sign-In (OAuth — no API key needed).

The binary is distributed as a native pre-compiled binary from Google Storage:

https://storage.googleapis.com/antigravity-public/antigravity-cli/<version>/<arch>/<file>

Test plan

  • docker build -f Dockerfile.antigravity . on amd64
  • docker build -f Dockerfile.antigravity . on arm64
  • Inside container: agy auth → complete Google Sign-In, then agy --acp launches ACP session
  • helm template test charts/openab passes with antigravity example uncommented in values.yaml

🤖 Generated with Claude Code

Add Dockerfile.antigravity and config examples so openab can bridge
Discord/Slack to Google's Antigravity CLI via `agy --acp`.

- Dockerfile.antigravity: downloads the native agy binary from Google
  Storage, supports linux/amd64 and linux/arm64
- config.toml.example: add commented [agent] block for agy
- charts/openab/values.yaml: add commented antigravity agent example
- AGENTS.md: update Dockerfile count 7 → 8
- src/: cargo fmt cleanup (no functional changes)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Joseph19820124 Joseph19820124 requested a review from thepagent as a code owner May 20, 2026 01:00
@github-actions github-actions Bot added pending-screening closing-soon PR missing Discord Discussion URL — will auto-close in 3 days labels May 20, 2026
@github-actions
Copy link
Copy Markdown

⚠️ This PR is missing a Discord Discussion URL in the body.

All PRs must reference a prior Discord discussion to ensure community alignment before implementation.

Please edit the PR description to include a link like:

Discord Discussion URL: https://discord.com/channels/...

This PR will be automatically closed in 3 days if the link is not added.

@Joseph19820124
Copy link
Copy Markdown
Contributor Author

Closing: verified locally that agy --acp does not exist in v1.0.0 (flag undefined). Need to investigate if an ACP adapter exists before re-opening.

agy v1.0.0 has no native --acp flag. This adds a thin Node.js wrapper
(agy-acp/agy-acp.mjs) that speaks the ACP stdio JSON-RPC protocol and
translates it into agy --print invocations.

Protocol handled:
  initialize      → agentInfo + agentCapabilities
  session/new     → UUID sessionId per thread
  session/prompt  → agy [--continue] --print "<text>", result as
                    agent_message_chunk notification
  session/cancel  → no-op (agy --print is not interruptible)

Tested end-to-end locally with a mock agy binary covering:
  - initialize handshake
  - session creation
  - first prompt (new conversation)
  - second prompt (--continue for session continuity)

Config:
  command = "node"
  args = ["/usr/local/lib/agy-acp.mjs"]
  # Auth via: kubectl exec -it <pod> -- agy auth

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@Joseph19820124
Copy link
Copy Markdown
Contributor Author

Reopening with a real working implementation.

Root cause of the original close: agy v1.0.0 has no native --acp flag — the assumption was wrong.

Fix: Added agy-acp/agy-acp.mjs — a thin Node.js ACP stdio adapter that translates the openab JSON-RPC protocol into agy --print invocations.

Verified locally with end-to-end test (mock agy):

✓ initialize: agy v1.0.0
✓ session/new: sessionId = 15122cc8-...
✓ agent_message_chunk (prompt 1): "Hello! You said: what is 2+2?"
✓ session/prompt [1] complete
✓ agent_message_chunk (prompt 2 --continue): "[continued session] You said: and what is 3+3?"
✓ session/prompt [2] complete
✅ All ACP protocol steps passed.

Config is now:

[agent]
command = "node"
args = ["/usr/local/lib/agy-acp.mjs"]

@Joseph19820124
Copy link
Copy Markdown
Contributor Author

Closing.

@shaun-agent
Copy link
Copy Markdown
Contributor

Thanks for putting this together — the Antigravity ACP bridge idea is interesting, and it is useful as an experiment.

After reviewing the diff, my read is:

  • The touched Rust core files (src/acp/connection.rs, src/adapter.rs, src/discord.rs, src/main.rs) appear to be formatting-only changes, not meaningful behavior changes.
  • The real functional addition is the new agy-acp/agy-acp.mjs wrapper plus Dockerfile.antigravity, Helm values, and config examples.
  • The main risk is not the Rust diff. It is adding another officially-supported runtime image around a custom, hand-rolled ACP bridge.

Specific concerns:

  • Dockerfile.antigravity downloads the Antigravity CLI binary directly from Google Storage without checksum or signature verification. We do have similar direct-download risk in some existing agent images, so this is not unique to this PR, but it is still a supply-chain surface we should avoid expanding casually.
  • The binary/wrapper would run in the agent pod and may have access to repo files, mounted volumes, env, GitHub auth, and Discord context depending on deployment.
  • agy-acp.mjs only approximates ACP behavior: cancellation is a no-op, sessions are mapped to agy --continue, and streaming/error semantics may not match native ACP expectations.
  • Adding it to the chart/config examples makes this look like an officially supported agent. That creates operational and maintenance burden, especially if Antigravity ships native ACP soon.

Recommendation: I would not merge this into main as-is. It is reasonable to use/test this locally or in personal infra from a branch/private image, ideally with limited tokens and a test Discord channel. For upstream, I would wait for native ACP support or a more hardened integration with checksum/provenance verification and clearer support boundaries.

So: useful experiment, but not something I think openab should support in-tree yet.

chaodu-agent pushed a commit that referenced this pull request May 22, 2026
Add a thin Rust ACP stdio adapter (agy-acp) that translates openab's
JSON-RPC protocol into `agy -p` invocations, enabling Antigravity CLI
as an agent backend.

- agy-acp/: standalone Rust crate, reads ACP JSON-RPC on stdin, spawns
  `agy -p "prompt"` for each session/prompt, uses --continue for
  multi-turn session continuity
- Dockerfile.antigravity: multi-stage build bundling openab + agy-acp +
  agy binary from Google Storage
- docs/antigravity.md: configuration and usage guide

Tested end-to-end locally with Discord (周嘟嘟 bot) — ~5s response time.

Closes #863
chaodu-agent pushed a commit that referenced this pull request May 22, 2026
Add a thin Rust ACP stdio adapter (agy-acp) that translates openab's
JSON-RPC protocol into `agy -p` invocations, enabling Antigravity CLI
as an agent backend.

- agy-acp/: standalone Rust crate, reads ACP JSON-RPC on stdin, spawns
  `agy -p "prompt"` for each session/prompt, uses --continue for
  multi-turn session continuity
- Dockerfile.antigravity: multi-stage build bundling openab + agy-acp +
  agy binary from Google Storage
- docs/antigravity.md: configuration and usage guide

Tested end-to-end locally with Discord (周嘟嘟 bot) — ~5s response time.

Closes #863
chaodu-agent pushed a commit that referenced this pull request May 22, 2026
Add a thin Rust ACP stdio adapter (agy-acp) that translates openab's
JSON-RPC protocol into `agy -p` invocations, enabling Antigravity CLI
as an agent backend.

- agy-acp/: standalone Rust crate, reads ACP JSON-RPC on stdin, spawns
  `agy -p "prompt"` for each session/prompt, uses --continue for
  multi-turn session continuity
- Dockerfile.antigravity: multi-stage build bundling openab + agy-acp +
  agy binary from Google Storage
- docs/antigravity.md: configuration and usage guide

Tested end-to-end locally with Discord (周嘟嘟 bot) — ~5s response time.

Closes #863
thepagent pushed a commit that referenced this pull request May 22, 2026
Add a thin Rust ACP stdio adapter (agy-acp) that translates openab's
JSON-RPC protocol into `agy -p` invocations, enabling Antigravity CLI
as an agent backend.

- agy-acp/: standalone Rust crate, reads ACP JSON-RPC on stdin, spawns
  `agy -p "prompt"` for each session/prompt, uses --continue for
  multi-turn session continuity
- Dockerfile.antigravity: multi-stage build bundling openab + agy-acp +
  agy binary from Google Storage
- docs/antigravity.md: configuration and usage guide

Tested end-to-end locally with Discord (周嘟嘟 bot) — ~5s response time.

Closes #863

Co-authored-by: Pahud Hsieh <pahud@Pahuds-MacBook-Neo.local>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closing-soon PR missing Discord Discussion URL — will auto-close in 3 days

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants