DevFest Milano 2026
Saturday 10 October 2026, Randstad Box, Via San Vigilio. My third DevFest Milano in this building, and the first one from the front of the room: at half eleven, in the Coworking track, Stefano Soriano and I gave AI On-Device — Cooking from your fridge with Gemini Nano, MobileCLIP and Gemma, the story of AI Pantry, the Android app we built to look inside your fridge and suggest what to cook tonight, without a single photo ever leaving the phone.
Around it, a whole day of DevFest Milano, put on as every year since 2024 by GDG Milano and GDG Cloud Milano together, and with one theme this time: the year AI stops just answering and starts acting. Four tracks in parallel from nine to a quarter past six — Nexus, Coworking, Workshop, and a Secret Track held around one long meeting table — a handwritten sign pointing the way to all four, a neon sign in a red window nook, and a LEGO minifigure with the Duomo on its t-shirt.
- AI On-Device
- DevFest
- Gemini Nano
- Gemma 4
- MobileCLIP
- Android
- AI agents
- GDG Milano
Three DevFests at the Randstad Box
The same building three autumns running: twice in the audience, and this year with a microphone.
- 2024 Milano, Randstad Box 23 November, 276 signed up — in the audience
- 2025 Milano, Randstad Box 11 October, 365 signed up — in the audience, and in the group photo from a drone
- 2026 Milano, Randstad Box 10 October — on stage with Stefano Soriano: AI On-Device
AI On-Device
The talk opens with a question: what happens when you decide to run all of your app's AI on the phone itself? No cloud, no API keys, no photos of your users' kitchens sitting on somebody's server. The answer is AI Pantry — you photograph the fridge and the pantry, the app recognises the ingredients, remembers what you have and writes a recipe out of it — and the talk is the honest version of how it got built: not just the architecture that works, but the two that did not, and what each of them cost.
Me, a couple of minutes in
From the second slide to the third: the question, and the app that answers it — scan the fridge, get dinner, 100% on-device.
I took the first half: why on-device at all — privacy before anything else, since no server ever sees the photo, there is no data processing agreement to sign, no retention policy to worry about and no log to leak; then resilience and cost, because a fridge is often where the signal is worst and every cloud call is paid for again by every user, every day — and chapter one, Gemini Nano. Stefano took it from Gemma onwards.
Five chapters and a bonus
- Gemini Nano, via ML Kit GenAI — the obvious choice: already in the operating system, multimodal, one Gradle dependency and zero megabytes in the APK. Except that it runs only on the latest flagships, not on the phones most people actually own. So: an upgrade, never the base, and
checkStatus()before every single call. - One model to rule them all: Gemma 4 E2B — bring your own open model and ask it both to look at the fridge and to write the recipes. It worked: correct ingredients, valid JSON, real recipes. It also took 5–10 minutes per scan on a Pixel 7, because a photo becomes hundreds of image tokens to prefill before the first word, and then every word is decoded one token at a time through two billion parameters.
- Zero-shot detection with MobileCLIP-S2 — recognising ingredients does not need a model that writes, it needs one that compares. "Is this an orange?" becomes a cosine similarity, and the classifier becomes a text file of hand-picked labels. Same phone, same photo of the fridge: minutes → seconds.
- Where the LLM earns its place — Gemma comes back for the one job no vocabulary can do, writing the recipes, text only this time: two-stage prompting, defensive JSON parsing with silent retries, 15–25 tokens a second.
- Distribution — every model travels differently: Gemini Nano costs zero megabytes, MobileCLIP's ~140 MB ride inside the APK, and Gemma's 2.6 GB go through Play for On-device AI as AI packs.
- Bonus, after the credits: EmbeddingGemma 2 — Google DeepMind's new on-device embedding model, released four days earlier and built on Gemma 4, open under Apache 2.0, shown on the app's hidden page where every task's model can be picked by hand.
The closing slide fitted in one line: before asking how to make a model faster, ask whether it is the right model.
AI On-Device, slide by slide
All the slides with our speaker notes, the real screens of the app, the demo recording and every photo from the room — to read as a document or to play as a presentation, in Italian or English.
- 29 slides
- speaker notes
- demo recording
- 22 photos
My half: why on-device, and Gemini Nano
The Coworking room, at half eleven
"What happens when you run all of your app's AI on the phone?"
AI Pantry: scan the fridge, get dinner
Resilience, and the cloud bill
Two of us, one title slide
"Today we are telling you a story. A true one."
Why on-device: privacy, first of all
Mid-sentence, against the navy wall
Explaining, with Stefano waiting for his turn
Stefano's half: from minutes to seconds
Stefano took the part where things went wrong and then right: the prompt that asked Gemma to look at the fridge and answer in JSON, the arithmetic of prefill and decode that made it crawl, the text file that replaced it, and Gemma coming back to do the one thing only an LLM can. Near the end, the phone itself went up on the screen.
Chapter two: ask the LLM to look, and to write
Live: the hidden page, a model for every task
Questions
The last slides were a Grazie with both our faces on it and the link to the code, and a QR code for feedback on the talk. Then the microphone went round the room.
Questions, under the Grazie slide
At the Grazie slide, my turn again
Neon, LEGO and stickers
The Randstad Box again: the co-working space a few minutes from Famagosta, on the green line. Before nine the corridor was already full, and there was a neon DevFest Milano sign glowing in the four Google colours, a table covered in stickers — Gemini, Google Cloud, the DevFest artwork — and a coffee corner with the edition chalked on a blackboard. At nine the welcome slide put the date, the venue and the two chapters on the screen, and the day split into four rooms.
DevFest Milano, in neon
A LEGO minifigure, Duomo on the t-shirt
Gemini, Google Cloud, DevFest: take a few
The corridor, before nine
Welcome: 10 October 2026, Randstad Box
The coffee corner, edition chalked on the board
The morning, in four rooms
Half nine, four rooms at once. Tomas Piaggio opened the Coworking room with multimodal RAG on Gemini and Firestore, "oltre il testo"; in Nexus, Matteo Gazzurelli asked what is left for developers when agents write the code — and his slide for the answer was the specification. The Secret Track had no stage at all, just a meeting table with laptops open on it, for Fabio Biondi on generative UI. Before the coffee break, Alfredo Morresi from Developer Relations at Google had a team of AI minions taking orders over Discord, and Balazs Horvath reported on giving AI twelve weeks to build the perfect employee. At half eleven, while we were starting, the Secret Track was on bug bashes and the workshop room was designing AI agents like Ford's assembly line; right after us, in our room, came a talk on becoming a founding engineer.
"Oltre il testo": multimodal RAG, first slot of the day
"The spec is the lever"
The Secret Track: one long table, laptops open
Alfredo Morresi, and his AI minions
"We gave AI twelve weeks to build the perfect employee"
The Bug Bash Playbook, in the same half hour as ours
Designing AI agents like Ford's assembly line
Right after us, same room: the founding engineer, seen from the window nook
The afternoon: agents, everywhere
After lunch the agents got specific. Emmanuele Villa took an Android app from prompts to production with skills and MCP tools, with NASA's Astronomy Picture of the Day as the API to build against; Andrea Alberto did agentic commerce with Milano Centrale as the proving ground; Francesco Montelli put a natural-language interface over an observability stack, on the grounds that an incident does not speak PromQL. Then the security end of it — Seif on managing AI security posture with the Secure AI Framework, and AURA, a risk framework for autonomous agents whose answer to an action nobody should take blindly is a box that says HOLD — and to close, a talk on why protocols are the real infrastructure of AI, while the workshop room built AI-native web apps until a quarter past six.
An Android app from prompts to production, on NASA's picture of the day
Agentic commerce, tested on Milano Centrale
"The incident doesn't speak PromQL": collect, standardise, route
AI security posture, on the big touchscreen
AURA: when an agent's action needs a decision, HOLD
"Different decade, familiar integration problem"
"Start now: three things" — the last workshop
With Stefano and the others, late afternoon — plus a LEGO One Piece ship
A year earlier I was in the audience at DevFest Milano 2025, and the talk before this one was Inside Android at droidcon Berlin 2025. Everything about the app is on the AI Pantry page.
DevFest Milano 2026 by GDG Milano and GDG Cloud Milano, Randstad Box, Via San Vigilio 5, Milano, 10 October 2026. AI On-Device, with Stefano Soriano, 11:30, Coworking track.