Google Antigravity as an extra agent account in Cerebro
Research as of 2026-11-30 · Google AI Pro (pedro.reyes.solutions@) paid until 2027-01-12 · CLI not installed yet
TL;DR. Antigravity has a real CLI (
agy) with headless mode (-p --output-format stream-json) and conversation resume (--conversation <id>), so it fits Cerebro's runner the same way claude -p does. Context transfer is already solved: Cerebro's chat migration has a replay path (buildReplayPrompt) that rebuilds the conversation from Firestore. It works for any provider, in both directions. On Pro it also runs Claude Opus/Sonnet 5.5, which are billed to Google's quota. The real work is in generalising "Claude accounts" into "agent accounts".1. What agy offers (official docs)
| Topic | Fact |
|---|---|
| Install | macOS/Linux: curl -fsSL https://antigravity.google/cli/install.sh | bash → ~/.local/bin/agy. Windows: irm https://antigravity.google/cli/install.ps1 | iex |
| Headless | -p, --output-format text|json|stream-json, --input-format stream-json, --json-schema, --print-timeout |
| Stream events | init (conversation_id, tools, permission_mode) → many step_update (text_delta, step_type user_input/agent_response/tool, tool_info, usage) → result (status SUCCESS/ERROR/…, response, usage tokens) |
| Resume | --conversation <id>, -c. History is scoped to the cwd. Transcript: ~/.gemini/antigravity-cli/brain/<id>/…/transcript.jsonl (format not documented) |
| Auth | Google OAuth in the browser on first run. Token stored in the OS keychain. Logout only via /logout in the TUI. No whoami/status. No CLAUDE_CONFIG_DIR equivalent, so one Google account per OS user |
| Permissions | --mode accept-edits|auto|plan, --dangerously-skip-permissions, --sandbox. Allow/ask/deny rules only in settings.json (no --disallowedTools) |
| Models | --model, --effort, agy models. Gemini 4 family, Gemini 3.x Flash, Claude Opus 5.5 / Sonnet 5.5 |
| Instructions | Reads AGENTS.md/GEMINI.md + .agents/rules/*.md (24 KB/file, 20k-token always-on budget). Our AGENTS.md is 15 KB, so it fits |
| Skills | Reads <workspace>/.agents/skills/*/SKILL.md, which our repo already has. Does not read .claude/skills |
| MCP | ~/.gemini/config/mcp_config.json or .agents/mcp_config.json (mcpServers, stdio or Streamable HTTP; no SSE) |
| Hooks | .agents/hooks.json: SessionStart, PreToolUse, PostToolUse, Pre/PostInvocation, Stop |
| Quota | Pro: a 5-hour window plus a weekly cap per model group, and overage on AI credits (useG1Credits). /usage is text only; there's no JSON quota command |
| System prompt | No --append-system-prompt, so Cerebro's chat instructions have to go into the prompt or a rule file |
2. Cerebro today vs. what changes
| Piece | Today (Claude) | For Antigravity |
|---|---|---|
| Accounts | CLAUDE_ACCOUNT_IDS fixed to account-1..5, each a ~/.claude-account-N | Add a provider field to the account. A new card Antigravity · pedro.reyes.solutions@ in Agents › Cuentas (desktop + mobile) |
| Chat turn | main/chats.ts spawns claude -p --output-format stream-json --resume | A second runner, agy -p --output-format stream-json --conversation, plus a parser from step_update to Cerebro's message stream and activity chips |
| Cerebro UI rules (questions, artifacts, handoff…) | --append-system-prompt-file | Prepend them as a <cerebro> block to the first turn's prompt, then a short reminder on later turns |
| Context transfer | transcript-copy (same CLI) or replay | Replay only, in both directions. Transcript copy is impossible because the formats differ. Raise CHAT_REPLAY_MAX_CHARS for Gemini's long context |
| Limit detection | Parses "You've hit your … limit" and the usage API | Map result.status=ERROR + quota text to a limit card, then migrate. Usage: parse agy -p /usage text (unverified) or count tokens |
| Blocked tools | --disallowedTools | A generated permissions.deny in agy's settings.json (e.g. mcp(chrome-devtools/*)) |
| MCP | .mcp.json (codegraph, chrome-devtools, cerebro-browser) | Generate .agents/mcp_config.json from .mcp.json (cerebro-browser only) |
| Instructions / rules | CLAUDE.md + 6 path-scoped .claude/rules | AGENTS.md is already loaded. Mirror .claude/rules into .agents/rules with trigger: glob, plus a sync check |
| Hooks (impact-hint…) | .claude/settings.json | Optional: .agents/hooks.json calling the same scripts |
| Attachments | Saved to disk; Claude reads them | Same: pass the paths in the prompt (headless image input isn't documented) |
| Scheduled agents | RUNNERS registry: claude | openai-compatible | Add an antigravity runner. This is the cheapest first milestone |
| Slash menu | Lists Claude's commands | Hide it for agy chats, or list skills only |
3. More points to work out
- Subscription ends 2027-01-12. That's six weeks away. Build it provider-generic: the free tier also includes the CLI (with a weekly quota), so the integration keeps working at lower volume if you don't renew.
- Terms of service. Clause 6 forbids "third party software… to access the Service" (the example given is OpenClaw using Antigravity OAuth). Calling the official
agyin its documented headless mode looks fine. Never reuse its OAuth tokens directly. - Privacy. Clause 5 says interactions are used to improve Google products unless you turn that off. Turn it off before sending repo code.
- Data left on Google's side. The agy CLI never sees secrets in the repo, but its tool calls can still
catfiles. Use the same deny rules for.envand~/.secretsas for Claude. - One Google account per OS user. There's no config-dir switch, so a second Google account would need
HOMEisolation (untested). Not needed now. - Both machines. The token lives in each machine's keychain, so you install and log in once on the Mac and once on Windows.
Ejecutar enshould skip machines without an agy login. - Model per chat. Default to Gemini 4 or Claude Opus 5.5 via Antigravity. The model picker needs agy's list (
agy models). - Unverified 4× quota claim. A blog says using
--agentcosts 4× quota on Pro. Avoid--agent; put instructions in the prompt or rules. - Session key / commits. Same repo rules. The Co-Authored-By trailer changes per model (Gemini vs Claude via Antigravity).
- Auto-migration ordering. Decide where Antigravity sits in the fallback queue: last resort, or first for cheap work.
- Mobile parity. The provider badge, account card and migrate dialog live in
apps/cerebro-mobiletoo, and theshared/chats.tscopy must stay byte-identical. - Tests. Unit tests for the stream-json parser, the replay prompt, limit detection and account order. Recorded agy fixtures go under
scripts/chats. - Cost visibility. Store
usagetokens per turn so Agents › Cuentas can show an estimated weekly use.
4. Phased plan
Phase 0: setup (≈30 min, manual)
Installagy on Mac (and Windows), log in with pedro.reyes.solutions@, turn off "improve products", run agy models and agy -p /usage, and capture a stream-json sample as a test fixture.Phase 1: scheduled agents runner (small)
Addantigravity to AGENT_PROVIDERS and RUNNERS, with model + mode. This proves auth, headless runs and parsing with little risk.Phase 2: chats on Antigravity (medium-large)
Addprovider to accounts, the agy chat runner + stream parser, Cerebro rules in the prompt, .agents/mcp_config.json + deny rules, "Migrate to Antigravity" through replay, limit card, and the desktop + mobile UI.Phase 3: polish
Usage windows on the card, a place in auto-migration,.agents/rules mirroring and hooks, per-model trailers.