Skip to main content

Building AI agents with Claude in Google Cloud's Vertex AI | Code w/ Claude

TL;DR

  • Building and productionizing AI agents is challenging due to fragmented development frameworks, complex integrations, and the operational overhead of managing them at scale.
  • Google Cloud introduces its AgenteStack, a comprehensive solution designed to standardize agent development and streamline their deployment to production.
  • The AgenteStack comprises an Agent Development Kit (ADK), Model Capability Protocol (MCP) for tool integration, Vertex AI Agent Engine for managed deployment, and Agent to Agent Protocol (A2AP) for cross-framework communication.

Takeaways

  • The Agent Development Kit (ADK) is an open-source, code-first framework for building, evaluating, and deploying AI agents, supporting various agent patterns including simple LLM agents.
  • ADK integrates with Model Capability Protocol (MCP) to standardize how agents consume tools and context, allowing any existing MCP server to be used as an ADK tool.
  • The Vertex AI Agent Engine is a managed platform for deploying, managing, and scaling AI agents, offering built-in observability, logging, and integration with Vertex AI evaluation services.
  • The Agent to Agent Protocol (A2AP) is an open-source, enterprise-ready protocol based on HTTP and JSON-RPC, enabling seamless communication and collaboration between agents built with different frameworks.
  • Claude models (e.g., Claude 3, 4) are accessible on Vertex AI Model Garden, a centralized hub for discovering and deploying foundational models, and are directly integrated with ADK.
  • ADK uses a Runner to coordinate agent execution and manage conversation sessions, providing CLI tools (adk run, adk web) for programmatic and web-based interaction and debugging.
  • Multi-agent systems can be built by defining an orchestrator agent that routes user requests to specialized sub-agents based on their defined capabilities.

Vocabulary

AI agent — An application designed to perform tasks autonomously, often powered by an LLM. Productionalize — The process of preparing an AI agent or application for deployment and operation in a live production environment at scale. AgenteStack — Google Cloud's integrated suite of tools and protocols for developing, deploying, and managing AI agents. Agent Development Kit (ADK) — An open-source, developer-friendly framework for building, evaluating, and deploying AI agents. Model Capability Protocol (MCP) — A protocol that standardizes how Large Language Models (LLMs) and agents access and utilize various tools and external context. Vertex AI Agent Engine — A managed platform on Google Cloud specifically designed to deploy, manage, and scale AI agents in production, handling operational complexities. Agent to Agent Protocol (A2AP) — An open-source protocol that facilitates seamless communication and collaboration between AI agents developed using different frameworks. LLM agent — A specific type of agent within ADK where a Large Language Model serves as its primary computational "brain." Runner — An ADK component responsible for executing agents, managing conversation states (sessions), and integrating with user interfaces. Model Garden — A centralized hub within Vertex AI where users can discover, deploy, and manage a wide variety of foundational and open models. Agent skills — In A2AP, these define the specific functions or capabilities an agent possesses, analogous to a digital business card. Agent card — In A2AP, a digital representation that describes an agent's skills and provides instructions on how other agents or applications can interact with it.

Transcript

