How we built real-time AI agents for EV charging on Gemma and Cloud TPUs
Why lemonflow moved its live voice agents from managed LLM APIs to Gemma 4 on Google Cloud TPUs in the EU, how the architecture works and what it changed.
Lukas Fieber and Konstantin Huneke · · 7 min read

As the electric vehicle revolution gains steam in Europe, every charging session is a moment of truth, for the driver and for the transition itself. At lemonflow, we build AI agents purpose-built for EV charging: support agents for drivers and monitoring agents for charging networks. Our support agents answer drivers around the clock in more than 90 languages, and today they help an EV driver every 90 seconds.
A driver who calls from a charger that will not start has no patience for a pause. In live voice, an answer that takes longer than about 800 milliseconds invites the caller to talk over the agent, and the conversation breaks. That one number shaped how we run our AI support agents.
This is our own account of the work we described in Google Cloud’s series The Blueprint: How lemonflow built real-time agents for EV charging using Gemma and TPUs, published on 12 November 2026. It covers why we moved our live agents from managed LLM APIs to the open model Gemma 4 on Google Cloud TPUs in the EU, how the architecture works and what it changed. The short version:
- Live voice needs an answer in well under a second. In our tests, serving latencies above 800 ms led drivers to interrupt the agent.
- Managed APIs did not hold that at peak. Latency rose from 1.0–1.2 s to more than 1.7 s in busy hours, with rate-limit errors on top.
- We now host Gemma 4 ourselves on Cloud TPUs in the EU. It answers more than 99.9% of all live conversation turns.
- Half of all answers start within about 350 ms. Changing and testing a prompt takes about 10 minutes instead of two to three hours.
Why live support at the charger is hard
Before we founded lemonflow, we worked with leading European mobility players and saw how often charging fails: between 15% and 25% of EV charging attempts in Europe end in failure. At the same time the market keeps growing. Registrations of battery-electric cars in the EU rose by 30% in 2025, and thousands of charge point operators run public chargers. A driver at a stalled charge point was often stranded, or stuck in a call-centre queue.
Our AI support agents resolve charging problems in real time by phone, chat, email and WhatsApp. Doing that in a live phone call sets five requirements:
- Strict latency. Above 800 ms, drivers start to talk over the agent and the flow of the call breaks.
- No bottleneck at peak. We first relied on managed LLM APIs. In peak hours their latency rose from 1.0–1.2 s to more than 1.7 s, and we saw HTTP 429 rate-limit errors when global usage peaked.
- Bursts of compute. Each agent works from one comprehensive prompt plus tool calls that read and act on live charger data. That creates bursts of demand during a call, which shared capacity is hard to guarantee for.
- A fragmented ecosystem. One conversational engine has to work with around 30 different charge point management systems (CPMS), each with its own APIs, data models and quirks.
- Hundreds of tailored agents. Operators differ in tariffs, payment methods, escalation paths and the hours their own team is on call. Most run several agents, by country, brand or hotline, and behaviour can change with the time of day. Each prompt is unique, has to be served at full speed and has to be improved without breaking the others.
Voice at this speed, with capacity we can count on, needed direct control over where and how the model runs.
From managed APIs to our own model
What we want a driver to get is simple: no queue, no menu, a short conversation that ends with the car charging. A driver on a cross-border trip plugs in at a motorway service station at 11 p.m., and the charger does not start because the previous session was not closed. She calls the number on the charger and is answered in her own language. The agent finds the stuck session in the charger’s logs, restarts the charger remotely and stays on the line until power flows.
To get there we moved from managed APIs to hosting the open model Gemma 4 ourselves, on Google Cloud TPU v6e hardware in the EU. Gemma is compatible with Gemini, so our existing prompt infrastructure moved with minimal changes, a pattern Google describes for startups that use open models alongside frontier APIs.
Running the model ourselves gave us two things beyond speed:
- Control over what reaches the model. A deterministic core layer applies EV-specific guardrails, guards against prompt injection and turns the different backend protocols into one internal format before anything reaches the LLM.
- A model that changes only when we change it. Because the model and the serving stack stay as they are until we update them, a test result from last week still means something today. That stability is what our Agent Coach is built on.
Want to hear an agent answer at this speed? Book a demo
The architecture
Simplified system architecture. This is the diagram we shared with Google Cloud for The Blueprint, in our own style.
The platform runs two kinds of agents. Support agents talk to drivers in real time and are served by Gemma on Cloud TPUs, for the lowest latency. Monitoring agents analyse conversations and charger logs in the background on Gemini, so that operators can fix a fault before the next driver meets it.
One engine for all backends. A driver calls the support line shown on the charger, and the call reaches our conversational engine through the operator’s own hotline. The engine reads the charger’s live status and its OCPP logs (the messages a charger exchanges with its backend) from the operator’s CPMS in real time. A translation layer turns the interfaces of the different systems into one standard format, so the same platform serves charge point operators, e-mobility service providers and charger manufacturers.
Why the logs matter. Many charging stations have no display, so drivers often do not know what went wrong: a payment authorisation waiting in their banking app, a session that timed out, a charging card not enabled for roaming, power reduced by local load management, or a car that ended the session at its own charge limit. The engine hands structured summaries of the logs to the model, which can then name the cause.
An inference gateway that serves callers first. All model requests pass through one gateway. It classifies each request and serves it in priority order: live voice first, then live chat and messaging, then monitoring and analysis jobs, then test traffic. Regression replays wait for quiet hours.
An EU model tier with fallbacks. Gemma 4 on reserved Cloud TPU capacity is the primary model. We adapted the open-source serving engine vLLM and tier memory between the TPU and the host, so that a single TPU slice keeps many more operator agents ready to answer without recalculating their context. If needed, requests fall back automatically to our own GPU capacity and to Gemini on Vertex AI. In practice Gemma answers more than 99.9% of all live conversation turns, and the fallbacks mostly serve as a buffer during updates. Primary or fallback, requests are served from compute in the EU.
Words and actions on separate tracks. Because we control the model directly, we stream its output selectively. Text goes to the text-to-speech engine token by token, so the agent starts speaking at once. Structured tool calls go to the backend systems in parallel and carry out real actions: restarting a charger remotely, unlocking a stuck cable, stopping a session that did not end, sending the driver details by SMS or email, or notifying a service technician.
Security before the model. Deterministic controls screen inputs before they reach the model and block malicious prompts. The architecture is designed with the requirements for European critical infrastructure in mind.
What changed
- Answers in well under a second. Half of all answers start within about 350 ms (P50), and 90% within about 600 ms (P90). That is roughly three times faster than our managed-API baseline, and fast enough to sharply reduce interruptions.
- No throttling, flat latency. On dedicated TPUs the rate-limit errors are gone, and latency stays flat through the afternoon peak in calls.
- A faster loop for improvements. Updating a prompt and testing it took two to three hours. It now takes about 10 minutes.
- Testing without a quota. TPU time that live conversations do not need becomes capacity for experiments and validation.
That spare capacity is what made Agent Coach possible: a background engine that gives agents relevant context during live calls and turns real conversations into permanent test cases. Every night, thousands of fixed conversation scenarios are replayed as regression tests.
For operators and their drivers, the result is support that works when it is needed. Calls are answered without a queue, more than 80% of conversations are handled end to end without a handover to a human, and drivers rate the support at 95% satisfaction. Today our agents support more than 40 charging networks in 17 countries, with more than 290,000 charge points, around the clock.
What comes next
We plan to move to Ironwood, Google’s seventh-generation TPU, once it is available in our EU region. It offers six times the high-bandwidth memory per chip, which multiplies the number of operator agents a single TPU can keep ready.
The aim stays the same: a driver gets an expert answer in their own language within a moment, the charger is restarted remotely where that helps, and the monitoring agents catch the next fault before another driver notices. What the driver should see of all this is a fast answer and a working charger.
Read the original
This article is based on The Blueprint: How lemonflow built real-time agents for EV charging using Gemma and TPUs, written by Dr. Lukas Fieber (Co-Founder and CTO) and Konstantin Huneke (Co-Founder and CEO) for the Google Cloud blog and published there on 12 November 2026. The architecture diagram above is the version we shared with Google Cloud, drawn in lemonflow’s own style.
Frequently asked questions
Which AI model answers drivers on a lemonflow support line?
Live conversations are served by Gemma 4, an open model from Google, which lemonflow hosts itself on Google Cloud TPU v6e hardware in the EU. It answers more than 99.9% of all live conversation turns. Monitoring agents, which work in the background, run on Gemini.
Why does lemonflow host the model itself instead of using a managed API?
Live voice needs answers in well under a second, also at peak hours. With managed APIs, latency rose from 1.0–1.2 s to more than 1.7 s in busy hours and rate-limit errors appeared. On dedicated TPUs, half of all answers start within about 350 ms and latency stays flat through the day.
How fast does the AI support agent answer?
Half of all answers start within about 350 ms and 90% within about 600 ms. In lemonflow’s tests, latencies above 800 ms led callers to interrupt the agent.
What happens if the primary model is not available?
An inference gateway routes requests automatically to fallbacks: lemonflow’s own GPU capacity and Gemini on Vertex AI. Primary or fallback, requests are served from compute in the EU.
What can the agent do during a call?
It reads the charger’s live status and OCPP logs from the operator’s charge point management system and can act on them: restart a charger remotely, unlock a stuck cable, stop a session that did not end, send the driver details by SMS or email, or notify a service technician.
