{"id":173369,"date":"2025-12-03T19:18:11","date_gmt":"2025-12-03T19:18:11","guid":{"rendered":"https:\/\/www.newsbeep.com\/ie\/173369\/"},"modified":"2025-12-03T19:18:11","modified_gmt":"2025-12-03T19:18:11","slug":"how-to-build-ai-agents-3-ways-with-google-adk","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/ie\/173369\/","title":{"rendered":"How To Build AI Agents 3 Ways With Google ADK"},"content":{"rendered":"<p><a href=\"https:\/\/cloud.google.com\/?utm_content=inline+mention\" class=\"ext-link\" target=\"_blank\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\">Google<\/a>\u2018s <a href=\"https:\/\/google.github.io\/adk-docs\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Agent Development Kit<\/a> (ADK) has rapidly become a foundational framework for building AI agents. <a href=\"https:\/\/thenewstack.io\/googles-adk-is-a-new-open-source-framework-for-building-multiagent-systems\/\" class=\"local-link\" rel=\"nofollow noopener\" target=\"_blank\">Introduced at Google Cloud NEXT 2025<\/a>, ADK powers agents across Google products, including <a href=\"https:\/\/cloud.google.com\/gemini-enterprise?utm_source=google&amp;utm_medium=cpc&amp;utm_campaign=1710070-Workspace-DR-APAC-IN-en-Google-BKWS-EXA-Pollux&amp;utm_content=c-Hybrid+%7C+BKWS+-+EXA+%7C+Txt-Pollux-Generic-435278751514&amp;utm_term=gemini+enterprise&amp;gclsrc=aw.ds&amp;gad_source=1&amp;gad_campaignid=23080541881&amp;gclid=CjwKCAiA55rJBhByEiwAFkY1QGdZPP5s9wkpjdS3nzYfKqlrtfqicVSrvS5P13nnCq3dXyHtXPigwhoC2fkQAvD_BwE&amp;hl=en\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Gemini Enterprise<\/a> and the\u00a0<a href=\"https:\/\/cloud.google.com\/solutions\/customer-engagement-ai?hl=en\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Google Customer Engagement Suite<\/a>. What makes ADK particularly compelling for developers is its flexibility. Developers can build agents using Python code, YAML configuration files or a drag-and-drop visual interface \u2014 depending on workflow preferences and use case requirements.<\/p>\n<p>In this tutorial, I\u2019ll walk you through all three approaches to building your first \u201cHello World\u201d agent with ADK. By the end, you\u2019ll have a functional agent running locally using each method, giving you a foundation to choose the right approach for your projects.<\/p>\n<p>Understanding the 3 Approaches<\/p>\n<p>Before diving into implementation, let\u2019s understand what each approach offers:<\/p>\n<p>Imperative agents (Python): This code-first approach gives you maximum flexibility and control. You define agent logic, tools and orchestration directly in Python, making it ideal for complex agents that need custom logic, integration with existing codebases or sophisticated multiagent systems. The Python approach also supports any large language model (LLM) through LiteLLM integration.<\/p>\n<p>Declarative agents (YAML): Introduced in August 2025 with the Agent Config feature, this approach lets you define agents using YAML configuration files. It reduces boilerplate and makes agents easier to understand at a glance \u2014 particularly useful for simpler agents or when you want non-developers to understand agent behaviour.<\/p>\n<p>Visual Agent Builder (GUI): Launched in ADK v1.18.0, the Visual Agent Builder is a browser-based IDE that combines a visual workflow designer, configuration panels and an AI assistant. You can design multiagent systems through drag-and-drop interactions and natural language conversations, with the tool generating proper YAML configurations under the hood.<\/p>\n<p>Prerequisites<\/p>\n<p>Before we begin, ensure you have the following:<\/p>\n<p>Python 3.10 or higher<br \/>\nA code editor<br \/>\nTerminal access<br \/>\nEither a Google AI Studio API key or a Google Cloud project with Vertex AI enabled<\/p>\n<p>Step 1: Setting up the Environment<\/p>\n<p>Let\u2019s start by creating a virtual environment and installing ADK. Open your terminal and run:<\/p>\n<p>\npython -m venv .venv&#13;<br \/>\nsource .venv\/bin\/activate  <\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>python -m venv .venv<\/p>\n<p>source .venv\/bin\/activate\u00a0\u00a0<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>Install the ADK package:<\/p>\n<p>Verify the installation:<\/p>\n<p>You should see the installed ADK version (1.18.0 or higher is required for the Visual Agent Builder).<\/p>\n<p>Step 2: Configure Model Access<\/p>\n<p>ADK needs access to an LLM. The simplest option for getting started is using <a href=\"https:\/\/aistudio.google.com\/\" class=\"ext-link\" rel=\"external  nofollow noopener\" onclick=\"this.target=&#039;_blank&#039;;\" target=\"_blank\">Google AI Studio<\/a> with a free API key. Obtain your API key from Google AI Studio and keep it accessible, as you\u2019ll need it for the next steps.<\/p>\n<p>Approach 1: Building an Imperative Agent With Python<\/p>\n<p>The imperative approach is the most powerful method, giving you full control over agent behavior through code. Let\u2019s build a simple greeting agent that demonstrates the core concepts.<\/p>\n<p>Create the Project Structure<\/p>\n<p>Create a new directory for your agent project:<\/p>\n<p>\nmkdir hello_agent&#13;<br \/>\ncd hello_agent<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>mkdir hello_agent<\/p>\n<p>cd hello_agent<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>Create the following files inside the hello_agent directory:<\/p>\n<p>__init__.py<\/p>\n<p>This file marks the directory as a Python package and imports the agent module.<\/p>\n<p>agent.py<\/p>\n<p>\nfrom google.adk.agents import Agent&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\ndef greet_user(name: str) -&gt; dict:&#13;<br \/>\n    &#8220;&#8221;&#8221;Greets a user by name.&#13;<br \/>\n    &#13;<br \/>\n    Args:&#13;<br \/>\n        name (str): The name of the user to greet.&#13;<br \/>\n        &#13;<br \/>\n    Returns:&#13;<br \/>\n        dict: A greeting message with status.&#13;<br \/>\n    &#8220;&#8221;&#8221;&#13;<br \/>\n    return {&#13;<br \/>\n        &#8220;status&#8221;: &#8220;success&#8221;,&#13;<br \/>\n        &#8220;message&#8221;: f&#8221;Hello, {name}! Welcome to Google ADK. I&#8217;m your first AI agent!&#8221;&#13;<br \/>\n    }&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\ndef get_agent_info() -&gt; dict:&#13;<br \/>\n    &#8220;&#8221;&#8221;Returns information about this agent.&#13;<br \/>\n    &#13;<br \/>\n    Returns:&#13;<br \/>\n        dict: Information about the agent&#8217;s capabilities.&#13;<br \/>\n    &#8220;&#8221;&#8221;&#13;<br \/>\n    return {&#13;<br \/>\n        &#8220;status&#8221;: &#8220;success&#8221;,&#13;<br \/>\n        &#8220;info&#8221;: &#8220;I am a Hello World agent built with Google ADK using Python. &#8220;&#13;<br \/>\n                &#8220;I can greet users and tell them about myself.&#8221;&#13;<br \/>\n    }&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\nroot_agent = Agent(&#13;<br \/>\n    name=&#8221;hello_agent&#8221;,&#13;<br \/>\n    model=&#8221;gemini-2.0-flash&#8221;,&#13;<br \/>\n    description=&#8221;A friendly greeting agent that welcomes users to Google ADK.&#8221;,&#13;<br \/>\n    instruction=&#8221;&#8221;&#8221;You are a friendly and helpful greeting agent. Your primary purpose is to:&#13;<br \/>\n    1. Greet users warmly when they provide their name using the greet_user tool&#13;<br \/>\n    2. Explain what you are when asked using the get_agent_info tool&#13;<br \/>\n    3. Be enthusiastic about introducing users to Google ADK&#13;<br \/>\n    &#13;<br \/>\n    Always use the available tools to respond appropriately to user requests.&#8221;&#8221;&#8221;,&#13;<br \/>\n    tools=[greet_user, get_agent_info],&#13;<br \/>\n)<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<p>18<\/p>\n<p>19<\/p>\n<p>20<\/p>\n<p>21<\/p>\n<p>22<\/p>\n<p>23<\/p>\n<p>24<\/p>\n<p>25<\/p>\n<p>26<\/p>\n<p>27<\/p>\n<p>28<\/p>\n<p>29<\/p>\n<p>30<\/p>\n<p>31<\/p>\n<p>32<\/p>\n<p>33<\/p>\n<p>34<\/p>\n<p>35<\/p>\n<p>36<\/p>\n<p>37<\/p>\n<p>38<\/p>\n<p>39<\/p>\n<p>40<\/p>\n<p>41<\/p>\n<p>42<\/p>\n<p>43<\/p>\n<p>&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>from google.adk.agents import Agent<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>def greet_user(name: str) -&gt; dict:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;Greets a user by name.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Args:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0name (str): The name of the user to greet.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Returns:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dict: A greeting message with status.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0return {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;status&#8221;: &#8220;success&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;message&#8221;: f&#8221;Hello, {name}! Welcome to Google ADK. I&#8217;m your first AI agent!&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>def get_agent_info() -&gt; dict:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;Returns information about this agent.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Returns:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dict: Information about the agent&#8217;s capabilities.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0return {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;status&#8221;: &#8220;success&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;info&#8221;: &#8220;I am a Hello World agent built with Google ADK using Python. &#8220;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;I can greet users and tell them about myself.&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>root_agent = Agent(<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0name=&#8221;hello_agent&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0model=&#8221;gemini-2.0-flash&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0description=&#8221;A friendly greeting agent that welcomes users to Google ADK.&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0instruction=&#8221;&#8221;&#8221;You are a friendly and helpful greeting agent. Your primary purpose is to:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a01. Greet users warmly when they provide their name using the greet_user tool<\/p>\n<p>\u00a0\u00a0\u00a0\u00a02. Explain what you are when asked using the get_agent_info tool<\/p>\n<p>\u00a0\u00a0\u00a0\u00a03. Be enthusiastic about introducing users to Google ADK<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Always use the available tools to respond appropriately to user requests.&#8221;&#8221;&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0tools=[greet_user, get_agent_info],<\/p>\n<p>)<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>The Agent class is the core building block in ADK. Notice how we define tools as regular Python functions with type hints and docstrings. ADK uses these to help the LLM understand when and how to call each tool.<\/p>\n<p>.env<\/p>\n<p>\nGOOGLE_GENAI_USE_VERTEXAI=0&#13;<br \/>\nGOOGLE_API_KEY=YOUR_API_KEY_HERE<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>GOOGLE_GENAI_USE_VERTEXAI=0<\/p>\n<p>GOOGLE_API_KEY=YOUR_API_KEY_HERE<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>Replace the placeholder values with your actual credentials.<\/p>\n<p>Run the Agent<\/p>\n<p>Navigate to the parent directory of your agent folder:<\/p>\n<p>Run the agent in terminal mode:<\/p>\n<p>You should see a prompt indicating the agent is running:<\/p>\n<p>Running agent hello_agent, type exit to exit.<br \/>[user]:<br \/>Try these interactions:<br \/>[user]: Hello, my name is Jani<br \/>[user]: What can you do?<br \/>[user]: Tell me about yourself<\/p>\n<p>The agent will use the appropriate tools to respond. Type exit to quit.<\/p>\n<p>Approach 2: Building a Declarative Agent With YAML<\/p>\n<p>The declarative approach using YAML configuration files simplifies agent creation, especially for straightforward use cases. The Agent Config feature generates the same underlying agent structure but with less code.<\/p>\n<p>Create the Config-Based Project<\/p>\n<p>Use the ADK CLI to generate a config-based agent project:<\/p>\n<p>\nadk create yaml_hello_agent &#8211;type=config<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>adk create yaml_hello_agent &#8211;type=config<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>Accept the defaults and complete the steps.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22807943\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/b94370f5-adk-1-0-1024x601.png\" alt=\"\" width=\"1024\" height=\"601\"\/><\/p>\n<p>Define the Agent in YAML<\/p>\n<p>Open yaml_hello_agent\/root_agent.yaml and replace its contents with:<\/p>\n<p>\nname: hello_yaml_agent&#13;<br \/>\nmodel: gemini-2.0-flash&#13;<br \/>\ndescription: A friendly greeting agent built with YAML configuration.&#13;<br \/>\ninstruction: |&#13;<br \/>\n  You are a friendly and helpful greeting agent. Your primary purpose is to:&#13;<br \/>\n  1. Greet users warmly when they provide their name using the greet_user tool&#13;<br \/>\n  2. Explain what you are when asked using the get_agent_info tool&#13;<br \/>\n  3. Be enthusiastic about introducing users to Google ADK&#13;<br \/>\n  &#13;<br \/>\n  Always use the available tools to respond appropriately to user requests.&#13;<br \/>\ntools:&#13;<br \/>\n  &#8211; name: yaml_hello_agent.greet_user&#13;<br \/>\n  &#8211; name: yaml_hello_agent.get_agent_info<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>name: hello_yaml_agent<\/p>\n<p>model: gemini-2.0-flash<\/p>\n<p>description: A friendly greeting agent built with YAML configuration.<\/p>\n<p>instruction: |<\/p>\n<p>\u00a0\u00a0You are a friendly and helpful greeting agent. Your primary purpose is to:<\/p>\n<p>\u00a0\u00a01. Greet users warmly when they provide their name using the greet_user tool<\/p>\n<p>\u00a0\u00a02. Explain what you are when asked using the get_agent_info tool<\/p>\n<p>\u00a0\u00a03. Be enthusiastic about introducing users to Google ADK<\/p>\n<p>\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0Always use the available tools to respond appropriately to user requests.<\/p>\n<p>tools:<\/p>\n<p>\u00a0\u00a0&#8211; name: yaml_hello_agent.greet_user<\/p>\n<p>\u00a0\u00a0&#8211; name: yaml_hello_agent.get_agent_info<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>The YAML structure mirrors the Python Agent class parameters, but in a more readable format. Notice how tools are referenced by their module path.<\/p>\n<p>Create the Tools Module<\/p>\n<p>A powerful feature of ADK\u2019s YAML config is that you can mix in Python code. Update __init__.py file in the yaml_hello_agent folder:<\/p>\n<p>\ndef greet_user(name: str) -&gt; dict:&#13;<br \/>\n    &#8220;&#8221;&#8221;Greets a user by name.&#13;<br \/>\n    &#13;<br \/>\n    Args:&#13;<br \/>\n        name (str): The name of the user to greet.&#13;<br \/>\n        &#13;<br \/>\n    Returns:&#13;<br \/>\n        dict: A greeting message with status.&#13;<br \/>\n    &#8220;&#8221;&#8221;&#13;<br \/>\n    return {&#13;<br \/>\n        &#8220;status&#8221;: &#8220;success&#8221;,&#13;<br \/>\n        &#8220;message&#8221;: f&#8221;Hello, {name}! Welcome to Google ADK via YAML config!&#8221;&#13;<br \/>\n    }&#13;<br \/>\n&#13;<br \/>\n&#13;<br \/>\ndef get_agent_info() -&gt; dict:&#13;<br \/>\n    &#8220;&#8221;&#8221;Returns information about this agent.&#13;<br \/>\n    &#13;<br \/>\n    Returns:&#13;<br \/>\n        dict: Information about the agent&#8217;s capabilities.&#13;<br \/>\n    &#8220;&#8221;&#8221;&#13;<br \/>\n    return {&#13;<br \/>\n        &#8220;status&#8221;: &#8220;success&#8221;, &#13;<br \/>\n        &#8220;info&#8221;: &#8220;I am a Hello World agent built with YAML configuration. &#8220;&#13;<br \/>\n                &#8220;I demonstrate the declarative approach to ADK agents.&#8221;&#13;<br \/>\n    }<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>1<\/p>\n<p>2<\/p>\n<p>3<\/p>\n<p>4<\/p>\n<p>5<\/p>\n<p>6<\/p>\n<p>7<\/p>\n<p>8<\/p>\n<p>9<\/p>\n<p>10<\/p>\n<p>11<\/p>\n<p>12<\/p>\n<p>13<\/p>\n<p>14<\/p>\n<p>15<\/p>\n<p>16<\/p>\n<p>17<\/p>\n<p>18<\/p>\n<p>19<\/p>\n<p>20<\/p>\n<p>21<\/p>\n<p>22<\/p>\n<p>23<\/p>\n<p>24<\/p>\n<p>25<\/p>\n<p>26<\/p>\n<p>&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>def greet_user(name: str) -&gt; dict:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;Greets a user by name.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Args:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0name (str): The name of the user to greet.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Returns:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dict: A greeting message with status.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0return {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;status&#8221;: &#8220;success&#8221;,<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;message&#8221;: f&#8221;Hello, {name}! Welcome to Google ADK via YAML config!&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>\u00a0<\/p>\n<p>\u00a0<\/p>\n<p>def get_agent_info() -&gt; dict:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;Returns information about this agent.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0Returns:<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0dict: Information about the agent&#8217;s capabilities.<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0&#8220;&#8221;&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0return {<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;status&#8221;: &#8220;success&#8221;, <\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;info&#8221;: &#8220;I am a Hello World agent built with YAML configuration. &#8220;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0&#8220;I demonstrate the declarative approach to ADK agents.&#8221;<\/p>\n<p>\u00a0\u00a0\u00a0\u00a0}<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>Your project structure should now look like:<\/p>\n<p>yaml_hello_agent\/<br \/>\u251c\u2500\u2500 root_agent.yaml<br \/>\u251c\u2500\u2500 __init__.py<br \/>\u2514\u2500\u2500 .env<\/p>\n<p>Run the YAML-Based Agent<\/p>\n<p>Navigate to the parent directory and run:<\/p>\n<p>Test it with the same prompts:<\/p>\n<p>\n[user]: Hi, I&#8217;m Jani&#13;<br \/>\n[user]: What are you?<\/p>\n<p>\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<br \/>\n\t\t\t\t\t&#13;<br \/>\n\t\t\t\t&#13;<\/p>\n<p>[user]: Hi, I&#8217;m Jani<\/p>\n<p>[user]: What are you?<\/p>\n<p>&#13;<br \/>\n\t\t\t\t\t&#13;<\/p>\n<p>The agent responds identically to the Python version but is defined entirely through configuration.<\/p>\n<p>Approach 3: Building an Agent With the Visual Agent Builder<\/p>\n<p>The Visual Agent Builder, introduced in ADK v1.18.0, is a browser-based IDE that transforms how you build agents. It combines a visual workflow designer, configuration panels and an AI assistant that lets you design agents through drag-and-drop interactions and natural language conversations.<\/p>\n<p>Launch the Visual Agent Builder<\/p>\n<p>From any directory, run:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22807944\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/4c9ef222-adk-1-1-1024x446.png\" alt=\"\" width=\"1024\" height=\"446\"\/><\/p>\n<p>Open http:\/\/localhost:8000\/dev-ui\/ in your browser to access the Visual Agent Builder.<\/p>\n<p>Click the \u201c+\u201d button next to the dropdown and enter the name visual_hello_agent:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22807945\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/b5c12cc7-adk-1-2-1024x771.png\" alt=\"\" width=\"1024\" height=\"771\"\/><\/p>\n<p>Instead of manually configuring the agent, let\u2019s use the AI Assistant. In the right panel, type:<\/p>\n<p>Create a simple greeting agent that can:<br \/>1. Greet users by name when they introduce themselves<br \/>2. Tell users about itself when asked<br \/>Use gemini-2.5-flash as the model. Keep it simple with just two tools.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22807946\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/71fbb3ba-adk-1-3-1024x563.png\" alt=\"\" width=\"1024\" height=\"563\"\/><\/p>\n<p>The AI Assistant will generate a complete agent configuration, including:<\/p>\n<p>Proper agent name and description<br \/>\nModel selection<br \/>\nDetailed instructions<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22807947\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/fb5ddcc9-adk-1-4-1024x563.png\" alt=\"\" width=\"1024\" height=\"563\"\/><\/p>\n<p>Click the Save button, then exit the builder mode. You can now chat with the agent.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-22807948\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/d6c47e08-adk-1-5-1024x541.png\" alt=\"\" width=\"1024\" height=\"541\"\/><\/p>\n<p>Comparing the 3 Approaches<\/p>\n<p>After building agents with all three methods, here\u2019s how they compare:<\/p>\n<p>Key considerations:<\/p>\n<p>The Python approach is best when you need maximum control, custom integrations or support for non-Gemini models through LiteLLM.<br \/>\nThe YAML approach works well for straightforward agents where you want the simplicity of configuration files with the ability to mix in Python tools.<br \/>\nThe Visual Builder excels at rapid prototyping, learning ADK concepts and collaborating with non-developers who can describe requirements in natural language.<\/p>\n<p>In practice, these approaches complement each other. You might use the Visual Builder to prototype and understand an architecture, then export the YAML for version control and CI\/CD pipelines.<\/p>\n<p>Looking Ahead<\/p>\n<p>This tutorial covered the essential steps to build your first AI agents using Google ADK\u2019s three development approaches. Each method has its strengths, and the framework is designed so you can move fluidly between them \u2014 starting visually, exporting to YAML and dropping into Python when you need advanced functionality.<\/p>\n<p>In subsequent tutorials, we\u2019ll explore advanced ADK capabilities, including multiagent systems with Sequential, Parallel and Loop patterns, tool integration with Model Context Protocol (MCP) servers, session management and memory persistence, and deployment to Vertex AI Agent Engine. The foundation you\u2019ve built here will serve you well as we tackle increasingly sophisticated agentic workflows.<\/p>\n<p>\t<a class=\"row youtube-subscribe-block\" href=\"https:\/\/youtube.com\/thenewstack?sub_confirmation=1\" target=\"_blank\" rel=\"nofollow noopener\"><\/p>\n<p>\n\t\t\t\tYOUTUBE.COM\/THENEWSTACK\n\t\t\t<\/p>\n<p>\n\t\t\t\tTech moves fast, don&#8217;t miss an episode. Subscribe to our YouTube<br \/>\n\t\t\t\tchannel to stream all our podcasts, interviews, demos, and more.\n\t\t\t<\/p>\n<p>\t\t\t\tSUBSCRIBE<\/p>\n<p>\t<\/a><\/p>\n<p>    Group<br \/>\n    Created with Sketch.<\/p>\n<p>\t\t<a href=\"https:\/\/thenewstack.io\/author\/janakiram\/\" class=\"author-more-link\" rel=\"nofollow noopener\" target=\"_blank\"><\/p>\n<p>\t\t\t\t\t<img decoding=\"async\" class=\"post-author-avatar\" src=\"https:\/\/www.newsbeep.com\/ie\/wp-content\/uploads\/2025\/12\/de43524e-janakiram-msv.jpg\"\/><\/p>\n<p>\n\t\t\t\t\t\t\tJanakiram MSV is the principal analyst at Janakiram &amp; Associates and an adjunct faculty member at the International Institute of Information Technology. He is also a Google Qualified Cloud Developer, an Amazon Certified Solution Architect, an Amazon Certified Developer, an&#8230;\t\t\t\t\t\t<\/p>\n<p>\t\t\t\t\t\tRead more from Janakiram MSV\t\t\t\t\t\t<\/p>\n<p>\t\t<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"Google\u2018s Agent Development Kit (ADK) has rapidly become a foundational framework for building AI agents. Introduced at Google&hellip;\n","protected":false},"author":2,"featured_media":173370,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[61,60,80,34789],"class_list":["post-173369","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","tag-ie","tag-ireland","tag-technology","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts\/173369","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/comments?post=173369"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/posts\/173369\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/media\/173370"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/media?parent=173369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/categories?post=173369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ie\/wp-json\/wp\/v2\/tags?post=173369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}