Post

The #antigravity team announced running local Gemma models on-device with LiteRT. Good news for #Java developers: you can do this in Java too! Antigravity Java SDK v0.2.17 is out, reaching full parity with Python SDK v0.1.18. Walkthrough 🧵👇 glaforge.dev/posts/2026/... x.com/antigravity...

x.comGoogle Antigravity (@antigravity) on XRun open models like Gemma 4 completely offline in the Antigravity SDK. Built on Google AI Edge’s LiteRT, you can now run Gemma 4 directly on your local GPU. Zero API costs, total data privacy, a…

Why run local models for agents? • Zero API costs: run repetitive tasks and test assertions without racking up tokens • Data privacy: proprietary code and docs stay on your machine • Offline capable: build and test without internet • Low latency: no roundtrips over the wire

Step 1: LiteRT-LM setup Install the on-device runtime: pip install litert-lm Download a Gemma model: litert-lm import --model-id litert-community/gemma-4-E2B-it-litert-lm --output-dir ~/.litert-lm/models/gemma4-e2b/ Serve locally: litert-lm serve --port 9379

Step 2: Connect from Java Configure your agent with LiteRTAgentConfig pointing to your local model path and port 9379. The SDK manages the harness lifecycle and connects to LiteRT-LM's local endpoint. Call agent.chat() as usual, but completely on-device!

Antigravity Java SDK v0.2.17 also brings: • Subagents with dedicated model targeting (route subtasks to smaller models) • Task scheduling tools (schedule & manage_task) • Tool argument rewriting via hooks • Synchronized native harness across macOS, Linux & Windows

No replies yet.