❯ Guillaume Laforge

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...

Wiring ADK Kotlin agents in an Android application

With the launch of ADK for Kotlin, it means you can power up your Android applications with agents.

My colleague Jolanda Verhoef built an Android app that integrates an ADK agent written in Kotlin. It’s an app with a chat interface that lets you ask fun facts about anything you want.

Tip

You can check out the video of the Google I/O session that introduced ADK for Kotlin & Android, you’ll find another example agent in the demo near the end of the session.

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...

Creating a Wikipedia MCP Server in Java in a Few Prompts with Skills

Since I started using Model Context Protocol (MCP) to equip my AI agents with useful tools, I’ve been looking for ways to quickly build and iterate on local servers. A few weeks ago, I shared how to easily build a local MCP server in Java with a custom skill in Gemini CLI. Today, I wanted to put that skill to the test by creating a Wikipedia MCP server.

What’s impressive is that I didn’t even have to leave my terminal or read documentation. The entire process was a conversation with Gemini CLI, leveraging its ability to search the web, find libraries, and even check migration guides!

Read more...

Building my Comic Trip agent with ADK Java 1.0

I’m happy to echo here the release of ADK for Java v1.0, Google’s Agent Development Kit framework to build AI agents in Java. I spent a lot of time on this project. I also wrote the announcement blog post on the Google for Developers blog. And I’ve recorded this YouTube video highlighting some of the new features of the framework, in which I’m demonstrating some of them via an app I built: my Comic Trip agent (pun intended).

Read more...

Generating music with Lyria 3 and the Gemini Interactions Java SDK

Generative AI isn’t just about text or images (with Nano Banana) but it’s also great at generating videos (with Veo 3). And now with the recently released Lyria 3 model from DeepMind, you can create some engaging and creative music with lyrics (generated, or your own) or invent a calming instrumental track to loop in the background of your online TikTok or YouTube Shorts.

And of course, if you’re a Java developer like me, you can do all that in Java!

Read more...

Extracting JSON from LLM chatter with JsonSpotter

LLMs are great at generating structured data, in particularly those which support a strict JSON output mode (sometimes also called structured decoding), but sometimes they give you a bit more than the requested JSON. You get a Markdown code block wrapped in “Here’s the data you asked for:” and “Hope this helps!”. If you’re lucky, the JSON is valid. If you’re not, it has trailing commas or comments that break standard parsers.

Read more...

Fixing AI Slop with a Skill in Gemini CLI

We all recognize AI writing when we see it. As language models get used for everything, their specific tics are everywhere. People call this “AI slop”. The grammar is fine, but the text is boring, repetitive, and lacks any real voice.

A site called tropes.fyi tracks these patterns. It lists the exact words and structures that give AI away. You’ll see callouts for overused adverbs like “deeply” and “arguably,” the dreaded “delve” family, and structural crutches like “It’s not X, it’s Y.”

Read more...