{"id":50947536,"url":"https://github.com/sinantufekci/antigravity-intern","last_synced_at":"2026-06-17T22:00:39.597Z","repository":{"id":359581395,"uuid":"1246727521","full_name":"SinanTufekci/antigravity-intern","owner":"SinanTufekci","description":"MCP bridge that exposes Google's Antigravity CLI (agy) to Claude Code as a sub-agent. Works around the headless agy -p stdout bug by reading the response from agy's own transcript files.","archived":false,"fork":false,"pushed_at":"2026-06-17T21:46:41.000Z","size":218,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-17T22:00:14.482Z","etag":null,"topics":["antigravity","bridge","claude-code","cli","gemini","mcp","model-context-protocol","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SinanTufekci.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["SinanTufekci"]}},"created_at":"2026-05-22T13:44:39.000Z","updated_at":"2026-06-17T21:46:45.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/SinanTufekci/antigravity-intern","commit_stats":null,"previous_names":["sinantufekci/claude-code-antigravity-cli-mcp-server"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/SinanTufekci/antigravity-intern","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinanTufekci%2Fantigravity-intern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinanTufekci%2Fantigravity-intern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinanTufekci%2Fantigravity-intern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinanTufekci%2Fantigravity-intern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SinanTufekci","download_url":"https://codeload.github.com/SinanTufekci/antigravity-intern/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SinanTufekci%2Fantigravity-intern/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34466929,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-17T02:00:05.408Z","response_time":127,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["antigravity","bridge","claude-code","cli","gemini","mcp","model-context-protocol","python"],"created_at":"2026-06-17T22:00:17.626Z","updated_at":"2026-06-17T22:00:39.589Z","avatar_url":"https://github.com/SinanTufekci.png","language":"Python","funding_links":["https://github.com/sponsors/SinanTufekci"],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n# Claude Code × Antigravity CLI — MCP Bridge\n\n\u003cimg src=\"assets/bridge-animation.svg\" width=\"100%\" alt=\"Claude Code x Antigravity CLI Bridge Animation\" /\u003e\n\n**Use Google's [Antigravity](https://antigravity.google/) (Gemini 3.5 Flash) as a sub-agent inside [Claude Code](https://claude.com/claude-code) — for text answers *and* image generation, on the AI Pro quota you already pay for.**\n\n[![CI](https://github.com/SinanTufekci/antigravity-intern/actions/workflows/ci.yml/badge.svg)](https://github.com/SinanTufekci/antigravity-intern/actions/workflows/ci.yml)\n[![PyPI](https://img.shields.io/pypi/v/antigravity-intern?logo=pypi\u0026logoColor=white\u0026color=2ea44f)](https://pypi.org/project/antigravity-intern/)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![Python 3.10+](https://img.shields.io/badge/python-3.10%2B-blue.svg)](https://www.python.org/)\n[![MCP server](https://img.shields.io/badge/MCP-server-7c3aed)](https://modelcontextprotocol.io/)\n[![agy 1.0.9 verified](https://img.shields.io/badge/agy-1.0.9%20verified-2ea44f)](https://antigravity.google/)\n[![platform](https://img.shields.io/badge/platform-Windows%20·%20macOS%20·%20Linux-lightgrey)](#requirements)\n[![Sponsor](https://img.shields.io/github/sponsors/SinanTufekci?logo=githubsponsors\u0026label=Sponsor\u0026color=ea4aaa)](https://github.com/sponsors/SinanTufekci)\n\n\u003c/div\u003e\n\n---\n\n`agy`, Google's Antigravity CLI, ships a headless print mode (`agy -p`) that's **broken**: it\nauthenticates, talks to the model, gets the answer back… and then writes it to the *controlling\nterminal* instead of its stdout — so anything capturing stdout gets nothing (and, run under a TUI,\nagy's text leaks straight into the host's prompt). This bridge runs `agy -p` anyway, **detaches it\nfrom your terminal** so it can't leak, reads the answer straight out of agy's *own* transcript\nfiles, and hands it to Claude Code as clean MCP tools. Delegate cheap tool-calling work to Gemini\nwithout leaving your terminal.\n\n\u003e [!WARNING]\n\u003e **This runs unsandboxed code with your privileges.** `agy -p` auto-executes its tools\n\u003e (read/write files, run shell commands, reach the network) with **no usable approval gate**.\n\u003e `--sandbox` (fixed for `-p` in agy 1.0.6+) blocks only *shell commands* — file writes and\n\u003e network egress stay wide open — so it's no real boundary. The `workspace` argument is a\n\u003e *starting context*, **not** a security boundary. Only use it with **trusted prompts on trusted\n\u003e content**; for real isolation, run the bridge inside a container or VM. **[Full details →](#security)**\n\n## Why you'd want this\n\n| | |\n|---|---|\n| 🧠 **Second opinion** | Ask a different model family mid-task without switching tools. |\n| 🎨 **Image generation** | Have Gemini draw an image and get the saved file back — no extra API key or image tool. |\n| 💸 **Cheap delegation** | Burn Antigravity AI Pro quota on grunt work instead of Claude tokens. |\n| 📁 **Cross-repo reads** | Point it at another project directory and let Gemini read/answer there. |\n| 🔌 **Zero new auth** | Piggybacks the login you already did in the Antigravity IDE — no keys to manage. |\n\n## How it works\n\n```mermaid\nflowchart LR\n    A([Claude Code]) -- \"MCP tool call\" --\u003e B[\"agy bridge\u003cbr/\u003e(server.py)\"]\n    B -- \"agy -p prompt\" --\u003e C[Antigravity CLI]\n    C -- \"Gemini 3.5 Flash (High)\" --\u003e M((model))\n    M -- \"answer\" --\u003e C\n    C -. \"writes (stdout stays empty)\" .-\u003e T[(\"transcript.jsonl\")]\n    B -- \"reads final PLANNER_RESPONSE\" --\u003e T\n    B -- \"plain text\" --\u003e A\n```\n\n`agy -p` persists its real answer — the one it never sends to stdout — to:\n\n```\n~/.gemini/antigravity-cli/brain/\u003cconv-id\u003e/.system_generated/logs/transcript.jsonl\n```\n\nThe bridge runs agy, locates the conversation via `cache/last_conversations.json` (falling back to\nthe newest `brain/` directory touched since launch), streams the transcript, and returns the final\n`source=MODEL, status=DONE, type=PLANNER_RESPONSE` entry — the answer, minus the intermediate\ntool-calling steps. `antigravity_continue` pins the workspace's **exact** conversation id via\n`--conversation`, so it never resumes the wrong thread.\n\n## Set up in 60 seconds\n\n**Prerequisite (either method):** install agy and sign in to Antigravity **once** (via the IDE or\n`agy -i`) so it has a credential to reuse.\n\n### Recommended — no clone, you control updates\n\nWith [`uv`](https://docs.astral.sh/uv/) installed, register the bridge straight from\n[PyPI](https://pypi.org/project/antigravity-intern/) under `mcpServers` in `~/.claude.json` — no\npath to hardcode, no `git pull` to remember:\n\n```json\n\"antigravity-intern\": {\n  \"command\": \"uvx\",\n  \"args\": [\"antigravity-intern\"]\n}\n```\n\nuvx pins to the version it first caches and does **not** auto-upgrade, so you never run an update you\ndidn't choose — important, since the bridge runs [unsandboxed code](#security): a surprise (or\ncompromised) release can't execute until you opt in. When the startup check warns that a newer\nrelease is out, upgrade deliberately and restart Claude Code:\n\n```bash\nuvx antigravity-intern@latest      # fetch + run the newest release (refreshes uv's cache)\n```\n\n\u003e [!TIP]\n\u003e Prefer hands-off auto-updates? Put `\"args\": [\"antigravity-intern@latest\"]` in the config instead —\n\u003e every launch runs the newest release. Convenient, but it pulls new code without asking each time.\n\n### From source\n\nClone it instead if you want to hack on the bridge or pin a local copy:\n\n```bash\ngit clone https://github.com/SinanTufekci/antigravity-intern.git\ncd antigravity-intern\npip install fastmcp\npython test_smoke.py        # 3 real round-trips (ask, continue, image) — should print three PASS lines\n```\n\n\u003e [!NOTE]\n\u003e The smoke test costs a tiny bit of AI Pro quota and takes ~30–60 s.\n\nThen point Claude Code at the absolute path to `server.py` under `mcpServers` in `~/.claude.json`:\n\n\u003ctable\u003e\n\u003ctr\u003e\u003cth\u003eWindows\u003c/th\u003e\u003cth\u003emacOS / Linux\u003c/th\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003ctd\u003e\n\n```json\n\"antigravity-intern\": {\n  \"command\": \"python\",\n  \"args\": [\"C:\\\\path\\\\to\\\\server.py\"]\n}\n```\n\n\u003c/td\u003e\u003ctd\u003e\n\n```json\n\"antigravity-intern\": {\n  \"command\": \"python3\",\n  \"args\": [\"/path/to/server.py\"]\n}\n```\n\n\u003c/td\u003e\u003c/tr\u003e\n\u003c/table\u003e\n\nRestart Claude Code. Eight tools appear: **`antigravity_ask`**, **`antigravity_continue`**, **`antigravity_ask_watch`**, **`antigravity_image`**, **`antigravity_image_watch`**, **`antigravity_swarm`**, **`antigravity_image_swarm`**, and **`antigravity_status`** (each prefixed `mcp__antigravity-intern__`).\n\n\u003e *\"Use antigravity_ask to summarize the README of this repo in three bullets.\"* → Claude routes the prompt\n\u003e through the bridge, agy reads the file under the workspace root, and the answer comes back as a\n\u003e plain string.\n\n## Tools\n\n| Tool | Purpose |\n|---|---|\n| `antigravity_ask(prompt, workspace?, timeout_s?=180)` | Start a **new** Antigravity conversation. |\n| `antigravity_continue(prompt, workspace?, timeout_s?=180)` | Continue the conversation **rooted at `workspace`** (pinned by id). |\n| `antigravity_ask_watch(prompt, workspace?, timeout_s?=180)` | 🧪 **Experimental.** Like `antigravity_ask`, but opens the **Antigravity Intern** live browser window so you can watch agy work (see [Watch mode](#watch-mode)). |\n| `antigravity_image(prompt, output_path?, workspace?, timeout_s?=240)` | Generate an image with Antigravity; saves the file (extension corrected to the real bytes) and returns its path + format/size. |\n| `antigravity_image_watch(prompt, output_path?, workspace?, timeout_s?=240)` | 🧪 **Experimental.** Like `antigravity_image`, but streams progress and **shows the generated image** in the Antigravity Intern window. |\n| `antigravity_swarm(prompts, workspaces?, max_concurrency?=4, timeout_s?=180, watch?=false)` | Run **several prompts in parallel** as independent agy workers; returns every answer in one block (see [Swarm](#swarm)). |\n| `antigravity_image_swarm(prompts, output_paths?, workspaces?, max_concurrency?=4, timeout_s?=240, watch?=false)` | Generate **several images in parallel** (one worker per prompt). |\n| `antigravity_status()` | Setup diagnostics: **the bridge's own version + whether a newer release is available**, plus agy version/compat, state dirs, and newest-transcript readability. Spends no quota. |\n\n`workspace` defaults to the MCP server's current working directory. Point it at a real project dir\nfor context-aware answers — agy gives the model access to files under that root.\n\n`antigravity_image` forces agy to save to an explicit absolute path — without one, agy\nfalls back to its own scratch dir (`~/.gemini/antigravity-cli/scratch/`). It then\ncorrects the file extension to match the real bytes: agy's image model picks the\nformat itself (JPEG for photo-like images, PNG for flat graphics), so a requested\n`out.png` may come back as `out.jpg`. The returned path always reflects the true\nformat.\n\n\u003ca id=\"watch-mode\"\u003e\u003c/a\u003e\n\n## 👁️ Watch mode — Antigravity Intern (experimental)\n\n`antigravity_ask_watch` / `antigravity_image_watch` do the same work as `antigravity_ask` / `antigravity_image`, but\nlet you **watch agy work live in a little terminal-style browser window** called\n**Antigravity Intern**. agy still runs headless; alongside it the bridge serves a tiny page on\n`127.0.0.1` and opens it in a small, chromeless app window that streams agy's steps —\nits planner narration (▸), the **real commands** it runs (`$`), and completions (✓) —\nread live from the transcript, with the final answer rendered as Markdown (and, for\n`antigravity_image_watch`, the generated image shown inline).\n\n- **Cross-platform \u0026 best-effort.** Prefers a Chromium browser (`--app` mode) for the\n  windowed look; falls back to a normal browser window. If nothing can open, the run\n  still completes and returns normally.\n- **Window size.** Set **`AGY_WATCH_WINDOW_SIZE`** (e.g. `AGY_WATCH_WINDOW_SIZE=480,700`)\n  to resize the window; default is `560,760`. Press **Enter / Esc** in the window to\n  close it.\n- **Coarse, not token-level.** agy flushes its transcript in chunks, so you get a\n  handful of live steps, not character streaming. The returned value is identical to\n  the non-watch tool. Nothing is sent anywhere but your own machine.\n\n\u003ca id=\"swarm\"\u003e\u003c/a\u003e\n\n## 🐝 Swarm — run agy workers in parallel\n\n`antigravity_swarm` and `antigravity_image_swarm` fan a list of prompts out to\n**independent agy workers that run truly concurrently** (capped at\n`max_concurrency`, default 4), then return every worker's result in one block.\nGood for independent, cheap sub-tasks — summarise N files, ask the same question\nabout N repos, generate N images — without paying for them one at a time.\n\n```\nantigravity_swarm(prompts=[\n  \"Summarise src/auth.py in 2 bullets.\",\n  \"Summarise src/db.py in 2 bullets.\",\n  \"List the public functions in src/api.py.\",\n])\n```\n\n**How it stays correct under concurrency.** The single-agent tools serialize\nthrough a lock because agy rewrites `last_conversations.json` on every call, so\nconcurrent runs sharing one state dir would race. The swarm sidesteps this\nentirely: each worker runs with its **own isolated `HOME`/`USERPROFILE`**, so\nagy's `brain/`, `cache/`, and `last_conversations.json` never collide — no lock\nneeded. Auth still works because agy reads it from the **OS credential store**,\nnot from `~/.gemini` (verified on agy 1.0.9). Each worker's `cwd` is still its\nreal `workspace`, so file access there is unchanged — HOME redirection isolates\n*state only*. Measured ~**2.8× speedup at 3 workers** (the AI Pro backend does\nnot serialize per-account); higher `max_concurrency` trades quota/rate-limit\npressure for wall-clock.\n\n- **`workspaces`** — omit for the server cwd; pass a **1-item list** to point every\n  worker at the same dir; pass **one entry per prompt** for per-worker dirs.\n- **Error isolation** — a worker that fails is reported in place; the others still\n  return.\n- **`watch=true`** — opens a thin live **Antigravity Swarm** dashboard (one row per\n  worker showing the repo, prompt, and latest step). **Click a row** to pop that\n  agent out into its own window streaming its full step log, beside the dashboard.\n\n\u003e [!WARNING]\n\u003e A swarm launches **N unsandboxed agy agents at once** — N× the prompt-injection\n\u003e \"lethal trifecta\" surface of a single call (see [Security](#security)). Only use\n\u003e it with **trusted prompts on trusted content**.\n\n## Model \u0026 auth\n\n- **Model:** effectively **Gemini 3.5 Flash (High)** — whatever the `\"model\"` field in agy's\n  `settings.json` is set to. agy 1.0.5 added a `--model` flag (and a `models` subcommand) that *is*\n  wired into print mode, but **switching to a different model in `-p` hangs the call** (verified on\n  1.0.5: passing the already-active label returns in seconds, any other label hangs \u003e60 s). So the\n  bridge stays single-model; change it via agy's `settings.json` if you need a different one. Flash\n  High is speed-optimized for tool-calling, so this fits best as a *fast sub-agent for cheap work*,\n  not a heavy reasoning partner.\n- **Auth:** piggybacks whatever credential store `agy` uses on your OS (Windows Credential Manager,\n  macOS Keychain, libsecret on Linux — the bridge never touches it directly). Log in once; every\n  call after that silent-auths on the **same AI Pro quota** you already pay for.\n\n\u003ca id=\"security\"\u003e\u003c/a\u003e\n\n## ⚠️ Security\n\n`agy -p` runs the model as an **autonomous agent that auto-executes its own tools** — reading and\nwriting files, running shell commands, and reaching the network — with **no approval gate and no\nopt-out**. This isn't a choice the bridge makes; it's how agy's print mode works. Re-verified\nempirically on **agy 1.0.9 / Windows** (all three checks below still hold):\n\n- Print mode runs out-of-workspace file writes and live network fetches **even without**\n  `--dangerously-skip-permissions` — that flag is a **no-op** for `-p`. There is **no** agy flag\n  that disables tool execution in print mode.\n- agy 1.0.5 integrated a permission system (its logs show `toolPermission=request-review`), but it\n  **still does not gate print-mode execution** — a fresh `-p` run created a file outside the\n  workspace with no prompt.\n- `--sandbox` is **not** a usable boundary. agy 1.0.6 fixed its propagation into `-p` (the 1.0.6/1.0.7\n  changelog calls this \"sandbox isolation correctly enforced\") and it now **does** block terminal/\n  shell command execution — but re-verified on 1.0.9 that it leaves the `write_to_file` tool and\n  network **wide open**: under `--sandbox` the model still wrote a file *outside* its workspace. agy\n  1.0.9 hardened the sandbox's *command* path (stricter exact-match command checks; `.git` added to\n  its dangerous-paths list), but none of that closes the out-of-workspace `write_to_file` hole. On\n  top of that, a `--sandbox` run whose blocked terminal command halts it writes **no JSONL\n  transcript** (only the SQLite `.db`, re-confirmed on 1.0.9), so the bridge couldn't read a\n  response — so the bridge deliberately never passes `--sandbox`.\n\n**What that means for you:**\n\n- The `workspace` argument is only a *starting context*, **not a security boundary** — the agent\n  can and does act outside it.\n- Every call effectively runs **arbitrary code with your user privileges**.\n- Only invoke this with **trusted prompts on trusted content**. Untrusted input here is the classic\n  prompt-injection *lethal trifecta*: private-data access + code execution + network egress.\n- For real isolation, run the **whole bridge inside a container or VM**.\n\nThe bridge itself does only cross-platform filesystem reads under `~/.gemini/antigravity-cli/` — no\nprivate APIs, no token theft. The risk above is entirely in what the agy sub-agent is allowed to do.\n\n## FAQ\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eIs this against Google's Terms of Service?\u003c/b\u003e\u003c/summary\u003e\n\nIt runs the **official `agy` CLI under your own AI Pro session** — no private APIs, no token theft,\nno quota abuse. It just bridges what the CLI already does. That said, your AI Pro / Antigravity ToS\napply, and you're responsible for staying within them.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWill it break when agy updates?\u003c/b\u003e\u003c/summary\u003e\n\nPossibly — it reads agy's **internal, undocumented** state files, so a release can change paths or\nschemas and break it silently. Re-verified working on **1.0.9** (transcript schema and `-p` JSONL\noutput unchanged; live ask/continue/image round-trips pass). The known future risk is agy's\n**SQLite (`.db`) conversation format** (added in 1.0.4, slated to become the default): agy 1.0.9\nstill **dual-writes** every conversation to `~/.gemini/antigravity-cli/conversations/\u003cid\u003e.db`\nalongside the JSONL transcript, so once it stops writing JSONL the reader needs a SQLite path. Pin a\nknown-good `agy` version if you depend on this.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eWhy only Gemini 3.5 Flash?\u003c/b\u003e\u003c/summary\u003e\n\nagy 1.0.5 added a `--model` flag, but switching to a different model in `-p` **hangs** (print mode\nwaits on a step it never gets headless), so in practice you get whatever model agy's `settings.json`\nselects — Gemini 3.5 Flash (High) by default. The bridge doesn't expose a model knob because it\nwould hang on any real switch.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCan it generate images?\u003c/b\u003e\u003c/summary\u003e\n\n**Yes — that's the `antigravity_image` tool.** agy's print mode generates real images on\nyour AI Pro quota; `antigravity_image` drives it, saves the file to a path you choose (or\na timestamped default in your workspace), fixes the extension to match the real\nbytes (agy picks JPEG or PNG itself), and returns the path. Verified on **agy 1.0.9 / Windows**.\nIt's request/response only and runs a normal, unsandboxed agy session (see\n[Security](#security)).\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDoes it cost extra money?\u003c/b\u003e\u003c/summary\u003e\n\nNo. It uses the same **AI Pro quota** you already pay for. The smoke test spends a negligible\namount.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eDoes it stream responses?\u003c/b\u003e\u003c/summary\u003e\n\nThe final answer is request/response — `agy -p` returns it all at once, so the tools return when agy\nfinishes (each call typically takes 10–30 s). If you want to *watch* agy work as it goes, use the\nexperimental **watch mode** (`antigravity_ask_watch` / `antigravity_image_watch`): it opens the\n**Antigravity Intern** browser window and live-streams agy's steps read from the transcript — see\n[Watch mode](#watch-mode). It's coarse (a handful of steps, not token-by-token), and the returned\nvalue is identical to the non-watch tool.\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cb\u003eCan I run several calls at once?\u003c/b\u003e\u003c/summary\u003e\n\nThe **single-agent** tools (`antigravity_ask` / `antigravity_continue` / `antigravity_image`) are\n**serialized** inside the server: agy rewrites `last_conversations.json` on every call, so concurrent\nruns sharing one state dir would race and could return the wrong conversation. A `threading.Lock`\nmakes extra requests queue rather than race.\n\nFor real parallelism use **[`antigravity_swarm`](#swarm)** — it runs each worker in its own isolated\nstate dir, so they don't race and the lock isn't needed (~2.8× at 3 workers). That's the supported\nway to run many agy calls at once.\n\u003c/details\u003e\n\n## Status \u0026 caveats\n\n- ✅ **Verified on agy 1.0.9** — base dir, `last_conversations.json`, the\n  `brain/.../transcript.jsonl` path, the transcript schema, and the `-p`/`-c`/`--print-timeout`\n  flags are all unchanged; live ask/continue/image round-trips all pass. The 1.0.5 `-p` metadata fix\n  also means agy no longer litters the workspace dir.\n- 🖥️ **Console-detach (new)** — agy `-p` writes its progress/answer to the *controlling terminal*,\n  not stdout; under a TUI that text leaks into the host's prompt (seen on 1.0.9 before the fix). The\n  bridge now spawns agy detached from the terminal (`CREATE_NO_WINDOW` / a new POSIX session), so it\n  can't leak; the answer is still read from the transcript.\n- ⏳ **SQLite migration is the real risk** — agy 1.0.9 still dual-writes a `.db` per conversation;\n  see the [FAQ](#faq). `_read_response` raises a clear, SQLite-aware error if the JSONL transcript\n  ever disappears.\n- 🐛 **Stdout bug persists** — `-p` still doesn't print the answer to stdout on 1.0.9 (the 1.0.9\n  \"print-mode resumption\" changelog fix did **not** change this for fresh `-p`). If a future release\n  fixes stdout, this workaround becomes redundant but harmless.\n- 👁️ **Watch mode is experimental** — `antigravity_ask_watch` / `antigravity_image_watch` open the **Antigravity Intern**\n  browser window to watch agy work live (coarse steps; image shown inline). Best-effort and\n  cross-platform; see [Watch mode](#watch-mode).\n- 🔒 **No real sandbox** — agy's `--sandbox` (since 1.0.6) blocks only shell commands in `-p` but still\n  leaves file writes and network egress open (and breaks transcript reading), so it's no boundary;\n  see [Security](#security).\n\n## Requirements\n\n- Python 3.10+\n- [`agy`](https://antigravity.google/) 1.0.0 or newer on `PATH` (state-file layout re-verified on **1.0.9**)\n- An active Antigravity / AI Pro session\n\n\u003e [!TIP]\n\u003e If `agy` isn't reliably on `PATH` (e.g. a new terminal or reboot drops it on Windows), set the\n\u003e **`AGY_BIN`** env var to its full path and the bridge will use that instead of `\"agy\"` — e.g.\n\u003e `AGY_BIN=%LOCALAPPDATA%\\agy\\bin\\agy.exe`.\n\nThe bridge uses only cross-platform Python (`Path.home()`, `subprocess`) and reads paths under\n`~/.gemini/antigravity-cli/`, which `agy` writes the same way on every OS. **Developed and verified\non Windows; macOS and Linux should work unmodified provided `agy -i` runs there.** If you test it on\nthose platforms, please open an issue / PR to confirm.\n\n## Development\n\n```bash\npip install -e \".[dev]\"          # fastmcp + pytest + ruff\npytest test_server.py test_swarm.py   # offline unit tests — no agy, no quota\nruff check . \u0026\u0026 ruff format --check .\n```\n\n`test_server.py` and `test_swarm.py` cover the pure parsing/version/swarm logic with temp fixtures\n(no agy needed); `test_smoke.py` is the live end-to-end check (ask, continue, image, and a parallel\nswarm) that spends a little quota. Set **`AGY_BRIDGE_DEBUG=1`**\nto log per-call diagnostics (resolved conversation id, agy exit code, elapsed) to stderr — and on\nstartup the server warns if your installed agy is newer than the version it was verified against.\n\n**Staying up to date.** Updates are opt-in by design: plain `uvx antigravity-intern` pins to the\nversion it first cached, and a `git clone` never auto-updates — so the bridge only ever runs code\nyou chose to install (it runs unsandboxed, so this is deliberate, not laziness). Nothing updates a\n*running* server either; new versions take effect on the next Claude Code restart. You find out about\na release two ways, both best-effort GitHub tag checks against the running code (`__version__` in\n`server.py`):\n\n- **In chat — [`antigravity_status`](#tools)** leads with a `bridge version` row, e.g.\n  `v0.10.2 (latest)` or `v0.10.2 -\u003e v0.10.3 available; upgrade: uvx antigravity-intern@latest`. This\n  is the notice you actually see in the MCP client's UI (an available update stays `[ok]` — it's\n  informational, not a fault).\n- **At startup — stderr**, where the server logs the same one-line warning. This lands in the host's\n  MCP logs only (e.g. via `/mcp` in Claude Code), not the chat.\n\nUpgrade with `uvx antigravity-intern@latest` (or `git pull`) and restart, or opt into hands-off\nauto-updates by putting `antigravity-intern@latest` in the config. Both checks are silent when\noffline or rate-limited and never block startup. Control them with:\n\n| Env var | Effect |\n|---|---|\n| `AGY_BRIDGE_NO_UPDATE_CHECK=1` | Skip the GitHub check entirely (fully offline startup). |\n| `AGY_BRIDGE_REPO=owner/name` | Point the check at a fork instead of the upstream repo. |\n\n**Releasing.** Bump the version in **both** `pyproject.toml` and `server.py` (`__version__`), update\n[`CHANGELOG.md`](CHANGELOG.md), then tag:\n\n```bash\ngit tag vX.Y.Z \u0026\u0026 git push origin vX.Y.Z\n```\n\nThe tag triggers two workflows: `release.yml` cuts a GitHub Release with auto-generated notes, and\n`publish.yml` builds and uploads to PyPI via [Trusted Publishing](https://docs.pypi.org/trusted-publishers/)\n(no stored token — `publish.yml` verifies the tag matches `pyproject.toml` first). One-time setup:\nregister the trusted publisher at `pypi.org/manage/project/antigravity-intern/settings/publishing/`\n(repo `SinanTufekci/antigravity-intern`, workflow `publish.yml`, environment `pypi`).\n\n## Contributing\n\nPersonal project, **best-effort maintenance** — issues and PRs welcome, but no uptime/compat\npromises. If `agy -p` ever starts printing to stdout correctly, this whole repo becomes a fun\nhistorical artefact.\n\n## 🌐 Community \u0026 Acknowledgments\n\n- **Qiita (Japan):** A huge thanks to `@fallout` and the Japanese developer community for featuring this project and providing invaluable feedback!\n  - [Detailed Hybrid Setup Guide (Claude Code × Antigravity CLI)](https://qiita.com/fallout/items/5097f0575b58f4c69b81)\n  - [Quick Installation Guide](https://qiita.com/fallout/items/d699df3d6931c07eb38d)\n\n\u003e 💡 **Path Resolution Fix:** Thanks to their community's real-world testing, we identified and resolved a Windows PATH edge case where the MCP server inherits a *stale* `PATH` at startup and can't find `agy`. The `AGY_BIN` environment-variable fallback was implemented directly inspired by their report!\n\n## License\n\n[MIT](LICENSE). Do whatever you want with it.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinantufekci%2Fantigravity-intern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsinantufekci%2Fantigravity-intern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsinantufekci%2Fantigravity-intern/lists"}