Docker Sandboxes (sbx) workload for
Google Antigravity CLI
(agy), with the Plone / Volto / T3 Code toolchain from
sbx-ollama-pi.
agy is not one of the built-in sbx agents (claude, codex, copilot, cursor,
devin, docker-agent, droid, gemini, kiro, opencode, shell), so it ships as a
v3 workload kit: one OCI artifact that is both the image and the kit.
sbx run avoinea/agy ~/sandbox/eea-websiteThe sandbox runs agy --dangerously-skip-permissions --mode=accept-edits;
the Docker sandbox is the security boundary.
| Tool | Version / source |
|---|---|
agy
8000
|
vendor installer (antigravity.google/cli/install.sh), self-updating |
| Node.js | nvm, 22 (default) and 24 |
pnpm, yarn |
global npm packages, linked into ~/.local/bin |
t3 |
T3 Code server, linked into ~/.local/bin |
| Python | python/python3 = 3.14, venv, dev, pip, uv + uvx |
| Plone headers | libxml2-dev, libxslt1-dev, libjpeg-dev, zlib1g-dev, libffi-dev, pkg-config |
| System | Ubuntu 26.04 base, build-essential, git, jq, unzip, ripgrep, Docker engine |
The base image is docker/sandbox-templates:shell-docker, so the sandbox has
its own Docker daemon (docker run, docker build, compose).
- Plone 6.1 needs Python 3.12/3.13, while the system interpreter is 3.14.
Use
uv venv --python 3.13for backend work;uvfetches the interpreter. - Plone 5.2 buildouts (
python3.8,buildout.plonetest/plone-5.2.x.cfg) do not build natively on this distro. Run them in the container that production uses:docker run --rm -it -v "$PWD":/app -w /app plone:5.2.1-python2 bash. pip installinto the system interpreter is blocked by PEP 668. Useuvor a venv.~/workspaceis symlinked to the mounted workspace, so tools that default to it (T3 Code, VS Code) open your project instead of an empty folder.
agy normally opens a browser and listens on localhost:36742 for the OAuth
callback; neither works inside a sandbox. The image sets
SSH_CONNECTION="sandbox 0 sandbox 0" so agy detects a remote environment and
switches to its copy/paste flow:
- On first launch,
sbxasks you to approve the kit'santigravityOAuth credential binding. agyprints anaccounts.google.comURL.- Open it in the browser on your machine, sign in, approve.
- Google redirects to
http://localhost:36742/oauth-callback?code=…, which will not load — that is expected. Copy the full URL from the address bar (or just thecode=…part) and paste it at the sandbox prompt.
The real access and refresh tokens stay in Docker Sandboxes' host credential
store. Inside the sandbox, ~/.gemini/antigravity-cli/antigravity-oauth-token
contains proxy-managed sentinel values that sbx swaps for the real tokens on
outbound requests. New sandboxes created from this kit reuse the same login:
you sign in once.
/logout inside agy signs the sandbox out of the current session.
The kit seeds ~/.gemini/antigravity-cli/settings.json on first start — only
when the file is missing, so your own changes survive:
{
"model": "Gemini 4 Neon (XHigh)",
"colorScheme": "tokyo night",
"altScreenMode": "always",
"agentMode": "accept-edits",
"toolPermission": "always-proceed",
"artifactReviewPolicy": "always-proceed",
"allowNonWorkspaceAccess": true,
"permissions": { "allow": ["command(*)", "execute_url(*)", "mcp(*)", "read_file(*)", "read_url(*)", "write_file(*)"] },
"trustedWorkspaces": ["<workspace>"]
}-
Change the model with
/modelinsideagy; the choice is saved by label insettings.jsonand survives restarts. -
Override the launch flags per session — everything after
--goes toagy:sbx run avoinea/agy ~/sandbox/project -- --mode=plan sbx run avoinea/agy ~/sandbox/project -- --model gemini-4-carbon-high
-
Available models depend on your Google plan;
agy modelslists them.
T3 Code has a first-class Antigravity provider: it drives agy acp. Everything
it needs is in the image.
-
Enable SSH access to sandboxes once on the host:
sbx setup ssh
-
Start the sandbox and find its name (
agy-<directory>):sbx run avoinea/agy ~/sandbox/eea-website sbx ls ssh agy-eea-website.sbx # check the host works
-
In T3 Code: Settings → Environments → Add environment → SSH, host
agy-eea-website.sbx, project directory = the same absolute path you passed tosbx run(/Users/you/sandbox/eea-website). -
Settings → Providers → Add provider → Antigravity, on that environment. Set Binary path to
/home/agent/.local/bin/agy— leaving it blank makes T3 download its own managed runtime (~1.25 GiB) instead of using the agy in the image. Then Sign in: T3 shows the Google URL and takes the code back in the client (same copy/paste flow as the terminal).
T3 keeps its Antigravity credentials in its own store; the sbx credential proxy
applies to its token exchange too. The first SSH connection downloads the T3
server into ~/.t3/runtime/versions/ — that is why
release-assets.githubusercontent.com is on the allowlist. T3 needs
Antigravity 1.5+ (the image ships a newer one) and t3 --version here is
0.1.12, comfortably above the minimum.
Sign-in fails with “Antigravity browser suppression could not be verified”?
That is not OAuth: sbx injects NODE_USE_ENV_PROXY=1, Node prints an
EnvHttpProxyAgent experimental warning on stderr, and T3's sign-in preflight
requires stderr to be exactly one marker line. The image sets
NODE_OPTIONS=--disable-warning=UNDICI-EHPA for that reason; if a newer Node
introduces another warning, use NODE_NO_WARNINGS=1 instead.
If a sandbox was created before this allowlist changed, recreate it or add the rule to the existing one:
sbx policy allow network "release-assets.githubusercontent.com:443" --sandbox agy-myprojectEgress is an allowlist declared in agy.yaml:
- Antigravity:
antigravity.google,antigravity-unleash.goog, the auto-updater Cloud Run host,storage.googleapis.com; - OAuth / profile:
accounts.google.com,oauth2.googleapis.com,www.googleapis.com,play.googleapis.com,lh3.googleusercontent.com; - Gemini / Code Assist APIs:
aicode,businessaicode,aiplatform,cloudaicompanion,cloudcode-pa,daily-cloudcode-pa,generativelanguage; - Dev registries:
registry.npmjs.org,registry.yarnpkg.com,pypi.org,files.pythonhosted.org,eggrepo.eea.europa.eu,nodejs.org,github.com,codeload.github.com,api.github.com,raw.githubusercontent.com,objects.githubusercontent.com,release-assets.githubusercontent.com(GitHub release assets — this is where T3 Code downloads its server on first connect), andt3.codes.
To add a domain, fork the repo and extend the network-policy@1 capability, or
override it on the host:
sbx policy allow network "example.com:443" --sandbox agy-myproject- Skills:
grill-me,handoffandrevieware baked into~/.gemini/antigravity-cli/skills/. Project skills go in the workspace at.agents/skills/<name>/SKILL.md(agy also reads.gemini/skills/). - Rules:
~/.gemini/AGENTS.mdcarries short always-on sandbox facts (workspace path, Python for Plone, Node versions, no browser, allowlist). Project rules are the usualAGENTS.md/GEMINI.md/.agents/rules/*.mdin the workspace; they layer on top and are not overridden by the image. - Plugins/MCP:
agy mcp add …andagy plugin install …work normally; their OAuth callbacks are copy/paste for the same reason.
-
agyself-updates inside the sandbox (its release channel is allowlisted). A sandbox that updated keeps that version until it is recreated. -
Rebuild and push the image to move the baseline:
docker buildx build -f agy.yaml --platform linux/amd64,linux/arm64 \ -t avoinea/agy:latest --push . -
Nothing is pinned to an
agyversion on purpose: the vendor ships a single floating channel, and the kit makes noprovidesclaim it cannot enforce. Pin the base image by digest inagy.dockerfileif you need reproducibility.
Locally (Docker Desktop required):
docker buildx build -f agy.yaml --platform linux/arm64 --load -t agy:test .
docker run --rm --entrypoint sh agy:test -lc '
agy --version &&
printf "%s\n" "{\"jsonrpc\":\"2.0\",\"id\":1,\"method\":\"initialize\",\"params\":{\"protocolVersion\":1,\"clientCapabilities\":{}}}" \
| timeout 60 agy acp | grep -q "Antigravity ACP Server" &&
t3 --version && pnpm --version && yarn --version &&
python -m venv /tmp/v && /tmp/v/bin/pip --version
'The GitHub Actions workflow (.github/workflows/docker.yml) builds and smoke
tests linux/amd64 on every push and pull request, then publishes multi-arch
images to Docker Hub (avoinea/agy) and GHCR on main and v* tags.
--dangerously-skip-permissions --mode=accept-edits disables agy's own
approval prompts: the agent edits files and runs commands without asking. That
is intentional — the sandbox is the boundary. The agent still cannot read the
real Google tokens (sentinel values only), cannot reach domains outside the
allowlist, and cannot touch the host outside the mounted workspace. Treat the
workspace as writable by the agent.
shelajev/agy-sbx-kit— the v3 workload pattern, the OAuth proxy configuration, theSSH_CONNECTIONtrick and the Antigravity domain list.avoinea/sbx-ollama-pi— the toolchain layout (nvm,~/.local/binlinks, Python, T3 Code, skills).
MIT