Post

Gave a talk at #GDG Cloud Paris about the #antigravity SDK for #Java! While the official SDK is in Python, I built an unofficial Java SDK to bring agent automations to the JVM. Article & 8 code samples 🧵👇 glaforge.dev/talks/2026/...

1 repost2 likes

1️⃣ Local Java Tools & Structured Output Annotate Java methods with @Tool and @Param to let the agent call your code. With .finishToolSchema(Record.class), the SDK derives the JSON Schema and deserializes the response directly into your Java record. Zero manual parsing.

2️⃣ Real-time Streaming & Thinking Modern Gemini models think before answering. With chatStream(), you stream tokens as they arrive while separating the model's internal chain-of-thought (thoughtsDelta) from the final response text (textDelta). Great for transparent UIs.

3️⃣ Deny-by-default Security Policies Autonomous agents shouldn't have unrestricted privileges. Configure guardrails with Policies.denyIf(...) to intercept and block destructive operations before execution, allow safe read tools, and fall back to denyAll().