Google‘s Agent Development Kit (ADK) has quickly go a foundational model for building AI agents. Introduced astatine Google Cloud NEXT 2025, ADK powers agents crossed Google products, including Gemini Enterprise and the Google Customer Engagement Suite. What makes ADK peculiarly compelling for developers is its flexibility. Developers tin build agents utilizing Python code, YAML configuration files aliases a drag-and-drop ocular interface — depending connected workflow preferences and usage lawsuit requirements.
In this tutorial, I’ll locomotion you done each 3 approaches to building your first “Hello World” supplier pinch ADK. By nan end, you’ll person a functional supplier moving locally utilizing each method, giving you a instauration to take nan correct attack for your projects.
Understanding nan 3 Approaches
Before diving into implementation, let’s understand what each attack offers:
Imperative agents (Python): This code-first attack gives you maximum elasticity and control. You specify supplier logic, devices and orchestration straight successful Python, making it perfect for analyzable agents that request civilization logic, integration pinch existing codebases aliases blase multiagent systems. The Python attack besides supports immoderate ample connection exemplary (LLM) done LiteLLM integration.
Declarative agents (YAML): Introduced successful August 2025 pinch nan Agent Config feature, this attack lets you specify agents utilizing YAML configuration files. It reduces boilerplate and makes agents easier to understand astatine a glimpse — peculiarly useful for simpler agents aliases erstwhile you want non-developers to understand supplier behaviour.
Visual Agent Builder (GUI): Launched successful ADK v1.18.0, nan Visual Agent Builder is simply a browser-based IDE that combines a ocular workflow designer, configuration panels and an AI assistant. You tin creation multiagent systems done drag-and-drop interactions and earthy connection conversations, pinch nan instrumentality generating due YAML configurations nether nan hood.
Prerequisites
Before we begin, guarantee you person nan following:
- Python 3.10 aliases higher
- A codification editor
- Terminal access
- Either a Google AI Studio API cardinal aliases a Google Cloud task pinch Vertex AI enabled
Step 1: Setting up nan Environment
Let’s commencement by creating a virtual situation and installing ADK. Open your terminal and run:
python -m venv .venv source .venv/bin/activate |
Install nan ADK package:
Verify nan installation:
You should spot nan installed ADK type (1.18.0 aliases higher is required for nan Visual Agent Builder).
Step 2: Configure Model Access
ADK needs entree to an LLM. The simplest action for getting started is utilizing Google AI Studio pinch a free API key. Obtain your API cardinal from Google AI Studio and support it accessible, arsenic you’ll request it for nan adjacent steps.
Approach 1: Building an Imperative Agent With Python
The imperative attack is nan astir powerful method, giving you afloat power complete supplier behaviour done code. Let’s build a elemental greeting supplier that demonstrates nan halfway concepts.
Create nan Project Structure
Create a caller directory for your supplier project:
mkdir hello_agent cd hello_agent |
Create nan pursuing files wrong nan hello_agent directory:
__init__.py
This record marks nan directory arsenic a Python package and imports nan supplier module.
agent.py
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 |
from google.adk.agents import Agent def greet_user(name: str) -> dict: """Greets a personification by name. Args: name (str): The sanction of nan personification to greet. Returns: dict: A greeting connection pinch status. """ return { "status": "success", "message": f"Hello, {name}! Welcome to Google ADK. I'm your first AI agent!" } def get_agent_info() -> dict: """Returns accusation astir this agent. Returns: dict: Information astir nan agent's capabilities. """ return { "status": "success", "info": "I americium a Hello World supplier built pinch Google ADK utilizing Python. " "I tin shake hands users and show them astir myself." } root_agent = Agent( name="hello_agent", model="gemini-2.0-flash", description="A friends greeting supplier that welcomes users to Google ADK.", instruction="""You are a friends and adjuvant greeting agent. Your superior intent is to: 1. Greet users warmly erstwhile they supply their sanction utilizing nan greet_user tool 2. Explain what you are erstwhile asked utilizing nan get_agent_info tool 3. Be enthusiastic astir introducing users to Google ADK Always usage nan disposable devices to respond appropriately to personification requests.""", tools=[greet_user, get_agent_info], ) |
The Agent people is nan halfway building artifact successful ADK. Notice really we specify devices arsenic regular Python functions pinch type hints and docstrings. ADK uses these to thief nan LLM understand erstwhile and really to telephone each tool.
.env
GOOGLE_GENAI_USE_VERTEXAI=0 GOOGLE_API_KEY=YOUR_API_KEY_HERE |
Replace nan placeholder values pinch your existent credentials.
Run nan Agent
Navigate to nan genitor directory of your supplier folder:
Run nan supplier successful terminal mode:
You should spot a punctual indicating nan supplier is running:
Running supplier hello_agent, type exit to exit.
[user]:
Try these interactions:
[user]: Hello, my sanction is Jani
[user]: What tin you do?
[user]: Tell maine astir yourself
The supplier will usage nan due devices to respond. Type exit to quit.
Approach 2: Building a Declarative Agent With YAML
The declarative attack utilizing YAML configuration files simplifies supplier creation, particularly for straightforward usage cases. The Agent Config characteristic generates nan aforesaid underlying supplier building but pinch little code.
Create nan Config-Based Project
Use nan ADK CLI to make a config-based supplier project:
adk create yaml_hello_agent --type=config |
Accept nan defaults and complete nan steps.

