Google Antigravity is an AI-first software development platform and agentic coding environment comprising a desktop application, IDE extensions, and the agy command-line interface.
Antigravity operates a unified, fine-grained permissions engine formatted as action(target) (such as read_url(*), command(git), or write_file(src/)). Operations are evaluated across three priority tiers: Deny > Ask > Allow.
When managing permissions (via the /permissions interactive TUI in agy or the settings panel), permissions are split into three distinct scopes:
agy CLI.| Scope | Location on Disk | Description |
|---|---|---|
| Project Permissions | ~/.gemini/config/projects/<project-uuid>.json |
Project-scoped permission grants and trusted settings, keyed to the local repository directory path. |
| Global CLI Settings | ~/.gemini/antigravity-cli/settings.json |
User-level global settings and global permission grants. |
| Shared Antigravity Config | ~/.gemini/config/ / ~/.gemini/antigravity/ |
Cross-surface preferences and shared state. |
Project permissions cannot be defined or committed directly within the Git repository folder itself (such as a checked-in .antigravity/permissions.json).
This design is a deliberate security boundary:
AGENTS.md, GEMINI.md, and .agents/), while actual permission authorizations remain strictly under the developer's local user-level control.The Antigravity Java SDK (io.github.glaforge.antigravity:antigravity-sdk-wrapper) provides a programmatic Java interface over the local Antigravity localharness binary via gRPC and Protocol Buffers.
GEMINI_API_KEY)When instantiating io.github.glaforge.antigravity.Agent, Agent.resolveGeminiApiKey() resolves the Gemini API key used for both the localharness child process environment and the gRPC GeminiAPIEndpoint configuration in the following order:
System.getProperty("GEMINI_API_KEY")System.getenv("GEMINI_API_KEY").local.env file in the current working directory (GEMINI_API_KEY=...)Passing GEMINI_API_KEY only via AgentConfig.builder().environmentVariables(Map.of("GEMINI_API_KEY", ...)) is not sufficient on its own, because resolveGeminiApiKey() does not inspect config.getEnvironmentVariables() when configuring GeminiAPIEndpoint (falling back to "placeholder"). When bridging from another environment variable (such as TEST_GEMINI_API_KEY), set System.setProperty("GEMINI_API_KEY", apiKey) before constructing new Agent(config).
workspaceDir): Defaults to Path.of(System.getProperty("user.dir")) (e.g., the Gradle subproject directory during test execution) and sets the ProcessBuilder working directory for localharness.workspaces): Defaults to an empty list (List.of()). To declare FilesystemWorkspace entries in HarnessConfig for built-in file/grep tools and workspace containment, call .addWorkspace(String) or .workspaces(List<String>) on AgentConfig.Builder.GEMINI_API_KEY (without a custom baseUrl or Vertex AI ADC), localharness connects directly to the Google AI Studio / Gemini Developer API via GeminiAPIEndpoint, billed/attributed to the project that owns the API key.Conversations executed through antigravity-java-sdk do not appear in the local Jetski / Antigravity IDE UI because:
Agent spawns an isolated, headless localharness Go binary (~/.antigravity/bin/<slice>/localharness) over an ephemeral localhost WebSocket port rather than connecting to the running IDE daemon.saveDir): AgentConfig.Builder defaults saveDir to ${java.io.tmpdir}/antigravity-java (e.g. /tmp/antigravity-java/<cascadeId>.db) and appDataDir to "", whereas the Jetski UI stores its state under ~/.gemini/jetski.While localharness persists multi-turn state on disk in <saveDir>/<cascadeId>.db (resumable via .conversationId(id)), neither localharness.proto nor Agent exposes a read-back API to list historical messages from a .db file after the fact. Instead, conversation history can be captured in real time during each turn via:
agent.streamChat(prompt) (AgentStream), which provides Flow.Publisher streams for chunks() (textDelta and thinkingDelta), thoughts(), toolCalls(), and result() (CompletableFuture<AgentResponse> with UsageMetadata).PreTurnHook, PostTurnHook, PreToolCallDecideHook, PostToolCallHook, OnToolErrorHook, OnCompactionHook, OnStopHook) to capture tool calls, tool responses, and turn boundaries.In addition to local execution via localharness, the Antigravity Managed Agent (antigravity-preview-09-2026) can be invoked remotely through the Gemini Interactions API (com.google.genai.gaos.models.interactions.CreateAgentInteraction in com.google.genai:google-genai).
Managed agent interactions execute inside isolated, Google-hosted Linux sandboxes (Google Cloud Gemini Agent Environments):
CreateAgentInteractionEnvironment.of("remote") for an empty sandbox, or CreateAgentInteractionEnvironment.of(Environment) to pre-mount sources and configure network egress.SourceType): Environment.builder().sources(List<Source>) supports pre-populating the sandbox before the agent loop starts:
SourceType.REPOSITORY: Clones a Git repository from source URL into target (e.g., /workspace/repo, up to 500 MB).SourceType.GCS: Copies a file or directory from a gs:// Cloud Storage URI into target (up to 2 GB).SourceType.INLINE: Writes inline text content directly to target (up to 1 MB per file, 2 MB total), useful for injecting .agents/AGENTS.md or SKILL.md files.Interaction returns interaction.environmentId(), which can be passed into subsequent CreateAgentInteraction calls (CreateAgentInteractionEnvironment.of(environmentId)) to reuse the persistent filesystem across turns, or explicitly deleted via client.environments.deleteEnvironment(environmentId) when finished.