This document describes Google Antigravity, an agentic AI coding assistant developed by Google Deepmind's Advanced Agentic Coding team. Antigravity features a sophisticated dual-context architecture combining raw Conversation Logs with distilled Knowledge Items (KI), a browser automation subagent with video recording capabilities, and a workflow system with automatic execution annotations. The system emphasizes visual excellence in web development, strict workspace access controls, and persistent context management across sessions.
For information about other IDE-integrated assistants with similar features, see IDE-Integrated Development Assistants. For web development platforms with deployment capabilities, see Web-Based Development Platforms. For cross-system memory patterns, see Memory and Persistent Context Systems.
Sources: Google/Antigravity/Fast Prompt.txt1-18
Antigravity operates as a pair programming assistant with workspace-based file access, persistent context storage in .gemini/antigravity, and a comprehensive tool ecosystem. The system maintains strict boundaries between active workspaces and system directories, using URI-to-CorpusName mappings to control file access.
System Directory Structure: .gemini/antigravity
| Directory | Purpose | Key Files |
|---|---|---|
knowledge/ | Distilled Knowledge Items | metadata.json, artifacts/ |
brain/<conversation-id>/ | Raw conversation history | overview.txt, task_*.txt, artifacts/ |
brain/<conversation-id>/.system_generated/logs/ | System-generated logs | Various log files |
Sources: Google/Antigravity/Fast Prompt.txt1-301
Antigravity identifies itself as a pair programming assistant that prioritizes USER requests and uses metadata about the user's current state (open files, cursor position) to contextualize interactions. The system enforces absolute path requirements for all file operations and restricts access to active workspaces only.
Workspace Access Model
The system uses URI-to-CorpusName mapping to define accessible workspaces. Access is strictly limited:
C:\Users\Lucas\.gemini (system instructions only).gemini directoriesSources: Google/Antigravity/Fast Prompt.txt1-18
Knowledge Items represent the cornerstone of Antigravity's persistent context system. Each KI is a distilled, curated knowledge artifact stored in C:\Users\Lucas\.gemini\antigravity\knowledge, containing metadata.json and related artifacts/.
The system enforces a critical rule: BEFORE performing ANY research, analysis, or creating documentation, you MUST review KI summaries. This prevents redundant work and ensures existing knowledge is leveraged.
Correct Workflow Example:
USER: Can you analyze the core engine module?
ASSISTANT: Let me first check the KI summaries for existing analysis.
# From summaries: "Core Engine Architecture" with artifact: architecture_overview.md
ASSISTANT: [Calls view_file on architecture_overview.md]
ASSISTANT: There's already detailed analysis. Would you like me to enhance it?
Incorrect Workflow (Prohibited):
USER: Can you analyze the core engine module?
ASSISTANT: [Immediately calls list_dir and view_file] # ❌ WRONG - skipped KI check
ASSISTANT: [Creates new 600-line analysis] # ❌ WRONG - redundant work
| Scenario | Action | Example |
|---|---|---|
| Before research/analysis | Check KI summaries first | Debugging → Check for known bug KIs |
| Before documentation | Verify no existing KI | Architecture docs → Search for existing KIs |
| Relevant KI in summaries | Read artifacts FIRST | KI title matches request → Read before researching |
| New concepts | Search for related KIs | Unfamiliar pattern → Check for pattern KIs |
| Complex implementation | Check for workflow KIs | Multi-phase work → Look for similar past implementations |
KIs are snapshots from past work, not canonical references:
metadata.json to check original sourcesSources: Google/Antigravity/Fast Prompt.txt99-215
Antigravity maintains a dual-context system: raw Conversation Logs for historical data and distilled Knowledge Items for curated knowledge. This architecture enables efficient context retrieval without overloading the conversation context.
Use Conversation Logs when:
codebase_search, list_dir, grep_search)Use Knowledge Items when:
Do NOT use Conversation Logs when:
Sources: Google/Antigravity/Fast Prompt.txt216-301
Workflows are well-defined procedures stored as markdown files in .agent/workflows/, following a YAML frontmatter + markdown format. The system supports automatic execution through // turbo annotations.
| Method | Example | Behavior |
|---|---|---|
| Slash command | /deploy-app | Read .agent/workflows/deploy-app.md |
| Relevant workflow | User mentions deployment | Check if workflow looks relevant, then read |
| Create workflow | User requests | Create .agent/workflows/[filename].md with absolute path |
Turbo Annotation Rules:
// turbo above a step: Auto-run only that step if it involves run_command// turbo-all anywhere: Auto-run EVERY step that involves run_commandrun_command tool (not other tools)Sources: Google/Antigravity/Fast Prompt.txt78-98
Antigravity follows a strict 5-phase methodology for web development with an extreme emphasis on visual excellence and design aesthetics.
| Phase | Activities | Key Deliverables |
|---|---|---|
| 1. Plan and Understand | • Understand requirements • Draw inspiration from modern designs • Outline features | Requirements document |
| 2. Build Foundation | • Create/modify index.css• Implement design system • Define tokens and utilities | Design system CSS |
| 3. Create Components | • Build components using design system • Ensure predefined styles (NO ad-hoc) • Keep components focused and reusable | Component library |
| 4. Assemble Pages | • Update main application • Implement routing and navigation • Ensure responsive layouts | Complete pages |
| 5. Polish and Optimize | • Review user experience • Ensure smooth transitions • Optimize performance | Production-ready app |
Sources: Google/Antigravity/Fast Prompt.txt19-74
Antigravity enforces extreme design standards with an explicit failure condition: "If your web app looks simple and basic then you have FAILED!"
Antigravity automatically implements SEO best practices on every page:
| SEO Element | Implementation |
|---|---|
| Title Tags | Proper, descriptive title tags for each page |
| Meta Descriptions | Compelling descriptions that summarize page content |
| Heading Structure | Single <h1> per page with proper hierarchy |
| Semantic HTML | Appropriate HTML5 semantic elements |
| Unique IDs | All interactive elements have unique, descriptive IDs (for browser testing) |
| Performance | Fast page load times through optimization |
CRITICAL REMINDER: AESTHETICS ARE VERY IMPORTANT. If your web app looks simple and basic then you have FAILED!
Sources: Google/Antigravity/Fast Prompt.txt32-73
Antigravity enforces strict access boundaries to prevent unauthorized file operations and maintain workspace integrity.
All tools that accept file path arguments MUST use absolute paths. This is enforced at the tool-calling layer and documented explicitly in the system prompt.
Examples:
C:\Users\Lucas\OneDrive\Escritorio\antigravity\src\main.jssrc/main.js./main.js../utils/helper.jsThe .gemini directory is accessible but ONLY for system instruction purposes, not for project code:
Sources: Google/Antigravity/Fast Prompt.txt7-18
Antigravity provides a comprehensive tool suite organized into functional categories. All tools support the waitForPreviousTools parameter for controlling parallel vs. sequential execution.
| Tool | Use Case | Key Parameters |
|---|---|---|
write_to_file | Create new files | EmptyFile: boolean, Overwrite: boolean |
replace_file_content | Single targeted edit | TargetContent, ReplacementContent, StartLine, EndLine |
multi_replace_file_content | Multiple simultaneous edits | ReplacementChunks[] array |
| Tool | Best For | Parameters |
|---|---|---|
codebase_search | Fuzzy/semantic search, finding code by purpose | Query, TargetDirectories[] |
grep_search | Exact pattern matching, high-recall queries | Query, SearchPath, IsRegex, MatchPerLine |
find_by_name | Finding files/directories by name pattern | Pattern, SearchDirectory, Extensions[], Type |
search_in_file | Searching within a specific file | AbsolutePath, Query |
All tools support waitForPreviousTools parameter:
false or omitted: Execute immediately (parallel with other tools)true: Wait for all previous tool calls to complete (sequential)Best Practices:
Sources: Google/Antigravity/Fast Prompt.txt320-611
The browser_subagent tool enables browser automation with automatic WebP video recording. The subagent operates as a separate agent with browser-specific tools.
| Parameter | Description | Example |
|---|---|---|
RecordingName | All lowercase with underscores, max 3 words | login_flow_demo |
Task | Clear, actionable task for subagent | "Navigate to example.com, fill login form, click submit, and return when dashboard loads" |
TaskName | Human-readable title, properly capitalized | "Navigating to Example Page" |
waitForPreviousTools | Execute sequentially or in parallel | true / false |
open_browser_url tool fails, this is a browser issue outside your control. MUST ask user how to proceed and use suggested_responses tooluser_registration_flow, checkout_process, search_functionalityrecording1, ❌ test, ❌ demologin_flow_demo not LoginFlowDemo or login-flow-demoSources: Google/Antigravity/Fast Prompt.txt326-336
Antigravity follows specific communication guidelines to ensure clarity and maintain an appropriate level of proactiveness.
<FileRef file-url="https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools/blob/ae37329a/label" undefined file-path="label">Hii</FileRef>| Scenario | Appropriate Behavior | Inappropriate Behavior |
|---|---|---|
| User asks to add component | Edit code, verify build/test, perform obvious follow-ups | ✓ Appropriate |
| User asks HOW to approach something | Answer the question, don't edit files | ❌ Jumping into editing |
| Completing user's task | Proactive follow-up actions in service of task | ✓ Appropriate |
| User hasn't requested action | Making changes without request | ❌ Surprising the user |
Sources: Google/Antigravity/Fast Prompt.txt302-307
Antigravity supports Model Context Protocol (MCP) resources for extended functionality.
| Tool | Purpose | Parameters |
|---|---|---|
list_resources | List available resources from MCP server | ServerName (optional) |
read_resource | Retrieve specific resource contents | ServerName, Uri |
Both tools support the waitForPreviousTools parameter for execution control.
Sources: Google/Antigravity/Fast Prompt.txt420-436
Antigravity's architecture distinguishes itself through several unique design decisions:
brain/) and distilled Knowledge Items (in knowledge/) with a background KNOWLEDGE SUBAGENT that mines conversations// turbo and // turbo-all for automatic command execution in workflowsThese features position Antigravity as a sophisticated agentic coding assistant with strong emphasis on visual excellence, persistent context management, and structured workflows.
Refresh this wiki