Fireside chat on an agentic simulation: Race Condition
Google for Developers
0:00 [MUSIC PLAYING] TOM GREENAWAY: Hi, everyone.
0:03 We're here for a Q&A session about Race Condition,
0:08 which is a high-scale agentic simulation framework for planning a marathon
0:14 in Las Vegas that we've built for the developer keynote at Cloud Next.
0:19 I'm here with Casey West, and I'm Tom Greenaway.
0:23 CASEY WEST: Yeah, so we work together to build the simulation software itself,
0:27 which is open-source.
0:29 And we've also produced a developer solution.
0:31 But we thought it might be interesting to have
0:33 a little bit of a discussion about how it got built,
0:36 why we built it, some of the considerations that we had to put into it.
0:40 TOM GREENAWAY: Yeah, exactly.
0:42 I oversaw the frontend development of the project,
0:46 and Casey took care of the backend and oversaw that.
0:50 CASEY WEST: Maybe this is a good
0:51 opportunity to introduce ourselves a little bit.
0:53 Tom, what's your background,
0:54 and what put you in a good position to work on the frontend?
0:58 TOM GREENAWAY: Yeah, so before Google, I was an independent game developer.
1:01 I made many mobile games, and I've made many games in general in my life.
1:06 And in Google, I was the web games lead for the Chrome Developer Relations team.
1:12 So I've always focused on games in my career,
1:15 which is great for a 3D kind of experience like Race Condition.
1:20 CASEY WEST: And my career is mostly about backend software development,
1:23 large-scale distributed systems, and architecture.
1:26 So as we were thinking about building a reference architecture
1:30 for a large-scale distributed system and especially an agentic one,
1:35 my background was good for working on the backend.
1:38 So it's always nice to be able
1:40 to come together with engineers that have different backgrounds,
1:42 different levels of expertise.
1:43 TOM GREENAWAY: Yeah, absolutely.
1:45 Yeah, we have some prepared questions.
1:48 CASEY WEST: We both have Qs and we both have As, hopefully.
1:51 TOM GREENAWAY: Yeah, exactly.
1:52 So I'll ask you, Casey, tell everyone about Race Condition.
1:57 CASEY WEST: Yeah, so we mentioned a little bit, but Race Condition is our name
2:02 for the reference architecture that we put together
2:05 that runs the very real simulation that hopefully
2:08 you've seen on the developer keynote at Next.
2:11 It's on YouTube.
2:12 We can put a link in the description of this video.
2:15 But the idea was to build a large-scale agentic system,
2:20 a real one that could demonstrate a lot
2:24 of the capabilities of some of our new platform offerings.
2:27 So Google Cloud, of course, is launching a bunch of products at Next.
2:32 By the time you see this video, that will have happened.
2:35 And a large number of those products that we're really
2:38 focusing on are around what we're calling Gemini Enterprise Agent Platform,
2:43 which is a collection of platform services,
2:45 but also open-source standards, frameworks, and protocols that we put together
2:50 to help you build large-scale agentic systems.
2:52 So we thought, let's build one and show it to you.
2:54 TOM GREENAWAY: Yeah,
2:55 and you're actually going to be at Cloud Next in the developer
3:00 keynote with a bunch of other Googlers showing off the demo.
3:05 And it's pretty cool because on the frontend,
3:09 like on the client, it's this 3D recreation of Las Vegas,
3:14 has the monuments of the Las Vegas Strip,
3:18 and it connects to this backend agentic sort
3:22 of server system that's communicating with all these different agents.
3:27 Do you want to tell us a bit more about how that backend communication works?
3:31 And actually, I have a question here, which is, what is an agent exactly?
3:36 CASEY WEST: Yeah, great question.
3:37 So I think at its most basic level— I'll answer that question
3:41 first because that sets the stage quite well— at its most basic level,
3:44 an agent, I think, is comprised of three components.
3:48 So we have a model.
3:49 In our world these days, that's usually a large language model for producing
3:54 some sort of text or generated text.
3:57 That text could be anything from code to narrative.
4:01 You have instructions for the model to influence it
4:03 and tell it what type of job it has, what role it has, what the guidelines are.
4:09 And then most importantly, I think, you have tools, which is the integrations.
4:14 If you imagine anyone doing a job,
4:16 the best way to do that job is to have the right tools for the job.
4:20 And so the model needs to have good instructions and good tools.
4:24 You put all those things together and you have an agent.
4:27 In our case, we wanted to envision what it would look like to build
4:32 a large-scale architecture and what sort of patterns
4:35 would emerge when you take something like simulations,
4:37 which is a pretty tried and true piece of software architecture,
4:43 like building simulations is something we've done for decades.
4:46 But what happens when it's agentic?
4:48 And in our case, what we learned is that we
4:51 need ways for the agents to collaborate with one another,
4:54 discover each other and what their capabilities are.
4:57 We can coordinate the work, and when we have a lot of agents,
5:03 when we have a lot of sessions and, in our case,
5:05 we're simulating a marathon with potentially thousands of runners,
5:09 managing those communication pathways,
5:11 especially to the front end, is really difficult.
5:13 So we had to come up with some new
5:15 patterns that tend to model enterprise solutions pretty well.
5:19 TOM GREENAWAY: Yeah, and developers will be able to explore the code
5:24 and the developer solution we've created as well,
5:26 which showcases how we've got these different
5:29 demos that use different configurations of agents.
5:33 And in those demos, they can load it up and, in the 3D frontend,
5:37 they can see Las Vegas, but they can ask an agent backend, like a planner agent,
5:44 to help them plan a marathon in the city of Las Vegas,
5:47 taking into account all the different sort of stuff that one would
5:51 need to take into account when planning a marathon in the city.
5:55 And that's kind of what we want to recreate or simulate.
5:59 So yeah, it's come together really well.
6:03 Hopefully, it's going to be exciting at the actual show.
6:08 So I have another question for you, although maybe— well,
6:11 I'll do my question, and you can ask me one.
6:13 CASEY WEST: Sure.
6:14 TOM GREENAWAY: What are some of the AI design patterns
6:16 that exist that enterprise developers can extract from the simulation?
6:20 CASEY WEST: Yeah, I think one of the big things
6:23 is how do we get agents to communicate with one another?
6:25 And one of the things we're working on at Google and in Google Cloud are trying
6:29 to have standards around those communication patterns.
6:32 So we have an Agent Development Kit,
6:35 which is our primary framework for building agents.
6:39 But then you still need the agents to communicate with one another.
6:42 We're focused on agent-to-agent as a protocol,
6:45 which is essentially a standard that allows agents to advertise
6:49 their skills and abilities and what they're up to.
6:52 We use what we call an agent card for that.
6:56 And then you can use anything from HTTP to HTTP streaming to communicate.
7:01 But also, in our case, we actually used essentially a message bus,
7:05 which is, again, a tried and true enterprise solution.
7:09 But we use a message bus to pass large
7:12 numbers of messages with low latency within the system.
7:17 TOM GREENAWAY: Is that with Pub/Sub?
7:18 CASEY WEST: Yes, in this case,
7:20 we used Pub/Sub, and we used Google Cloud Memorystore,
7:22 which is a managed high-scale or high-availability
7:26 Redis solution that we have at Google.
7:28 TOM GREENAWAY: Nice.
7:29 OK, do you want to ask me a question?
7:31 CASEY WEST: Yeah, well, so thinking of design patterns,
7:34 actually, and your focus on gaming and your career,
7:38 I'm curious what sort of gaming design patterns that you would want
7:43 to highlight that we integrated into the system or we thought about using?
7:47 TOM GREENAWAY: Oh, yeah, that's a good question.
7:49 I mean, there's just a lot of stuff
7:51 in the user experience that we tried to have.
7:55 But there's also, in the backend and the client and the backend design,
8:00 there was the decision of where authority of the server was— sorry,
8:07 the authority of the state of the game was held.
8:09 So that's always a tricky one with multiplayer games.
8:14 So in our case, we put the game loop or the majority
8:18 of the game loop and that authority of the state on the server.
8:22 Obviously, it's not a multiplayer game, but it's a simulation with many agents.
8:28 So there's some kind of parallels there.
8:30 So the client is, we could say, a dumb client.
8:33 It's really just listening to what's happening on the server.
8:38 However, there are certain events which we did
8:41 decide made more sense in the client, for example,
8:44 when it's a bit more precise and related to the 3D positions of the objects,
8:49 like the runners run along the marathon track,
8:52 and we have these kind of water stations,
8:54 which use a 3D sphere to indicate that they're in this zone,
9:00 when they collide with that, then it
9:03 triggers the water refresh like replenishment event,
9:08 which goes back up to the server, and that effectively communicates,
9:13 I guess, to an agent that is representing or connecting with the runners.
9:18 And it just gets a message like, I have drunk some water.
9:21 CASEY WEST: That's right.
9:22 Yeah, so the backend— in this case,
9:26 we're using an ADK agent that we called Simulator that runs a simulation.
9:31 And ADK is our framework where you can have LLM-powered agents,
9:35 like I described the core of an agent— got models, tools, and instructions.
9:41 But you can also have deterministic
9:42 workflows as part of that agent architecture.
9:45 So we use a looping agent to loop through a number of sampling events.
9:51 So when you think about doing a simulation,
9:54 you want to take samples of data as the simulation occurs.
9:57 But that models very closely to what we call a game loop in games.
10:02 So the server is essentially running simulation
10:07 and advertising state changes constantly to the frontend.
10:11 But what's nice about the agentic workflow and the idea
10:15 that you have multiple agents that can all
10:17 advertise themselves and you can communicate with them independently
10:19 is that the front end can also send events.
10:24 What do you call those in gaming?
10:26 TOM GREENAWAY: Oh, an interrupt or something like that, I mean,
10:29 if it's coming from a different client to the main state authority.
10:35 But it's other interesting thing I think to highlight, I guess,
10:40 and this was something I didn't realize
10:41 at the beginning when we started to collaborate
10:43 on this project and the vision for how the whole agentic backend would work is,
10:48 usually, in projects, you define some very clear API endpoints
10:53 for the client to be calling to the server.
10:56 But actually, the way we designed this was to demonstrate how everything can
11:01 really just be almost like a chat message for the agents to interpret.
11:07 CASEY WEST: That's right.
11:08 Yeah, the idea with agents, especially powered by LLMs,
11:12 is that you don't have to be as rigid
11:14 as you would be in typical software systems,
11:17 where you have to connect APIs, the APIs are fixed, there are reference points.
11:22 And we still want to have well-defined APIs and software architectures.
11:26 But with agents, what we found is can ask
11:29 the planner to run the simulation using natural language.
11:33 You could also ask it by sending
11:34 a JSON payload that essentially represents the same thing.
11:37 What's nice is that, either way, the agent will interpret it and generally do
11:42 the right thing if it has the right instructions.
11:45 TOM GREENAWAY: It's funny, actually, I just looked at my next question,
11:47 and it's basically what we were just saying, but it adds on to it.
11:50 How steep is the learning curve to start
11:52 building with the A2A protocol and the agent registry?
11:56 CASEY WEST: Yeah, it's not too bad.
11:59 So one of the nice things on Google Cloud platform,
12:02 and especially with Gemini Enterprise Agent platform,
12:05 is that when you deploy your agents to agent runtime,
12:07 which is where you'll typically want to deploy and run
12:11 your agents from, they get automatically integrated into the agent registry,
12:15 and they get an agent card generated for them.
12:19 That essentially is the combination of the A2A
12:22 protocol plus the agent runtime working together.
12:24 And so the agent registry allows us to have
12:27 a list of agents that are available within our environment.
12:31 And any software system could query that agent
12:33 registry to understand what agents are available, including other agents.
12:37 TOM GREENAWAY: I mean,
12:38 I haven't actually dived into the agent registry stuff that much,
12:41 but I'm also working on another project
12:43 at the moment where I'm building some Antigravity skills,
12:46 and the skills kind of need to explain as well
12:49 what they're good at or where they should be used.
12:52 So I feel like there's a similarity there, am I right?
12:55 CASEY WEST: Yeah, I think agent cards actually can
12:59 expose the agents skills as part of the standard.
13:02 So the A2A protocol has that concept.
13:05 But skills are basically— skills are definitely a new system
13:12 that everyone is adopting across the board within agentic applications.
13:17 They're very popular, and it means a lot of different things.
13:20 This is always the thing in software is that we use one term,
13:23 and it can mean a lot of different things.
13:25 So in your case, you're building skills
13:27 for an AI or an agenetic engineering harness, like Antigravity.
13:35 Claude Code uses skills.
13:37 Gemini CLI uses skills.
13:38 And so, as a developer,
13:39 when you're trying to build something with AI or AI assistance,
13:43 your skills can help guide the model to know
13:46 how to build the software the way you want it.
13:48 Is that how you're using it?
13:49 TOM GREENAWAY: Yeah,
13:51 that project will actually be revealed a bit later in the year.
13:55 CASEY WEST: But then on the cloud side or on the backend system side,
14:00 we're also integrating skills into running agents
14:04 and autonomous agents so those agents can have skills.
14:08 And that skill is a way to bundle both instructions
14:10 and tools that can be reused and repurposed across multiple agents.
14:15 TOM GREENAWAY: Cool.
14:19 CASEY WEST: So we were speaking of games quite a bit.
14:23 And I think something that's really fascinating to me— I'm
14:26 always looking for the connections or the patterns that get repeated.
14:30 So we have this client and server system within gaming,
14:34 and I'm not a game developer, and I don't game a huge amount,
14:38 but I see a lot of parallels to business
14:41 applications that we've been building for the last few years.
14:43 We have microservices, which are distributed systems.
14:48 Those are evolving into agents,
14:50 which are distributed systems because we have multiple agents
14:53 that can be deployed independently and integrated with one another.
14:57 And then client systems, we have things like data bindings and Angular
15:02 as a framework that can speak to the server.
15:05 And when it gets state updates, it will automatically refresh the UI.
15:08 It feels like it's a lot of parallels to the way games work.
15:12 The game that I'm most familiar with, the one that I actually do play,
15:15 is "Minecraft" and I know I'm not alone— very popular game.
15:19 But it's the same thing.
15:20 There's a client and a server.
15:22 There's a tick system or an update system on the server side.
15:27 It sounds very similar.
15:29 What do you think?
15:30 Do you think that I'm on the right track?
15:32 TOM GREENAWAY: Yeah, funnily enough,
15:34 I have not played that much of "Minecraft." And I mean,
15:37 I played it when it first became— it started to become popular and I bought it,
15:41 I think, the Java version at the beginning.
15:44 Is that "Minecraft Classic" now?
15:45 Is that what it's called?
15:46 CASEY WEST: I don't know what it's called, but I know that that's what I play.
15:49 I play the Java version.
15:51 TOM GREENAWAY: Yeah,
15:52 but I don't actually know a lot about its architecture, to be honest.
15:55 But I guess you do run your own server.
15:58 And then your friends can connect to it.
16:00 CASEY WEST: You can.
16:01 TOM GREENAWAY: Yeah, so probably, the server is the authoritative state.
16:04 And I mean, how many users can it handle, usually?
16:10 CASEY WEST: That depends.
16:11 So there are a lot of plugins, and it's a rich ecosystem for "Minecraft." So
16:15 it depends on how much you optimize your server.
16:17 But you could potentially have hundreds or thousands of connections.
16:24 There's a lot of nuance there that we
16:26 probably don't need to get into in this chat.
16:29 But I do think that it's always interesting to know how some of the things
16:35 that we do for fun can influence the decisions
16:37 we make when we're building software at work.
16:40 And so, for me, I was able to take some inspiration
16:44 in the backend architecture from my somewhat
16:47 limited understanding of how "Minecraft" works.
16:49 But yeah, how about for you?
16:52 What sort of games do you play
16:54 that might have influenced how the simulation played out?
16:58 TOM GREENAWAY: I don't play that many games nowadays myself.
17:01 But I played lots of games when I was young.
17:05 And I've got some very specific favorites.
17:07 But "Sim City," obviously, was a game I played back in the '90s.
17:12 And when we came up with the idea for this project,
17:17 I mean, it actually took— there was a bit of an evolution,
17:20 actually, really, because funnily enough,
17:23 I think we said earlier that you're from the Cloud DevRel.
17:29 I'm actually from a team called Builders DevRel.
17:31 And now we're working together as teams.
17:35 And I had worked on, actually at Google, something called Adventure,
17:39 which was a virtual conference technology we built during the pandemic.
17:44 And we used it for multiple Google I/Os and other Google events.
17:49 And that had full multiplayer with characters representing people,
17:55 recreating the physical events but virtually.
18:00 And that's how we got involved working together was because we were actually
18:06 looking at maybe reusing some of Adventure
18:09 to do the agentic simulation experience.
18:12 But then as we got closer to working together,
18:14 it sort of made more sense to make something new and bespoke.
18:17 And I remember there was some initial ideation around like, oh,
18:22 maybe it could be like a "Sim City"-type experience
18:25 because we understood that simulation was going to be important.
18:30 And so then we had the city idea.
18:32 Then I think we changed to an alien space station, if I remember correctly.
18:38 And then we went back to a city,
18:41 and someone else added this idea of what if we had to plan a marathon in a city?
18:46 And then we weren't sure which city to use.
18:50 And at one point, I don't know if you know this, but someone was
18:53 asking me a lot of questions about how does the marathon in Paris work?
18:57 And we were talking about maybe picking Paris
18:59 because there's obviously quite a few nice monuments there.
19:02 But then we just realized, wait a second, we're holding the event in Las Vegas.
19:08 Las Vegas has the whole Las Vegas Strip with all those monuments.
19:12 That's a great place to try and do it.
19:14 So it was just like, it's really fun, I think,
19:17 with projects that have this creative angle
19:19 that you just find your way with them.
19:23 CASEY WEST: Yeah, I think the creative
19:25 process of putting together a relatively ambitious,
19:31 realistic reference architecture and piece of software,
19:35 especially being able to open source it, it's a lot of work.
19:39 And we go through a lot of iterations.
19:41 So as you mentioned,
19:42 we probably had half a dozen ideas that we essentially tried
19:47 to build out as much as possible until we landed on this simulation.
19:51 But even within this simulation,
19:53 there are some interesting ideas that some of them
19:55 made it in and some of them didn't.
19:58 TOM GREENAWAY: That's true.
19:59 CASEY WEST: One of our demos in the developer keynote is around adding
20:04 memory and the ability to look up
20:07 especially unstructured information within your agent architectures.
20:11 So we were integrating the Las Vegas rules and regulations
20:17 in order to understand what you're allowed to do and what
20:20 you're not allowed to do in Las Vegas because
20:21 that can have an impact on how we plan a marathon,
20:24 whether it be the route or how it might affect traffic or business impact.
20:31 There's an interesting specific fact about camels that came up.
20:35 TOM GREENAWAY: Yeah, I never actually looked into the legislation or that thing,
20:39 but I know that at some point, we started to talk about putting like a 3D
20:44 camel into the world as one of the runners.
20:46 CASEY WEST: Yeah, I can give you a little insight,
20:49 which is one of the laws on the books in Las Vegas is that you
20:52 are not allowed to have a camel
20:54 on the road— specifically a camel for some reason.
20:58 And so, of course, that got us very interested in camels.
21:01 And we really wanted to put a camel on the road.
21:03 TOM GREENAWAY: OK, OK.
21:04 And then we were like, maybe it could just be a camel emoji at one point.
21:11 CASEY WEST: So what happened with the camel?
21:14 TOM GREENAWAY: I don't remember exactly.
21:18 I think that part of the demo has just ended up, like, we ran out of time.
21:22 We had to reprioritize, which is sad because RIP camel.
21:28 Well, let me see what else I've got here.
21:32 Oh, yeah, which parts of the game are truly agentic?
21:37 What parts have agentic brains?
21:41 CASEY WEST: So almost all of the agents in the system
21:45 have an LLM or a model as a brain,
21:48 but that we had to make some compromises because a number of reasons.
21:52 One of them is that doing demonstrations during a one-hour
21:56 developer keynote is a bit of a contrived experience,
21:59 in that you have a very limited amount of time.
22:01 So many of us have probably seen cooking shows,
22:05 where you prepare a meal to be baked or to be put in an oven,
22:10 and then it's going to take hours, potentially in the oven.
22:13 So Julia Child was famous for this.
22:15 She'd put something in the oven and then say, this has to bake for an hour.
22:18 But here, I'll pull this one out that I've just completed out of another oven.
22:22 And here you go.
22:22 Here it is.
22:23 And so we do the same thing a lot in the demos.
22:27 But essentially, time gets really sped up.
22:30 So simulations historically could potentially run for hours or days
22:34 or even longer because you want as much information as possible
22:38 or because you're modeling what would be called an NP-hard
22:41 problem or problem that essentially is an optimization problem where,
22:44 at some point, you have to cut off the amount of time you compute,
22:47 and you just have to take the best information
22:49 you have at that time to make a decision.
22:52 I say all of that to say, we have planner agents that are planning
22:57 a marathon and planning its impact on the city,
22:59 understanding traffic assessments, that sort of thing.
23:02 We have simulator agents.
23:03 Those also have LLM brains,
23:06 although some pieces of the simulation are essentially very deterministic.
23:10 For example, we talked about the game loop.
23:12 So when we actually execute the simulation,
23:15 we essentially want to control time and take a number of samplings
23:18 over an amount of time that represents the total duration of a marathon,
23:22 which is usually around six hours for most marathons.
23:25 Sometimes, it can be more, sometimes less, but about six hours.
23:29 And so that's what we modeled as well.
23:30 But I think the real interesting thing is where the scale
23:33 and complexity starts to play in with a simulation like this.
23:37 The runners themselves, we wanted to be agentic.
23:41 So the runners are agents in that we use ADK, we use the Agent Development Kit.
23:47 They speak the A2A protocol, just all the other agents in the system.
23:52 However, our first implementation of the runners,
23:55 in order to get the scale we wanted, actually removed the LLM from the equation.
24:01 So they were deterministic.
24:03 And you can think of that sort of like your classic API.
24:06 They took a JSON, well-structured piece of input.
24:10 They manipulated their state, and then they reported their new state back out.
24:14 That allowed us to get subsecond response times out of the agents.
24:20 And then we could have thousands of them running.
24:22 So when we have a tick rate of every 5 seconds we take a sample,
24:27 or every 10 seconds, we take a sample,
24:28 we can have 1,000 or even 10,000 runners responding within
24:31 that amount of time so that we can collect our data effectively.
24:35 Because as you know from game development, and I have learned,
24:38 is if the tick rates start to slow down, that's what we would call lag.
24:42 And those of you who play "Minecraft" know how problematic lag is on that game.
24:47 And so we didn't want lag.
24:49 But we also have a version of the runners that is powered by a model.
24:54 This is something that I think is work that's close to you as well,
24:58 which is we wanted a model that we could do a large number
25:03 of calls on, but the runners aren't
25:05 necessarily the most intelligent models out there.
25:08 They basically have to turn their brains off
25:10 for the most part and make very minimal decisions.
25:12 But we still want to represent or understand what a little
25:16 bit of chaos and nondeterminism would be in a simulation environment.
25:20 So we want the runners to be
25:20 able to make decisions we wouldn't necessarily expect.
25:22 So we wanted to use a model.
25:24 And so we ended up with an open-source,
25:28 open-weight model, which I think you have some experience.
25:32 TOM GREENAWAY: Yeah, and my understanding is we're running that— the scale
25:36 part of that is we're using Google Kubernetes Engine.
25:39 And we're basically scaling up these Gemma 4 open-weight models.
25:47 And I have a question as well for that.
25:48 But I'll come back to it, I guess.
25:52 You're right, I have been playing around with Gemma quite a bit lately.
25:55 There was another project I was working
25:57 on, which is almost like a spiritual successor, I guess, to Adventure.
26:01 I've called it, AI Venture, but it's actually a little single
26:05 player vibe coding puzzle game journey experience.
26:09 But I wanted it to demonstrate how Gemma
26:11 4 is able to do really good vibe coding, code generation locally in that demo.
26:19 And also there's actually a little puzzle— I don't know if you saw this one,
26:22 but there's one that's more like an agentic
26:25 robot that actually you give it some instructions,
26:27 and it tries to execute over and over again whatever you tell it.
26:31 So yeah, I have been playing with Gemma 4 lately.
26:35 But yeah, I was curious, with the simulation in Race Condition,
26:43 what's the ratio of runners to Gemma 4 model instances?
26:49 CASEY WEST: Yeah, so a lot of that is not super
26:53 easy to calculate because we run Gemma 4 on an autoscaling cluster,
26:58 a Kubernetes cluster, or GKE.
27:01 And we're running it using VLLM,
27:03 which would be the primary serving mechanism for a model these days,
27:11 especially on GPUs or TPUs.
27:14 So we use VLLM.
27:16 And really, the scaling for the model itself is
27:19 about how much concurrency and token throughput you can get.
27:22 So it's not so much about how many
27:25 agents you're running or agent sessions you're running.
27:27 It's more about how many tokens do you need to get
27:29 out and how many simultaneous calls do you need to make.
27:33 So that calculation is honestly a little bit challenging.
27:36 So in our case, I think it's around 100
27:43 runner sessions to one VLLM and Gemma 4 instance.
27:52 TOM GREENAWAY: This might be a silly question, but I mean,
27:55 I guess depending on what's happening in the simulation,
27:58 it would go up and down how many tokens it needs.
28:01 So it's the idea that GKE can dynamically scale that appropriately?
28:05 CASEY WEST: That's right.
28:06 So GKE has really good autoscaling characteristics.
28:09 And you can configure that at the infrastructure
28:11 level based on parameters you choose.
28:13 So it doesn't scale indefinitely.
28:15 It has limits that you define.
28:18 And that's really helpful.
28:19 But Gemma-4 is actually an ideal model
28:21 for this scenario because while we have Gemini,
28:24 which has the full— it's a large language model,
28:27 fully served and managed by Google, has access to the world's information,
28:32 we don't actually need all of that.
28:34 We don't need all that power,
28:35 and we don't need all that knowledge for the runners to make decisions about
28:38 whether they drink water or how motivated
28:41 they are when the crowd cheers for them.
28:45 So Gemma 4 has the right amount of inference capabilities,
28:50 the right amount of knowledge baked into it.
28:52 And it's also the case that we're going to make thousands of requests
28:57 to the model within a minute or two to run the simulation.
29:01 So the real question becomes,
29:05 how can we get that throughput in a cost-effective manner?
29:09 And while GPUs can be a bit pricey,
29:13 getting guaranteed throughput on a fully-powered
29:17 model like Gemini is also pricey,
29:19 so we wanted to make sure that we get the best of both worlds,
29:23 or we try and find the compromise that we need.
29:26 TOM GREENAWAY: Yeah, I mean, and it's not just around price,
29:29 but different companies and different enterprises might need to— they may
29:36 have some reasons that they need to use Gemma versus Gemini.
29:40 CASEY WEST: Another big thing is fine tuning.
29:42 And so we can also fine tune Gemma to be essentially
29:47 an expert at running marathons so that it can make smart decisions.
29:52 And that's another way to use private inference to your advantage.
29:56 TOM GREENAWAY: Next year, we'll have actual robots running in Las Vegas.
30:00 We'll go full simulation.
30:02 CASEY WEST: Every year has to be a little
30:04 bit bigger and more ambitious than the next.
30:08 TOM GREENAWAY: So it says I can make the frontend
30:11 look great— thank you— but how do you sleep at night,
30:14 Casey, knowing that these autonomous agents
30:16 have access to enterprise tools and databases?
30:19 What happens if they hallucinate or get hit with a prompt injection?
30:24 CASEY WEST: So the security and autonomy questions will always be there.
30:29 And as someone who builds agentic systems for a living
30:32 and helps other teams build agents at large-scale companies,
30:37 I think that this is an ever-present concern, and it's a realistic one.
30:43 Agents have access to only what you give them access to.
30:45 And that means a couple of things.
30:47 We like to consider this in Google
30:50 Cloud a shared responsibility model around security.
30:53 So we're trying to build a platform that allows you to secure your agents well.
30:57 But you also have to write secure agents.
30:59 So it's a little bit of a give and take.
31:02 In our case, we have built within a Gemini Enterprise Agent
31:07 platform a series of capabilities that I think are very important.
31:13 One of them is agent identity.
31:15 Those of you who build a lot
31:16 on Google Cloud will know everything has an identity,
31:20 and identity-aware network connections are an important part
31:26 of the design patterns for building on Google Cloud.
31:29 And so we built that into our agent platform as well.
31:32 So we have agent identity— every agent gets a unique identity.
31:36 And that means that you can understand who or what principle,
31:41 what service, is making requests.
31:44 So then you can protect the systems
31:47 that the agents are interacting with with Agent Gateway.
31:50 So this is a network layer security protocol that allows you to define who
31:56 or what agents or services can make requests to your API and protect it.
32:05 In our case, you have things like MCP servers, Model Context Protocol,
32:09 which is a way to bundle tools
32:12 and prompts and skills into a network-attached service,
32:17 so distributed systems, like we've been talking about.
32:20 And you can provide security for that.
32:24 You can say, our planner agent only has access to read financial information.
32:30 But even though our MCP server has tools to modify our budget,
32:35 the planner agent isn't actually allowed to modify the budget.
32:38 So you can control that at the network layer.
32:40 TOM GREENAWAY: And one of the demos focused on that.
32:43 CASEY WEST: That's right, that's right.
32:44 So you have control, as the agent creator,
32:47 to determine what tools your agent has access to.
32:50 But as we have more of a mesh system
32:53 with Agent Registry and Tools Registry in our agent platform,
32:58 we need to make sure that we're also integrating
33:01 security policies at the network layer to keep things safe.
33:06 TOM GREENAWAY: OK, I'm going to change track and ask you,
33:09 what was the first software product you made?
33:13 CASEY WEST: Oh my.
33:14 What was?
33:15 So my career started in large part in open source.
33:20 My first job was at an internet service provider back when dial-up was a thing.
33:25 Probably don't remember that.
33:26 TOM GREENAWAY: Actually,
33:27 I worked at an internet service provider when I was younger,
33:30 and they still had dial-up.
33:31 It was like in regional Australia,
33:33 which is where I'm— I'm not from the region of regional Australia,
33:37 but I'm from Australia.
33:38 But in regional Australia, they still needed dial-up.
33:40 CASEY WEST: Absolutely, yeah.
33:41 And I grew up in Western Pennsylvania in the United States,
33:45 which was still somewhat remote in the late '90s, early 2000s.
33:49 So I worked at an internet service provider.
33:52 And at that time, the language that was
33:54 really building the interactive web was Perl.
33:57 So I got involved in the Perl open source community very early in my career.
34:04 And so a lot of my first software that I actually published,
34:07 or that I'd be able to really talk about,
34:11 were what we called CPAN modules, which is like the libraries of Perl.
34:15 TOM GREENAWAY: OK.
34:18 Is there a lot of your Perl code running on systems in the world?
34:23 CASEY WEST: Yeah, this is my fun, tiny flex,
34:27 which is Perl is distributed with many operating systems,
34:32 on many systems automatically.
34:33 And I have made very small contributions to the Perl core.
34:39 So I'm a Perl maintainer.
34:41 But what that means is, for example,
34:45 every Apple computer that gets distributed has my name and email
34:49 address on it because it includes some of my software.
34:52 TOM GREENAWAY: OK, scary.
34:53 [LAUGHTER] CASEY WEST: It's by no means award-winning work,
34:58 though, and you have some of that.
35:00 TOM GREENAWAY: Yeah, yeah.
35:03 I've made some games that have won game design awards and that kind of thing.
35:08 Those were more before Google.
35:11 So yeah.
35:12 So "Duet" was the most popular game that I
35:17 made for primarily iPhone and Android sort of app stores.
35:22 CASEY WEST: Cool.
35:22 TOM GREENAWAY: So yeah.
35:23 CASEY WEST: If I wanted to play "Duet," what would
35:25 be the scenario where I would get really into it?
35:28 Would I be on an airplane trying to pass the time,
35:32 or is it like a truly immersive experience, or both?
35:35 TOM GREENAWAY: It's kind of a bit of both.
35:36 That's a really good question.
35:38 So "Duet," they're very bite-sized little levels.
35:43 It is a very brutally difficult game, and that was sort of intentional.
35:48 We wanted it to be something that you fail quickly.
35:51 It's very clear.
35:52 There's no health system.
35:55 It's like, you hit one of the obstacles, you fail.
35:58 It automatically rewinds and just immediately starts again, that level.
36:04 So it sort of builds up this frustration,
36:05 but then that means when you do get through a level,
36:08 you just get a lot of euphoria.
36:11 And we worked with a musician that had never worked on a game before.
36:17 His name was Tim Shiel.
36:19 And he did the soundtrack.
36:21 So actually, I do recommend people
36:23 play with headphones because it's this really,
36:26 really great beautiful, sort of minimalist music.
36:29 Which, another little claim to fame is
36:31 the Queensland Symphony Orchestra of Australia performed it,
36:35 and Tim was a conductor where we did this big
36:39 show of "Duet" back in my hometown of Melbourne.
36:43 CASEY WEST: That's very cool.
36:44 TOM GREENAWAY: Yeah, it was cool.
36:45 CASEY WEST: OK, so I want to ask a question about that experience.
36:48 So game design is very intentional.
36:50 And trying to invoke emotion or an experience
36:55 for the user is very intentional in game design,
36:59 so I'm curious how that's translated
37:01 to you being a developer advocate at Google.
37:04 And what do you do to get developers excited about the products
37:09 that you're working on or the things that you're involved with?
37:12 TOM GREENAWAY: Yeah, interesting.
37:14 I mean, yeah, and it's kind of funny because sometimes,
37:17 I don't know how to explain what I do to people that I meet,
37:21 especially nontechnical people.
37:23 But I guess I approach it as trying to make inspirational demos.
37:28 And often, my demos end up having some gaming element to them,
37:32 or they're gamified in some way.
37:35 So I think what you want to do is you want to take
37:40 the technology and see what kinds of things it can unlock in the field— say,
37:47 in games— that weren't possible before.
37:49 And lately, in the last couple of years,
37:53 I've been really focused on AI in games, in particular.
37:56 Obviously, everyone's focusing on AI.
38:00 But I mean, as a game developer,
38:03 especially as someone who's really handcrafted games in the past,
38:07 I don't want it to just be about, oh, now we can just generate all the art
38:13 or all the music and audio of the games.
38:15 I mean, maybe there's ways that that could be used in an interesting
38:18 way if it's maybe using some of the input from the user,
38:22 for example, so that you're doing something that wasn't really possible before.
38:25 But what I actually think is the most interesting
38:27 part about these new AI technologies in games is
38:31 really just thinking about game mechanics in the gameplay
38:35 that weren't possible before that now AI can unlock.
38:39 So I talked about the NPC that you bump
38:42 into in the AI Venture demo that I've done recently, and you give it a prompt,
38:48 and then it basically keeps executing that prompt to complete the task.
38:54 And so that demonstrates the tool calling.
38:56 But it also just— in games,
38:58 that's a really interesting kind of new space that obviously,
39:02 some of that could be done in the past with AI in games,
39:06 but I just think there's a lot of new emergent gameplay that can be explored.
39:11 So yeah, I think there's still tons of space for crafting unique
39:19 artistic ideas and experiences in games coupled with all this new technology.
39:25 CASEY WEST: I think that's great.
39:26 One of the hard parts being on the backend systems and the cloud systems,
39:30 which is where I tend to live,
39:31 is getting people to understand the solutions that we make.
39:37 They're difficult to visualize.
39:39 They're difficult to see and understand.
39:40 But building the simulation to try and expose agentic solutions
39:47 that are powered by Google Cloud Platform made it real.
39:53 It makes it a visceral experience.
39:55 It feels like a game, even though I think technically,
39:57 we wouldn't call it a game.
39:58 TOM GREENAWAY: It's like game-like, yeah.
40:01 It's sort of a sandbox experience.
40:03 CASEY WEST: Yeah.
40:04 But I think it's really good to partner up.
40:06 And that's something that I think we did really well
40:09 with the team of people that we had working with us,
40:13 which was to take experts at frontend systems, visualizations,
40:17 user interaction in order to expose and demonstrate backend
40:22 systems in a way that felt visceral, I suppose.
40:27 TOM GREENAWAY: Yeah.
40:27 Yeah, and I mean, like you said, we worked with a lot of other people.
40:31 There were 3D modelers that did the cityscape of Las Vegas and stuff.
40:37 So it's not like we used AI to generate the city, for example.
40:42 Yeah, what else?
40:43 Oh, this is actually an important thing to mention.
40:45 So if a developer forks the race condition repository today,
40:51 we're giving away some free Google Cloud credits with it.
40:54 What is the very first thing you hope they
40:56 try to modify or break when they do that?
41:00 CASEY WEST: [CHUCKLES] I think the runners are very interesting,
41:09 especially with Gemma 4 as a brain.
41:13 Again, they're not big agents.
41:15 They don't do a lot.
41:17 They don't think a lot.
41:18 But one of the things we added with Gemma 4 to power
41:22 the runners is the ability for them to have internal thoughts.
41:25 And I don't know how many of you out there have run a marathon.
41:28 I've not tried because I'm terrified, because it sounds very hard.
41:32 TOM GREENAWAY: There are a couple of people
41:33 on the wider team, though, that have.
41:35 CASEY WEST: That have.
41:36 TOM GREENAWAY: They've told us some experience of that.
41:38 CASEY WEST: Yeah, and when they talk about the inner
41:39 thoughts that the agent— or that they have on a race,
41:43 some of them, we can't expose in the developer keynote.
41:46 But I think it would be really— TOM GREENAWAY: I hope we don't, yeah.
41:49 CASEY WEST: I think it would be really fascinating
41:50 to see what else people could model on that scale.
41:54 So I think when it comes to a simulation like this, the runners
41:58 are kind of like end users or testers for the simulation itself.
42:02 The plan for the simulation is generated using AI,
42:05 and we want to test how good that plan is by executing the simulation.
42:11 The real test is whether or not the runners enjoyed themselves,
42:14 they had a good experience.
42:15 But I think it'd be really interesting to continue
42:17 to expand that to maybe model local businesses.
42:21 How are they impacted?
42:22 If you have a drive-through fast food chain
42:24 and your road is closed because of the marathon going
42:29 by, that might have a dramatically different impact than
42:31 a coffee shop that you can just walk into, for example.
42:34 TOM GREENAWAY: Yeah.
42:35 CASEY WEST: And I think it'd be
42:36 interesting to add additional agents into the mix
42:39 that might be affected by the existence
42:41 of a large-scale event like that in the system.
42:44 TOM GREENAWAY: Yeah.
42:44 I mean, another one that pops into my mind is that I remember early on, we were
42:48 thinking about making it that the runners could
42:50 actually just run off the track if they wanted.
42:52 And we imagined, what if we allowed it so
42:57 the runner can have their own thought of like,
42:59 hey, I'm going to try and cheat, and go down a side street or something.
43:04 CASEY WEST: I was really excited about that, too.
43:06 I think continuing down this theme,
43:09 continuing to expand the runner capabilities or the runner's internal thoughts,
43:13 you can give it a persona, maybe a goal.
43:18 Maybe some runners think of the marathon as a zero sum game,
43:21 where they need to win and everyone else needs to lose,
43:24 and maybe whatever it takes.
43:26 So cheating would be interesting.
43:27 TOM GREENAWAY: New function tool calling for trip up other people.
43:32 Yeah.
43:32 We did talk about it having tripping and people bumping into each other.
43:36 CASEY WEST: Yeah, and we do try and anticipate things like traffic concerns.
43:39 But I think it'd also be interesting to see
43:43 what happens when that goes off the rails.
43:46 Public safety goes hand in hand with traffic issues,
43:49 so what happens if you don't have enough public safety
43:52 officers and maybe cars try and sneak through the marathon route?
43:56 That could disrupt the runners, maybe catastrophically.
43:59 TOM GREENAWAY: Could go wrong.
44:00 CASEY WEST: Thankfully, it's just a simulation.
44:02 TOM GREENAWAY: Yeah, for now.
44:03 Yeah.
44:05 OK, wait.
44:06 I have another one about traditional apps hit infrastructure bottlenecks,
44:09 but with agents, we hit token bottlenecks— CASEY WEST: We do.
44:12 TOM GREENAWAY: --when context windows overflow.
44:15 How do you manage the token scale?
44:17 CASEY WEST: Yeah, everyone is rightly concerned about the amount of money
44:20 you might spend by the amount of tokens that you'd consume.
44:23 And that's one of the reasons why
44:24 we powered the LLM-based runners with private inference,
44:28 is that we can hit that as much as possible.
44:31 We can saturate the infrastructure that we can afford
44:34 to spin up without adding additional costs beyond the infrastructure.
44:39 So that is an issue.
44:40 But within agent design,
44:41 there are a couple of techniques that are really important.
44:43 One of them— or I would say they
44:46 all fall under the umbrella of context management.
44:48 So the amount of context you send in to a model determines how expensive
44:53 it's going to be to read it all and then ultimately provide a response.
44:58 Typical agentic solutions build or accumulate context over time.
45:03 We know this when we interact with Gemini and we have a long conversation.
45:08 What you might not know is that every time
45:10 you hit Enter on your response back to the model,
45:15 what's happening in the environment is that it's bundling your entire
45:19 session history into one large context and then sending that every time.
45:25 So every interaction with Gemini,
45:27 the API or the large language model is stateless.
45:30 So in order for Gemini to know what you've been talking about,
45:33 it has to send that history to Gemini every time.
45:36 So that accumulates over and over again,
45:38 and every message gets a little bit more expensive.
45:40 So within context management, there's a couple of things we can do.
45:43 One of them is that we can have subagents,
45:45 which is why this is a multi-agent system.
45:48 So a subagent might have a very specific task.
45:50 It only needs a small amount of information to achieve that task.
45:54 For example, the runner doesn't have to know anything about planning a marathon.
45:58 It only needs to know about its current environment
46:01 in the marathon at the time that we invoke it.
46:04 So we control context by eliminating history
46:07 and not adding any additional unneeded information.
46:11 That keeps it a very small set of tokens, which is very inexpensive.
46:16 The other thing we can do are things like compacting the history.
46:20 So that does mean that you might lose some fidelity,
46:24 some details that you've accumulated over time.
46:27 But it also means that you cut down on the overall token size.
46:30 So I think those are important things for people
46:33 who might not build agents every day to recognize.
46:36 And we're all actually using those techniques all
46:39 the time when we interface with, say, gemini.google.com.
46:43 TOM GREENAWAY: Yeah, yeah.
46:44 No, it's really cool.
46:45 I mean, I think the other thing with this whole deployable architecture,
46:50 is how we're calling it, is it gives especially enterprise developers
46:55 all these different kind of AI-driven
46:58 design patterns that they can borrow ideas from or learn from.
47:04 So that sounds like an important kind of design
47:07 pattern is dealing with that kind of token context.
47:11 CASEY WEST: Yeah, and the more context you accumulate,
47:13 the longer it takes for an agent to respond.
47:16 And so that can be quite frustrating as an end user.
47:18 And I think when we're building an interactive
47:21 experience— TOM GREENAWAY: Game loop as well.
47:22 CASEY WEST: --like this simulation,
47:24 users don't want to wait around for several minutes
47:26 to get to find out what happened in the simulation.
47:29 So we try to have very real-time information being presented.
47:33 So one of the other design patterns that we incorporated,
47:35 which we lifted from common classic enterprise
47:39 software design patterns, is a message bus.
47:43 So we have this pub/sub system where we can emit
47:46 messages from all of the agents to pub/sub as a broadcast,
47:51 and the client can actually read that.
47:54 So the visualization that you see when you look at the simulation,
47:57 or we showed in the developer keynote,
48:00 is getting real-time information about the inner workings of all of the agents,
48:05 and we designed that so that we can give you that visibility.
48:09 TOM GREENAWAY: Yeah,
48:10 because it has its own connection to the pub/sub directly from the client.
48:14 CASEY WEST: That's right.
48:15 Yeah, yeah, there's a gateway system in place, but basically,
48:18 it's a direct fire hose of information from all of the agents
48:23 about their lifecycle as they're trying to deal with things.
48:27 So you don't just have to wait two minutes for a simulation to finish.
48:30 You can actually see what's happening every tick.
48:32 You can see what happens every time a runner gets an update.
48:35 And I think that's a really fascinating pattern as well.
48:39 TOM GREENAWAY: Cool.
48:41 All right.
48:42 One last question from me.
48:43 Are you planning to go bouldering in Paris?
48:45 CASEY WEST: Yeah, so I love rock climbing.
48:48 It's one of my primary activities,
48:50 and I always travel with climbing shoes and a chalk bag.
48:54 It's a very lightweight set of things to be able to go.
48:59 My preference, if I had more time— I'm here for a short
49:02 amount of time because we're very busy leading up to Google Cloud Next.
49:06 My preference would be to go to Fontainebleau
49:08 and go bouldering in the woods or in the forest.
49:12 But in lieu of that, Paris has many really excellent indoor climbing gyms,
49:17 and so I will visit one of those on the weekend.
49:21 TOM GREENAWAY: Some of them have beer as well, I think, in them.
49:24 CASEY WEST: Oh, yeah, yeah.
49:25 Climbing is a whole community activity.
49:27 It's very collaborative, and that's something I love about it.
49:30 I've been all over the world to climbing gyms,
49:32 and even when I don't speak the same language as the people around me,
49:35 we're always rooting each other on.
49:37 And in Paris, we'll be saying "Allez, allez." TOM GREENAWAY:
49:41 But you're going to be on stage at Cloud Next, so stay safe.
49:45 We don't want the understudy to have to jump in.
49:48 CASEY WEST: Although if they did, they would be amazing.
49:50 TOM GREENAWAY: Yeah, of course, of course.
49:52 Yeah, but Casey, thanks a lot for this chat.
49:56 Yeah, I hope people explore the code and the developer solution we've made.
49:59 Watch the developer solution video, explore the demos that we've got.
50:05 The whole developer keynote itself will obviously be put online as well.
50:09 They can watch that, too.
50:10 And yeah, thanks again for coming and having this chat.
50:14 CASEY WEST: Yeah, thank you.
50:15 I think one of the beautiful things is taking everything from Angular
50:19 and game development all the way
50:21 to low-level backend system architectures and Kubernetes clusters,
50:24 and putting it all together in one great example.
50:26 TOM GREENAWAY: It's been great.
50:28 CASEY WEST: Cool.
50:28 [MUSIC PLAYING]