Define nan Agent successful YAML
Open yaml_hello_agent/root_agent.yaml and switch its contents with:
name: hello_yaml_agent model: gemini-2.0-flash description: A friendly greeting agent built with YAML configuration. instruction: | You are a friendly and helpful greeting agent. Your primary purpose is to: 1. Greet users warmly when they provide their name using the greet_user tool 2. Explain what you are when asked using the get_agent_info tool 3. Be enthusiastic about introducing users to Google ADK Always use the available tools to respond appropriately to user requests. tools: - name: yaml_hello_agent.greet_user - name: yaml_hello_agent.get_agent_info |
The YAML building mirrors nan Python Agent people parameters, but successful a much readable format. Notice really devices are referenced by their module path.
Create nan Tools Module
A powerful characteristic of ADK’s YAML config is that you tin operation successful Python code. Update __init__.py record successful nan yaml_hello_agent folder:
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
def greet_user(name: str) -> dict: """Greets a personification by name. Args: name (str): The sanction of nan personification to greet. Returns: dict: A greeting connection pinch status. """ return { "status": "success", "message": f"Hello, {name}! Welcome to Google ADK via YAML config!" } def get_agent_info() -> dict: """Returns accusation astir this agent. Returns: dict: Information astir nan agent's capabilities. """ return { "status": "success", "info": "I americium a Hello World supplier built pinch YAML configuration. " "I show nan declarative attack to ADK agents." } |
Your task building should now look like:
yaml_hello_agent/
├── root_agent.yaml
├── __init__.py
└── .env
Run nan YAML-Based Agent
Navigate to nan genitor directory and run:
Test it pinch nan aforesaid prompts:
[user]: Hi, I'm Jani [user]: What are you? |
The supplier responds identically to nan Python type but is defined wholly done configuration.
Approach 3: Building an Agent With nan Visual Agent Builder
The Visual Agent Builder, introduced successful ADK v1.18.0, is simply a browser-based IDE that transforms really you build agents. It combines a ocular workflow designer, configuration panels and an AI adjunct that lets you creation agents done drag-and-drop interactions and earthy connection conversations.
Launch nan Visual Agent Builder
From immoderate directory, run:

Open http://localhost:8000/dev-ui/ successful your browser to entree nan Visual Agent Builder.
Click nan “+” fastener adjacent to nan dropdown and participate nan sanction visual_hello_agent:

Instead of manually configuring nan agent, let’s usage nan AI Assistant. In nan correct panel, type:
Create a elemental greeting supplier that can:
1. Greet users by sanction erstwhile they present themselves
2. Tell users astir itself erstwhile asked
Use gemini-2.5-flash arsenic nan model. Keep it elemental pinch conscionable 2 tools.

The AI Assistant will make a complete supplier configuration, including:
- Proper supplier sanction and description
- Model selection
- Detailed instructions

Click nan Save button, past exit nan builder mode. You tin now chat pinch nan agent.

Comparing nan 3 Approaches
After building agents pinch each 3 methods, here’s really they compare:
Key considerations:
- The Python approach is champion erstwhile you request maximum control, civilization integrations aliases support for non-Gemini models done LiteLLM.
- The YAML approach useful good for straightforward agents wherever you want nan simplicity of configuration files pinch nan expertise to operation successful Python tools.
- The Visual Builder excels astatine accelerated prototyping, learning ADK concepts and collaborating pinch non-developers who tin picture requirements successful earthy language.
In practice, these approaches complement each other. You mightiness usage nan Visual Builder to prototype and understand an architecture, past export nan YAML for type power and CI/CD pipelines.
Looking Ahead
This tutorial covered nan basal steps to build your first AI agents utilizing Google ADK’s 3 improvement approaches. Each method has its strengths, and nan model is designed truthful you tin move fluidly betwixt them — starting visually, exporting to YAML and dropping into Python erstwhile you request precocious functionality.
In consequent tutorials, we’ll research precocious ADK capabilities, including multiagent systems pinch Sequential, Parallel and Loop patterns, instrumentality integration pinch Model Context Protocol (MCP) servers, convention guidance and representation persistence, and deployment to Vertex AI Agent Engine. The instauration you’ve built present will service you good arsenic we tackle progressively blase agentic workflows.
YOUTUBE.COM/THENEWSTACK
Tech moves fast, don't miss an episode. Subscribe to our YouTube channel to watercourse each our podcasts, interviews, demos, and more.
Group Created pinch Sketch.
English (US) ·
Indonesian (ID) ·