❯ Guillaume Laforge

Java

The Unofficial Antigravity SDK for Java

Before heading for well-deserved vacations, I wanted to share something I’ve been cooking on and off for the past few weeks: an unofficial Java SDK for Antigravity.

If you’re familiar with Antigravity, you’ll know it’s available across different surfaces:

  • Antigravity 2.0: an agent manager for the Antigravity harness, where you can work across multiple projects and sessions from a rich UI,
  • Antigravity CLI: a CLI coding agent, where you can interleave running terminal commands, with active agent coding actions,
  • Antigravity IDE: a VSCode fork, with an integrated Antigravity chat assistant, when you want to be deep into the code,
  • Antigravity SDK: which is actually a toolkit you can integrate and manage yourself, to create your own Antigravity harness.

Antigravity surfaces
Antigravity surfaces

Read more...

Running Gemma 4 locally on Mac: Benchmarking Qxotic Jinfer, llama.cpp, MLX, and connecting Java 25 with LangChain4j

As a Java developer, integrating Large Language Models (LLMs) into applications is becoming a core requirement. While cloud APIs like Google Gemini, Anthropic’s Claude, or OpenAI’s GPT are convenient, running models locally on my machine offers lower latency, zero API costs, privacy, and full control over system telemetry. I can even run models disconnected from the internet, when I’m travelling in a train or a plane!

When Google released Gemma 4, I wanted to find the best way to run Gemma 4 locally on my Apple Silicon Mac (equipped with 48GB of unified RAM) and consume it seamlessly from Java 25 using LangChain4j.

Read more...

Antigravity Brain Visualizer Now With a Contextual Smart Chat

A few weeks ago, I wrote about building the Antigravity Brain Visualizer: a tool to parse raw JSONL transcript logs from Antigravity AI agent sessions and render them into an interactive web interface with proportional timelines and sequence groupings.

While visual timeline scrubbing and sequence filtering made it easier to inspect what an agent did, diagnosing complex tool failures or creating preventative guardrails still required manual investigation:

  • Why did a tool call fail at step #38?
  • What sequence of events led up to a specific error?
  • Could I automatically turn a failure pattern into an Agent Skill to prevent Antigravity from repeating the mistake?

To address these questions directly within the application, I built the Interactive Session Assistant in v0.4.1 of the Antigravity Brain Visualizer. It transforms the visualizer from a passive log viewer into an interactive diagnostic co-pilot.

Read more...

Creating Images and Videos in Java With the New Nano Banana and Omni Models

Google just announced the launch of some new image and video models: Nano Banana 2 Lite (the fastest, most cost-efficient Gemini Image model yet) and Gemini Omni Flash for high-quality video and conversational editing. You can read all about the announcement on the Google Blog.

As soon as I saw the news, I couldn’t wait to get my hands dirty. I wanted to see how easy it would be to generate images and videos using the Gemini Interactions API Java SDK.

Read more...

Gemini Interactions API now GA: Exploring the release candidate of my Java SDK

The Google Gemini Interactions API is now generally available (GA). It provides a unified interface for interacting with Gemini models and agents. You can read the official announcement on the Google Blog, and if you are using Python, Philipp Schmid published a helpful developer guide to get started.

For Java developers, the Gemini Interactions API SDK for Java is gearing up for its stable release with the availability of v1.0.0-RC1. Here is a look at what is new in this release candidate.

Read more...

Building a Visualizer for Antigravity Agentic Development Sessions

When working with autonomous AI agents like Antigravity, understanding what they are doing in the background can be difficult. The agents construct reasoning chains, dispatch background tasks, and execute system commands over long sessions. All of this is recorded in detailed JSONL transcript files. Reading raw JSONL is inefficient, so I built the Antigravity Brain Visualizer to parse and render these transcripts into an interactive interface.

Note

You can learn more about the project, view the source code, and download the visualizer app directly from the GitHub repository.

Read more...

Managed AI Agents with the Gemini Interactions Java SDK

Google recently announced Managed Agents in the Gemini API at Google I/O. This feature allows developers to run autonomous agents that “reason, plan, use tools, and execute code inside isolated cloud sandboxes”.

Rather than requiring developers to manually build, secure, and scale the execution environment (including sandbox containers, network routes, and runtime engines), the Gemini API handles this infrastructure. This is powered by the Antigravity agent running on Gemini 3.5 Flash.

This article shows how to implement these agentic capabilities in Java using the Gemini Interactions SDK.

Read more...

Streaming Gemini 3.1's expressive new TTS model in Java

Google just released Gemini 3.1 Flash Text-to-Speech (TTS), a new expressive TTS model that you can steer with audio tags and scene descriptions.

I wanted to see how it worked with the Gemini Interactions SDK for Java.

Expressive control

The model sounds natural out of the box, but the real benefit is the control you have over expressiveness. By defining “Audio Profiles”, “Scene Details”, and “Director’s Notes” in your prompt, you can control the character’s pacing, tone, and environment.

Read more...

A Simple Coding Agent in a Loop with LangChain4j, Jbang, and Gemini

A few days ago, Max Rydahl Andersen published a fascinating article about nanocode: a minimalist Claude Code alternative implemented in just 260 lines of Java (inspired from a 250-line Python equivalent). It was a masterclass in “leanness,” using raw HTTP calls and Jackson JSON parsing, an OpenRouter or Anthropic LLM endpoint, to create an autonomous coding loop.

I loved the concept, but I had a very practical motivation to take it in a different direction: I don’t have a Claude subscription. 😃

Read more...

An ADK Java agent powered by Gemma 4

Today, DeepMind announced the release of Gemma 4, a very impressive and powerful new version of the Gemma family of models. As I’ve been contributing to ADK Java a fair bit recently, I was curious to see how I would configure ADK Java agents to work with Gemma 4.

In this article, we’ll explore 3 paths:

  • Calling the AI Studio API surface directly,
  • Calling Gemma 4 hosted via a vLLM instance thanks to the LangChain4j bridge.
  • Calling Gemma 4 locally via Ollama

With the appropriate model weights format, we’ll also be able to run Gemma 4 locally via Ollama. But that’s for another day.

Read more...