Home

How Antigravity works - from prompt to execution


↑ Back to Top

Context assembly (before I see your message)

Every turn the system builds a layered context:

All of this is assembled before the model generates a single token.


↑ Back to Top

Turn processing

When you send a message the model runs through four stages:

  1. Planning gate - Decide whether a written plan is required (complex architectural changes) or the request can be executed directly (simple fixes).
  2. Research - Read files, search the codebase, check KIs, or fetch URLs. This is where the loop‑bug we just fixed lives.
  3. Execution - Call tools (edit files, run commands, launch a browser sub‑agent). Tools may be synchronous or async depending on dependencies.
  4. Verification - Run npm run check, test suites, or take a browser screenshot to confirm the result.
  5. Response - Return a concise summary, no fluff.

↑ Back to Top

What the artifact/brain system adds

The brain/ directory gives the model persistent working memory across a long task:

Without this, a multi‑session task would have to be reconstructed from conversation history alone, which degrades as the log grows.


↑ Back to Top

What the Knowledge Item (KI) system adds

KIs are the long‑term memory layer. After a significant session, Antigravity distils what was learned (e.g., "this repo uses X pattern for Y") into a structured note stored under knowledge/. On future sessions, KI summaries appear automatically in the context, preventing duplicated research.


↑ Back to Top

Practical advantages over a plain chat agent

AspectPlain chat agentAntigravity
RulesRe‑stated each prompt or forgottenAGENTS.md injected every turn - hard priority
Long‑task trackingRelies on scrolling the conversationtask.md + implementation_plan.md
Cross‑session memoryNoneKIs persist learnings
VerificationModel decides when it's donePlanning mode forces explicit verification step
Workspace awarenessNoneActive file, cursor, open docs injected automatically
Browser interactionNoneDedicated sub‑agent with recording

The net effect is fewer "I forgot what we agreed on" errors on long tasks and consistent rule enforcement.


↑ Back to Top

AGENTS.md

/Users/kai/Development/pi/AGENTS.md - Hard rules injected every turn, highest priority over all other instructions

↑ Back to Top

App Data Root

FileLocationPurpose
antigravity//Users/kai/.gemini/antigravity/Root - all Antigravity state lives here
mcp_config.json.../antigravity/mcp_config.jsonMCP server configuration
browserAllowlist.txt.../antigravity/browserAllowlist.txtDomains the browser sub‑agent may visit

↑ Back to Top

Brain - Per‑Conversation Working Memory

FileLocationPurposePhase
brain//.../antigravity/brain//One directory per session-
implementation_plan.mdbrain//implementation_plan.mdDesign doc written before complex changes; needs user approvalPlanning
task.mdbrain//task.mdLive checklist tracking progress through the planExecution
walkthrough.mdbrain//walkthrough.mdPost‑completion summary with diffs, screenshots, recordingsAfter completion
scratch/brain//scratch/Throw‑away scripts, temp data, debug outputExecution
overview.txtbrain//.system_generated/logs/overview.txtRaw JSONL transcript of every turnAuto‑written

↑ Back to Top

Knowledge Items - Cross‑Session Long‑Term Memory

FileLocationPurpose
knowledge/.../antigravity/knowledge/Persistent learnings distilled from past sessions
metadata.jsonknowledge//metadata.jsonKI summary, timestamps, source conversation references
artifacts/knowledge//artifacts/Detailed files: code snippets, architecture notes, patterns
knowledge.lockknowledge/knowledge.lockPrevents concurrent KI writes

↑ Back to Top

Other State


Document generated and formatted for readability.

You hit the nail right on the head. It is absolutely an intentional ecosystem play.


Google's official documentation for Antigravity explicitly states:


> "There is currently no support for bring-your-own-key or bring-your-own-endpoint."


Google didn't build a complete fork of VS Code and hand out free/subsidized access to massive frontier models out of pure altruism. They are executing a classic tech platform strategy, and there are a few big reasons why blocking OpenRouter or custom API base URLs serves their goals:


### 1. Driving Vertex AI & Gemini Adoption


Google is playing catch-up to OpenAI and Anthropic in the developer mindshare space. By building a incredibly powerful "agent-first" IDE that handles the editor, terminal, and browser seamlessly, they want to prove that Gemini 3 and Vertex Model Garden are elite engineering tools. If they let you swap the core brain out for OpenRouter, you'd just use cheaper endpoints or rival models, and Google loses the telemetry and adoption data.


### 2. Under-the-Hood Heavy Lifting (The Agentic Control Loop)


Antigravity isn't just sending simple chat prompts. When you tell it to build a feature, it spins up an "Agent Manager" that runs deep, multi-step loops: planning, executing code, running terminal commands, and analyzing the UI via a Chrome extension.


* To do this reliably, Google tunes the system heavily around Gemini's native tool-calling, long context windows, and structural output capabilities.

* If they let users plug in random, unstable, or poorly quantized open-source models via external proxies, the complex agent loops would constantly break, making Antigravity look bad.


### 3. The Subsidized Lock-In


Right now, Google is heavily subsidizing the computational cost of running these intense multi-agent workflows to get developers hooked on the Antigravity workflow. The moment you are locked into their specific system files, ~/.gemini/ configurations, and agent workflows, the friction to leave for Cursor or Windsurf becomes much higher.


### The Developer Pushback


Unsurprisingly, developers don't love being locked into a single ecosystem. Because Google is keeping the gates closed, the community has resorted to making unofficial auth bypasses (like the opencode-antigravity-auth project on GitHub) just to extract the models out of Antigravity and use them in open-source CLIs where they actually have endpoint freedom.


So yes, your intuition is 100% correct. The lack of a "Custom API URL" box isn't a missing feature they forgot to code-it's a deliberate fence to keep you in the Google yard.

Comments & Ratings

Leave a Comment

#

Loading ratings...

Loading comments...