If you’re looking to build powerful and intelligent AI agents with full control over how they work, Google’s Agent Development Kit (ADK) is a tool you’ll want to explore. This open-source Python toolkit is designed for developers who want to go beyond basic AI features and create smart agents that can think, respond, and interact with other tools and services, especially within the Google AI ecosystem. With ADK, you can define exactly how your agent behaves, which tools it uses, and how it completes tasks, all through code. It also makes it easy to test, debug, and deploy your agents anywhere, from your laptop to scalable cloud platforms. What sets ADK apart is its flexibility and modular design. You can combine multiple agents, add pre-built or custom tools, and tightly integrate everything into your existing systems.
In this article, we’ll walk you through how to get started with ADK, setting it up, building your first AI agent, and deploying it using scalable cloud platform like NodeShift, so you can see its full potential in action.
Prerequisites
The minimum system requirements for running this model are:
- GPU: RTX 4090 (only CPU can be used as well)
- Storage: 50GB (preferable)
- VRAM: 8GB
- Anaconda installed
Step-by-step process to build AI agent with ADK locally
For the purpose of this tutorial, we’ll use a GPU-powered Virtual Machine by NodeShift since it provides high compute Virtual Machines at a very affordable cost on a scale that meets GDPR, SOC2, and ISO27001 requirements. Also, it offers an intuitive and user-friendly interface, making it easier for beginners to get started with Cloud deployments. However, feel free to use any cloud provider of your choice and follow the same steps for the rest of the tutorial.
Step 1: Setting up a NodeShift Account
Visit app.nodeshift.com and create an account by filling in basic details, or continue signing up with your Google/GitHub account.
If you already have an account, login straight to your dashboard.
Step 2: Create a GPU Node
After accessing your account, you should see a dashboard (see image), now:
- Navigate to the menu on the left side.
- Click on the GPU Nodes option.
- Click on Start to start creating your very first GPU node.
These GPU nodes are GPU-powered virtual machines by NodeShift. These nodes are highly customizable and let you control different environmental configurations for GPUs ranging from H100s to A100s, CPUs, RAM, and storage, according to your needs.
Step 3: Selecting configuration for GPU (model, region, storage)
- For this tutorial, we’ll be using 1x RTX 4090 GPU, however, you can choose any GPU as per the prerequisites.
- Similarly, we’ll opt for 100GB storage by sliding the bar. You can also select the region where you want your GPU to reside from the available ones.
Step 4: Choose GPU Configuration and Authentication method
- After selecting your required configuration options, you’ll see the available GPU nodes in your region and according to (or very close to) your configuration. In our case, we’ll choose a 1x RTX 4090 24GB GPU node with 12vCPUs/63GB RAM/100GB SSD.
2. Next, you’ll need to select an authentication method. Two methods are available: Password and SSH Key. We recommend using SSH keys, as they are a more secure option. To create one, head over to our official documentation.
Step 5: Choose an Image
The final step is to choose an image for the VM, which in our case is Nvidia Cuda, where we’ll deploy and run the inference of our model.
That’s it! You are now ready to deploy the node. Finalize the configuration summary, and if it looks good, click Create to deploy the node.
Step 6: Connect to active Compute Node using SSH
- As soon as you create the node, it will be deployed in a few seconds or a minute. Once deployed, you will see a status Running in green, meaning that our Compute node is ready to use!
- Once your GPU shows this status, navigate to the three dots on the right, click on Connect with SSH, and copy the SSH details that appear.
As you copy the details, follow the below steps to connect to the running GPU VM via SSH:
- Open your terminal, paste the SSH command, and run it.
2. In some cases, your terminal may take your consent before connecting. Enter ‘yes’.
3. A prompt will request a password. Type the SSH password, and you should be connected.
Output:
Next, If you want to check the GPU details, run the following command in the terminal:
!nvidia-smi
Step 7: Set Up Project Environment
- Ensure you’ve have Anaconda installed and create virtual environment with
conda
.
conda create -n adk python=3.11 -y && conda activate adk
Output:
2. Install Google ADK.
pip install google-adk
Output:
3. Create project directory and files.
Run the following commands one by one to create the project directory and all the necessary files within that directory.
mkdir adk
echo "from . import agent" > adk/__init__.py
touch adk/agent.py
touch adk/.env
Step 8: Write Code for Agent
1. For building the agent and running it for inference, we’ll write the starter code in the project directory.
For this, if you’re using a remote server (e.g. NodeShift GPU), you’ll first need to connect your local VS Code editor to your remote server via SSH with the following steps:
a) Install the “Remote-SSH” Extension by Microsoft on VS Code.
b) Type “Remote-SSH: Connect to Host” on the Command Palette.
c) Enter the host details, such as username and SSH password, and you should be connected.
2. Write the following quickstart code in agent.py
for building a basic multi tool agent for weather news.
import datetime
from zoneinfo import ZoneInfo
from google.adk.agents import Agent
def get_weather(city: str) -> dict:
"""Retrieves the current weather report for a specified city.
Args:
city (str): The name of the city for which to retrieve the weather report.
Returns:
dict: status and result or error msg.
"""
if city.lower() == "new york":
return {
"status": "success",
"report": (
"The weather in New York is sunny with a temperature of 25 degrees"
" Celsius (41 degrees Fahrenheit)."
),
}
else:
return {
"status": "error",
"error_message": f"Weather information for '{city}' is not available.",
}
def get_current_time(city: str) -> dict:
"""Returns the current time in a specified city.
Args:
city (str): The name of the city for which to retrieve the current time.
Returns:
dict: status and result or error msg.
"""
if city.lower() == "new york":
tz_identifier = "America/New_York"
else:
return {
"status": "error",
"error_message": (
f"Sorry, I don't have timezone information for {city}."
),
}
tz = ZoneInfo(tz_identifier)
now = datetime.datetime.now(tz)
report = (
f'The current time in {city} is {now.strftime("%Y-%m-%d %H:%M:%S %Z%z")}'
)
return {"status": "success", "report": report}
root_agent = Agent(
name="weather_time_agent",
model="gemini-2.0-flash",
description=(
"Agent to answer questions about the time and weather in a city."
),
instruction=(
"You are a helpful agent who can answer user questions about the time and weather in a city."
),
tools=[get_weather, get_current_time],
)
The code in the file looks like this:
3. Get a free Gemini API key from Google AI Studio and paste it in .env
file.
Step 9: Run & Access the Agent with Dev UI
1. Start the dev UI with the following command.
adk web
Output:
After this, the UI should be running on http://0.0.0.0:8000
.
2. Once the dev UI is up and running, forward and tunnel SSH port to access the app in your local browser, if you’re using a remote server (e.g. NodeShift).
Run the following command in your local terminal after replacing:
<YOUR_SERVER_PORT>
with the PORT allotted to your remote server (For the NodeShift server – you can find it in the deployed GPU details on the dashboard).
<PATH_TO_SSH_KEY>
with the path to the location where your SSH key is stored.
<YOUR_SERVER_IP>
with the IP address of your remote server.
ssh -L 8000:localhost:8000 -p <YOUR_SERVER_PORT> -i <PATH_TO_SSH_KEY> root@<YOUR_SERVER_IP>
Output:
3. Visit localhost:8000
and you’ll see an agent interface like this.
4. Select the agent that you created earlier.
5. Type a prompt to run the agent.
E.g.:
"Tell me the weather in New York"
Output:
6. Once the model generates the response, you can also check the event and request-response structure in detail in the left screen.
Conclusion
In this article, we explored how Google’s Agent Development Kit (ADK) empowers developers to build flexible, code-driven AI agents with fine-grained control over their behavior, tools, and deployment. From setting up ADK to creating and deploying your first agent, we’ve covered the key steps to help you get started in minutes. By combining ADK’s robust capabilities with the scalability and developer-friendly experience of NodeShift Cloud, you can seamlessly deploy and scale your agents in production.