Antigravity SDK for Java v0.2.17 - Local AI Models (LiteRT LM) & Python SDK v0.1.18 Parity
LatestAntigravity SDK for Java v0.2.17
We are thrilled to announce Antigravity SDK for Java v0.2.17! 🚀
This release brings full feature parity with the upstream Python Antigravity SDK v0.1.18 and incorporates native support for On-Device Local AI Models (via LiteRT LM, Ollama, LM Studio, vLLM, and other OpenAI-compatible backends) as highlighted in the Google Developer blog.
🌟 Highlights & New Features
1. 📴 On-Device Local AI Models (LiteRT LM & Local Endpoints)
Run agents 100% offline, on edge hardware, or in air-gapped environments without cloud dependencies.
- LiteRT LM Support: Connect natively to local models accelerated by GPU/NPU (Gemma 2, Gemma 3, Gemma 4, etc.) via
LiteRTAgentConfig. - OpenAI-Compatible Local Engines: Connect to Ollama, LM Studio, vLLM, or LocalAI using
LocalOpenAIAgentConfig. - First-Class Agent Ergonomics: Full compatibility with
Agent(LiteRTAgentConfig)andAgent(LocalOpenAIAgentConfig)constructors, retaining full tool calling, filesystem workspaces, safety policies, and real-time streaming chunks.
// Running an offline agent with LiteRT LM and Gemma
LiteRTAgentConfig config = LiteRTAgentConfig.builder()
.model("gemma4-e2b")
.port(9379)
.systemPrompt("You are a high-performance offline code analyst.")
.build();
try (Agent agent = new Agent(config)) {
AgentResponse response = agent.chat("Analyze this code snippet").get(30, TimeUnit.SECONDS);
System.out.println(response.content());
}2. 👥 Subagents with Dedicated Model Targeting
Subagents can now declare their own specific LLM model targets via modern Java 21 SubagentConfig records:
- Route fast lookups and tool parsing to smaller, faster models (
gemini-3.8-flashor local Gemma models). - Keep heavy architectural analysis on deep reasoning models (
gemini-3.1-pro-preview). - Strict typing and builder ergonomics with full record immutability.
SubagentConfig researcher = SubagentConfig.builder()
.name("researcher")
.description("Fast documentation and code search specialist")
.model("gemini-3.8-flash")
.systemPrompt("Search reference docs and return concise findings.")
.build();
AgentConfig orchestrator = AgentConfig.builder()
.model("gemini-3.1-pro-peview")
.subagents(List.of(researcher))
.build();3. ⏰ Task Scheduling & Background Execution Tools
Empower autonomous agents with background execution and persistent scheduling:
scheduleTool: Schedule one-shot timers (DurationSeconds) or recurring cron jobs (CronExpression) with automatic notification callbacks.manage_taskTool: Inspect running background tasks, check status and output logs, send interactive stdin input, or terminate tasks.- Seamlessly pairs with background daemon processes for long-running workflows.
4. 🎯 Benchmark Evaluation Preset
Added an out-of-the-box evaluation configuration preset for running standardized benchmarks and agent evaluations:
AgentConfig evalConfig = AgentConfig.builder()
.eval()
.build();5. 🛡️ Programmatic Hook Argument Modification
Interception hooks can now safely inspect, sanitize, and alter tool arguments before execution using structured maps or JSON nodes matching Protobuf google.protobuf.Struct:
agent.addPreToolHook((context, toolCall) -> {
if ("run_command".equals(toolCall.toolName())) {
Map<String, Object> sanitizedArgs = new HashMap<>(toolCall.arguments());
sanitizedArgs.put("CommandLine", "safe-prefix " + sanitizedArgs.get("CommandLine"));
return CompletableFuture.completedFuture(HookResult.allowedWithModifiedArgs(sanitizedArgs));
}
return CompletableFuture.completedFuture(HookResult.allowed());
});6. 📐 OpenAPI JSON Schema Normalization
Enhanced automatic schema translation for model endpoints. Converts legacy snake_case validation keywords (min_items, max_items, exclusive_minimum, etc.) into OpenAPI camelCase specifications (minItems, maxItems, exclusiveMinimum), ensuring flawless tool calling compatibility across both Google and OpenAI-compatible endpoints.
###87. 📦 Synchronized Upstream Go localharness 0.1.18
All 6 pre-compiled native Go binaries packaged in antigravity-sdk-harness have been updated to upstream version 0.1.18:
linux-x86_64linux-aarch64osx-x86_64osx-aarch64(Apple Silicon)windows-x86_64windows-aarch64
🛠️ Codebase & Quality Enhancements
- Strict Java 21 Records: All data transfer objects and configurations (
SubagentConfig,AgentResponse,UsageMetadata, etc.) leverage modern record semantics. - End-to-End Live Testing: Verified live streaming, tool calling, and local inference against both Google Gemini and LiteRT LM running Gemma 4.
📥 Getting Started
Add the dependency to your pom.xml:
<dependency>
<groupId>io.github.glaforge</groupId>
<artifactId>antigravity-sdk-wrapper</artifactId>
<version>0.2.17</version>
</dependency>For offline or air-gapped deployments containing the native binaries:
<dependency>
<groupId>io.github.glaforge</groupId>
<artifactId>antigravity-sdk-harness</artifactId>
<version>0.2.17</version>
<classifier>all</classifier>
</dependency>📝 Commits & Contributors
Features
da0e1e8: achieve full parity with upstream Antigravity SDK v0.1.18 and LiteRT local inference
Tasks
2634ba3: Releasing version v0.2.17b03dae0: Bump for next development cycle
Special thanks to @glaforge and the Antigravity team!