Hello, everyone. Thank you for joining this session. So in this session, we are going to talk about how you can build AI agents using Claude on Vertex AI. So before to start, let's set the scene. So as you probably know, building AI agent is a very powerful. With AI agents, you can build such a cool applications. But the reality is, after you start developing and prototyping agents, and let's assume that you are happy with what you build, it's so hard to productionalize these agents. And the reason are essentially three. So first of all, you need to, because right now, to build agents, you have so many frameworks that provides tools, that provides capabilities that you can use to enhance your agents. Like the landscape is so fragmented. So you need to figure it out how to integrate the different frameworks and different tools to make the system work. So the other reason is, let's assume that you are capable of building one agent or a multi-agent system with one framework. But at the same time, you want to use different framework. Together, it's not easy to make the communication happen between this two set of different agents. And then, let's assume that even if you're able to build agents, create this network of agents that are capable of communicating between them, it's so hard to manage them in production, because you need to take care of all the operations around the agents and the relative governance. So all the monitoring capabilities, the logging capabilities that you need to implement on your agent, they are very hard to be managed. In this sense, let's imagine that you will be able to have a toolkit that will allow you to standardize and develop your agent in a very efficient way. And then, together with this toolkit, you get a set of protocols that will allow your agent to consume tool and context with the LAM. But at the same time, connect with other agents in a seamless way. And third, you will get an agent platform that will allow you to deploy at scale this agent system and manage all the operations that are around this new kind of application. So with these challenges in mind, and these three main reasons that we want to address, that's why we define our own AgenteStack on Google Cloud. And our AgenteStack is composed by four main components. So the first one is agent development kit, which is an open source code first and developer friendly framework that will allow you to build, evaluate, and deploy your agent at scale. But in order to enhance your agent, you need a way to standardize the agent, communicate with different tools, as I saw you before. So to address these challenges of protocols, one thing that we did when we designed Agente Development Kit is making it compatible with MCP. So probably you know what is MCP. You already heard about it. But with MCP, essentially, you will make the agent compatible with several tools. And in general, application will provide your contacts to your application using LLAMs. On top of MCP, we also introduce like these Vertex AI Engine Engine, which is essentially a managed platform that has been designed to deploy, manage, and scale your AI agent in production. And it takes care of all those operational challenges and possible capabilities that you need in order to deploy your agent in production. And finally, to address the challenges of allow communication between different agent build with different frameworks, we also introduce agent to agent protocol. So which is essentially an open source protocol that will allow you to create this seamless communication and collaboration between agents in whatever framework you build. So today, we are going to use this stack to build multi-agent systems. But before to do that, let me introduce myself. I'm Ivan Nardini. I'm a developer at Google Cloud. I'm based in San Diego. And today, I want to go through this journey with you. And the journey will start with building a very simple ADK agents using Claude. And then we are going to announce these agents using some pre-built tools and MCP. And finally, we will deploy the agents on agent engine. As a bonus, we will try to cover, which we'll try also to show you how you can connect multiple agent using agent to agent protocol. But in case we are not able to do that, don't worry, we are going to have a live webinar at the end of my month. So we will show you how to do that later. With that being said, we want to build an agent. We need an LLAM. So let me show you how you can get access to Claude models on Vertex AI. So Claude models on Vertex AI are accessible through Vertex AI model garden, which is essentially a centralized hub, where you can discover, deploy, and manage a wide variety of foundational and open models, including Claude. So on a model garden, you will find the latest and greatest Claude model. This morning, we just rolled out Claude 4. So I will show you. And after you simply feel you provide some credential and everything, you will get access to the model, and you will be able to use it through API or through the console. So without further ado, let me show you how you can get access to Claude. So let's switch on the, yes. So for people that doesn't know Vertex AI, this is how the Vertex AI console looks like. So Vertex AI provides a set of services to build both the generative AI and predictive AI application. And model garden, as I said, is a centralized hub that provides you several models from different model providers, including Claude, including Anthropic. In fact, in the partner session, you will find the Anthropic models. And here you can see all the Anthropic models that we provide, including the latest that we released this morning. So in order to, you can use the model garden to test this model. So here is the Vertex AI Studio, which is our prompt UI that you can use for test this model. As you see, I already select Claude 3.7, so on it, which is the model that we are going to use today to build our agent. We are already integrating Claude 4 with SDK, so stay tuned in the coming weeks. But through this UI, what you can do, you can test the model. And you can start interacting with it and using the API that you can get here to integrate with your application. So with that being said, now that you know more or less how to get access to Claude, through Vertex AI, let's go back to the presentation, and let's start building agents using this model. So in this demo, we are going to build a very simple agent, which is a birthday planner agent. So it's an agent that essentially will allow you to organize a birthday party, such as in teams and getting the guest list and so on. And before to build this agent, you need to know some concepts related to ADK. Just one thing, I know this session is supposed to be a workshop. But because all the Wi-Fi issues that you've already faced, I will, you already give you some credits. And I will share the repository with you. So after this session, you will be able to reproduce this code and go and show you at home. And if you have a question, you can always come back to me. With that being said, these are the core concepts that you need to know about ADK. In order to build an agent with the agent development kit, first of all, agent development kit provides several type of agents that you can use. You already prebuilt some agent in pattern, including sequential agents that you can use in order to implement your application. But the simplest pattern that you can find is the one that we use with the LLMA agent, which essentially used just an LLM to use the agent to build the agents. And so this class represents the brain of the agent and it supports several models, including Claude. And essentially, it requires you to set the model, give it the agent a name, some instructions, and define the tool that you want to use. And then after you've done this, you get your agent already up and running. With respect to tools, you know what is a tool T's. It's essentially a mean that you can use to assign some skills to the agent. And ADK, we provide some prebuilt tools that you can use. But you also can also define your own tools and integrate with the framework. So you have the agents, you have the tool. In ADK, you have this concept of runner that puts together everything and coordinates, you know, execute the agents. So you manage the sessions, so the conversation state along the while you're running the agents. And it is integrated with a very nice CLI that you can see here. ADK Run and ADK Web, that will allow you to interact with the agent programmatically or, you know, through a web UI, that I will show you later. And then last important thing that I want to mention, you have this concept of session, which essentially will allow you to store the conversation and interact with the agent in a way that, you know, it remembers what you already discussed with him before. OK, so with that being said, I told you ADK support Claude. How it is a core Claude? You can use Claude in two ways with ADK through the LLM integration, which is something that I will assume you are familiar with. Or you can use the pre-build integration that we provide as a vertex AI team using Claude and the LLM registry, which is the one that I will show you today. It's just a nice way, you know, to integrate the model with the interface. So with that being said, let me show you how you can build an agent using ADK. So this is the repository that you will get once you download, once you get, once you call the repo from GitHub. So in the repository, you will have three agents. We are going to cover them today. And the first one, as I said, is the birthday planner. So in order to be an agent, we dedicate. All you need to do is providing essentially three files. The agent.py, which contain the agent logics, the environment variable file, which contains all the environment variables that you want to use for your agent. And an init file, as you probably are familiar with. So just this three file will allow you to run the agent. And as you can see, we design ADK to be so close to software engineering best practices. So this is something that you should be capable of running easily. With that being said, here you can see how you can use ADK. So you need to import the LLM agent, a class, the Claude class, which is going to represent the Claude model that we are going to use today. And then you can also use some other classes related to memory, the runner that I already explained. But with that being said, once you import this class, this is all the bullet plate code that you need to write in order to create your first agent. So you use the LLM agent class, you define a name, the model that you want to use. In this case, the Claude 3.7, the description, so what the agent is going to do, and the instruction that we want to give to the agent. That's it. Once you have this, you are ready to go. So all you need to do is that running, if you want to interact with the agent in a programmatic way, you can run ADK run. And then behind the scene, it will start a session with your agent. Oh, sorry. Forgot one thing. ADK run, birthday. And then it will run a session, an interactive session with your agent. So from here, you can start interacting with your agent, and then you can start understanding how it works. And so in this way, you can interactively develop the agents. And you can improve the agent depending on the task that you are trying to achieve. So again, three files, one CLI, and you are done. And you can start improving your agents. So let's go back to the slide. So let's assume that you clone the repo, you get the origin after running. Let's make things a little bit more complicated. So we want to extend our agents in a way that it becomes a multi-agent system. So we have this agent that it will give us suggestion for the birthday party. But then once we get the birthday party, we want also to schedule some time in our agenda, for example, for going and by the gift for the party, or just setting a reminder of the birthday day. So how you do that, you introduce tools. And the cool thing of ADK is that we didn't want to reinvent the wheel. So by day zero, we introduced this integration with MCP. So again, I'm not going to explain you what it is MCP and the difference between the language-specific tools or the API. The idea is essentially with MCP, you standardized the way LLM get access to the context, not only LLM, but also agents. With ADK, you have two ways to use MCP. So you can use MCP, some MCP existing server, and integrate them as a tool with ADK. This is something that we are going to do today. So whatever MCP server is out there, you can use today already with ADK, without you remanting the wheel in that sense. Or if you have an ADK and you build some tool in ADK, you can use MCP to deploy this tool and interact with other agents. So these are the two ways that you can use to leverage NCP with ADK. So with that being said, let me show you how you can use ADK with MCP. So let's go back here. Let me access it to this agent. And then let's go to... So this is the second agent. So again, as I said, what we want to do is that we want to introduce a calendar service agent, which will allow me to schedule some time in my agenda. And because now we have two agents, the birthday one and the calendar one, we want to also introduce an orchestrator which route my request to the right agent, depending on what I want to achieve. So in this particular case, the birthday planner is exactly the same agent that we defined before. Except that now I want to create an hybrid system, because for example, for scheduling, for some, for getting some birthday idea, I can use also a different model like Gemini. But then I have these calendar agents that in this case, we'll use again, Claude 3.5 with an NCP server to schedule some time in my agenda. So in order to use an MCP server, we dedicate, these are the two line codes that you need to introduce. So you get to the MCP server that you already have out there, or you already created, or deployed as a serverless service. And then you create a connection with it. And then what happened behind the scene, when you start building your agent, when you run this command and you start building your agent, what it does is get all the information, all the requirements to run your MCP server, it converts these MCP servers as a tool, and they use this MCP server as a tool of the agent. That's it. But again, the cool thing, what I really believe is powerful of etiquette is that it will allow me with two line codes to integrate any kind of NCP tool, that you have already. Once you have this MCP tool, you integrate it as a tool again in our agent, and you're done. Same similar things. So now we have the birthday agent, we have the calendar agent, this is how the organizer looked like. So look at how easy it is to pass multiple agents in an orchestrator like this one. Again, all you need to do is defining a better instruction, because in this case, this agent is going to orchestrate a multi-agent system. So you will define what agent, like what each agent is capable of doing. And then you pass all the agent as a tool in this orchestrator. So again, it will figure it out what agent to use, depending on your request. Once you have done this, you are good to go. So what we can do is that running, going back here, local. Actually, let me do this. Let me show you this. So before I show you how you can interact, I can spin up an agent interactive programmatically. But because now this system is more complicated, we have three agents, right? We want something a little bit more solid to try to understand what is happening behind the scene. So in ADK, you have this web UI, which allows you to debug and interact with your agent. So this is the web UI. So in this case, this is how it looks like. So the web UI, we select the agent that I want to run. And this is, so in this case, it's like what we did before, except now, we have the other agents. We have the multi-agent system that is running behind the scene. And as you can see here, this UI nicely provides you a way to see what is happening behind the scene with your agent. So while you're running the conversation, you will see which agent is using for doing what. OK, with that being said, so now you know also the web UI. Let's go back on the presentation. Thank you. So for the last part of this presentation, I want to show you also how you can easily deploy the agent on agent engine. So in order to do that, let me do this. In order to do that, let me first introduce you what is an agent. Why you need an agent engine like this one? Essentially, when you need to deploy agent at scale, in order to do that, you need to figure it out a lot of complexity. You need to get the origin code. You need to wrap the agent. One of those services like Fast API or Django. You need to build your container. And then you need to figure it out your environment to run it. In this case, you can be a GCP environment. And then you need to handle all the operations related to infrastructure. And at the same time, you also need to monitor these agents because at the end of the day, it's an application. So with the agent engine, you can simply deploy the agent using a metal like agent engine creates. And you will get your agent after running, as well as all those observability capabilities and the monitoring that you need in order to deploy your agent. They are directly managed by the platform itself. And also, all the interaction that you have with the agents, they are going to be automatically collected by our logging system. And you will directly use them to run some evaluation in a way that you can keep improving your agent a long time. So this gives you an idea of the reason why you want to consider an agent engine. And this gives you the overall picture of the agent of vertex AI agent engine. So in this picture, as you can see, agent engine is capable of integrating any kind of agent framework as I just said. But if you build agent with long graph, length chain, you can do that. You can use those frameworks as well. And then whatever tools and whatever model that you want. And the agent engine will take care of deploying your agents. And we'll enable all these observability capabilities of features that you need using some Claude tools. And the evaluation part is also covered by one of our services, which is the vertex AI evaluation service. So to wrap up the agent engine capabilities, so you can deploy an agent that you can define agent in any framework that you want. You can use these manager on time to deploy these agents. And then you will automatically get, you will automatically be able to observe the behavior of the agent, call the agent at scale. And the agent engine is also as an integration with another services that we provide on Google Cloud, which is an agent space, which I'm not going to cover today. But just to give an idea, it's the gate that will allow your agent to go in the ends of business. So really, you know, have an impact of the agents that you are going to build in an enterprise context. But with that being said, let me jump in the last lab that we are going to cover today. So I already show you how you can build the agent. So in this last lab, what I want to show you is how you can easily deploy an agent with a few line of codes. So in the repository, you will find this module that essentially will allow you to iteratively deploy your agents. All you need to do to deploy an agent on vertex AI engine is providing the base requirements that your agent needs in order to run. And then, as I said, we provide already a class that will allow you to create an agent and point, in this case, the agent engine. So in this class, you have your agent that you define. In this case, we are going to deploy the first agent, the birth planner agent. And then here you have the requirements. You can provide extra packages if you want. But then, again, few line of codes to deploy your agent in a managed service that is scalable, and will allow you to open your agent to several users. So with that being said, let me run this script. So first of all, let me close this session clear. Then, let me go in the repository. And then here I have my module. So in this case, I do Python, deploy agent. So what happened behind the scene is that it will start deploying my agent. So you can monitor the deploy on the agent directly in the vertex AI console. Now, this step is going to get some time, as you can imagine, because it's building the image and deploying the agents. So let me directly jump into the UI. So once the deployment of the agent will successfully run, what you will do is you will get an entry in the vertex AI agent engine UI. And from this UI, you will be able to monitor this agent. So the query that it receives, the latency that it takes. So how long it takes to respond to the query. And you will also monitor the CPU and the memory that the agent is using. So you can better understand if you allocate enough resources to serve this agent at scale. Engine is also managed session. So in this case, I just deployed one. So we don't start a session yet. But here you will see the session. And it will give you all the information that you need in order to integrate this agent in application, both in a real time or streaming, depending on the method that you want to use. And you can always check the details of the deployment. So now you have also an idea of how to deploy the agent. Let's go back to whose line. Thank you. So as I said, this was a bonus part. I don't think we have time to cover it. But what I want to tell you is that let's assume that you build your agent. You deploy the engine engine. And right now, we build our agent using just ADK. But what if you want to deploy or build your agent, build and deploy your agent using Lenschain, Cruei, or whatever framework? As I already said, agent engine support this. But the main problem is that you don't have a way to connect these agents that are built with different frameworks together. So that's when you need a protocol to do that. So in a world where you are going to have multiple agents that they are built and deployed with different frameworks, there is this need to find a common language between this agent to interact and collaborate in order to achieve some task. And that's why, as a Google Cloud, we introduce agent to agent protocol. So again, it's an open protocol that has been designed to enhance, to foster the agent collaboration, using very simple concept that I will show you in a minute. But the key thing that I want to share with you is that it has been already designed to be enterprise-ready. So it has a bunch of features that will allow you to govern in a secure way your agents. And again, also in this case, we didn't invent the wheel because it's based on some standard protocol, HTTP, JSON, RCP, something that is common adopting in the industry. The concept that you need to know about it way is the concept of agent skills, so which essentially describe the function or the capability of the agents. And it's like a business card of your agent with respect to other agents. And then you have the agent skill that describe what the agent is capable of doing. So it manages the function that the agent has. And then you have the agent card that essentially is a digital business card for the agent, will allow other agent or other application to know what the skills, what are the skills of the agent and how to interact with it. So one is describe the agent, the other one, the scribe, what is the agent capable of doing to the other agents. And then as before, you have an agent executor that essentially manage the communication, the request and the response that the system generates between agents. So these three concepts, with these three concepts, you can build a system like this one, where you will essentially have multiple agents, written with different framework, communicating between each other in order to achieve a particular and more complex task, rather than the one we build today of scheduling or buying a birthday gift. So we are not going to cover this today, but again, as I said at the beginning, we are going to have a live webinar at the end of the month. So I will share with you the QR code. So just recap, we start from these three main problems. Building agent is powerful, but there are several challenges when you want to put them in production. You have a fragmented landscape. There are some integration complexity that you need to manage. And even if you are capable of fixing this, you have to manage all the operational overhead that you need to, in you need to handle in order to deploy these agents. And then that's when you want to get access to a toolkit, protocols, and agent platform, that at the end, it allows you to standardize the way you build the origin, and scale them to production. And to give you this kind of tool, we put together this agent stack using ADK, MCP, agent engine, and end way, it will essentially allows you to confidently build a agent system and scale them in production as required. So scan a alert. So please get your phone out. I'm going to share with you some useful QR codes. So the first one that I want to share with you is code. So in this repository, you will find all the code related to ADK. So samples, getting start, everything you will find here. 3, 2, 1. And then if you want to know how, we covered these in 30 minutes, but it can be like a one hour workshop. So here you can find a webinar we are going to run together with Anthropic next month. And where we show also the integration with AdWay. So please scan this code. 3, 2, 1. And then I mean, I was fast. So I assume that you have several questions. So feel free to reach out. I'm always happy to answer your questions. But with that being said, I hope you enjoyed the session. I am just 20 seconds late. So I hope you enjoyed. And yeah, thank you for attending this.

Feedback / ReportSpotted an issue or have an improvement idea?