Google Antigravity SDK Runs Gemma 4 Locally: 24GB Memory, LiteRT and Ollama Setup


Google added local-model support to the Antigravity SDK on September 23, 2026, giving developers an official path to run agentic workflows entirely on their own machine. The initial optimized configuration pairs Gemma 4 26B A4B with LiteRT-LM. Google recommends more than 24GB of VRAM or unified memory and a 64K context size for that model.

The same SDK can also connect to local OpenAI-compatible servers through LocalOpenAIAgentConfig, including Ollama, LM Studio and vLLM. That makes the update useful beyond Google's reference Gemma configuration: agent orchestration, tools and workflows can stay in Antigravity while inference is supplied by a compatible local server.

For local-only execution, the SDK documentation says no API key or cloud connectivity is required. The LiteRT path starts a loopback OpenAI-compatible server backed by the local checkpoint, while tool execution and model inference remain on-device.

Local execution options

Path Backend Authentication Best fit
LiteRTAgentConfig LiteRT-LM None for local execution Google's optimized Gemma 4 26B A4B path
LocalOpenAIAgentConfig OpenAI-compatible local server None for local execution Ollama, LM Studio, vLLM and compatible runtimes

Google currently says the LiteRT integration works best with gemma-4-26B-A4B-it-gpu.litertlm. Other .litertlm checkpoints may have weaker compatibility, so the 26B A4B checkpoint is the reference configuration for evaluating the new local path.

Hardware requirements for Gemma 4 26B A4B

Google recommends a machine with more than 24GB of VRAM or shared/unified memory for its Gemma 4 26B A4B workflow. The SDK README also recommends a 64K context size.

That memory recommendation places the reference configuration above typical 8GB, 12GB and 16GB consumer GPUs. Systems with 24GB discrete GPUs sit near the published threshold, while higher-memory GPUs and unified-memory systems provide more capacity for the model, KV cache and agent workload.

Google has not published a universal tokens-per-second figure for this Antigravity configuration. Actual throughput depends on the machine, model representation, context length and workload, so hardware selection should start with memory capacity before performance expectations.

Install the Antigravity SDK and LiteRT-LM

Google's reference setup uses a Python virtual environment and installs both packages from PyPI:

python3 -m venv .venv
source .venv/bin/activate
pip install google-antigravity litert-lm

The SDK repository specifies Python 3.10 or later. Its package metadata currently identifies the project as google-antigravity, version 0.1.18, under the Apache-2.0 license.

The SDK includes a compiled runtime binary in its platform-specific PyPI wheels. Google's repository therefore directs users to install google-antigravity from PyPI instead of relying on a source clone alone.

Import Gemma 4 26B A4B

Google's September 23 example imports the LiteRT-optimized checkpoint from the litert-community Hugging Face repository:

litert-lm import \
  --from-huggingface-repo=litert-community/gemma-4-26B-A4B-it-litert-lm \
  gemma-4-26B-A4B-it-gpu.litertlm \
  gemma4-26b

After import, point LiteRTAgentConfig at the local model file:

import asyncio
import os
from google.antigravity import Agent, LiteRTAgentConfig

MODEL_PATH = os.path.expanduser(
    "~/.litert-lm/models/gemma4-26b/model.litertlm"
)

async def main():
    config = LiteRTAgentConfig(model_path=MODEL_PATH).lightweight()

    async with Agent(config) as agent:
        response = await agent.chat("Summarize the files in this directory.")
        async for token in response:
            print(token, end="", flush=True)

asyncio.run(main())

This path is designed for offline inference. File access and other agent capabilities still depend on the tools and policies granted to the agent, so local inference should be paired with an explicit workspace and permission policy appropriate to the task.

Use Ollama, LM Studio or vLLM instead

The SDK also exposes LocalOpenAIAgentConfig for an external OpenAI-compatible endpoint. Google's documentation names Ollama and LM Studio as supported examples, while its September announcement also lists vLLM.

This path is useful when a model already runs through an existing local inference stack. The Antigravity layer can provide the agent loop, conversation state and tools while the local server remains responsible for inference.

The practical distinction is runtime ownership. LiteRTAgentConfig manages Google's on-device LiteRT path; LocalOpenAIAgentConfig connects Antigravity to a separately running compatible server.

What stays local

Google describes the local configuration as capable of running without an API key or cloud connection. In the LiteRT path, inference and tool execution run on-device. That can be useful for source code, internal documents and other workloads where sending prompts or context to a hosted model is undesirable.

The September 23 demonstration used a hybrid architecture as well. A cloud Gemini 3.8 Flash planner received filenames and task descriptions while local Gemma 4 workers processed the source code. Google reports that 3,322 tokens, or 97.2% of the demonstrated workflow's tokens, ran locally. That figure describes Google's recorded example, not a guaranteed ratio for other workloads.

Hybrid operation gives teams another deployment option: keep sensitive or token-heavy execution local while reserving a hosted model for planning tasks that do not require the underlying private content.

Agent permissions still matter

Local inference changes where model computation happens; it does not remove the security implications of an agent that can read, modify or execute files. The Antigravity SDK defaults its simple agent configuration to read-only behavior. Additional capabilities and write access are explicitly configurable.

For development machines, use the narrowest workspace and tool permissions that satisfy the workflow. A local model can still make destructive tool calls when the surrounding harness grants those capabilities.

Who should use the LiteRT path

The LiteRT configuration is the most direct option for developers with sufficient local memory who want Google's tested Gemma 4 setup and fully on-device execution. Existing Ollama, LM Studio or vLLM users can instead preserve their current serving stack and connect through the OpenAI-compatible configuration.

The >24GB memory recommendation is the main hardware constraint for Google's reference 26B A4B setup. Developers on smaller systems can use the OpenAI-compatible route with a model that fits their hardware, while retaining the Antigravity SDK's orchestration layer.

Bottom line

Antigravity's local-model support turns the SDK into a practical orchestration layer for offline agents. Google's reference path combines Gemma 4 26B A4B with LiteRT-LM and targets machines with more than 24GB of VRAM or unified memory. The OpenAI-compatible path broadens the deployment options to existing Ollama, LM Studio and vLLM installations.

The key deployment decision is therefore the local inference backend and available memory: LiteRT offers Google's optimized Gemma path, while an OpenAI-compatible server provides greater freedom to choose a model and runtime that already fit the machine.

Sources