The world of AI agents is moving at lightning speed. Keeping up with the latest trends, new open-source tools, and important developer conversations can feel like a full-time job. We're facing this exact challenge as we prepare to launch our new podcast for agent developers, which will be dedicated to all things AI agents (stay tuned!). To make sure we're ready for each episode, we wanted to create an automated way to get up-to-date with the news that matters.
In this guide, we are going to walk you step-by-step through building your very first AI agent on Google Cloud using the open-source Agent Development Kit (ADK). We will design a "Trend Spotter" agent whose mission is to act as your personal AI analyst, teaching it to scan the web and sift through the noise to find what truly matters.
By the end of this post, you will have a practical, working tool that automatically creates a concise intelligence report to keep you up-to-date, saving you hours of manual research. More importantly, you will learn the fundamental skills to build your own agents with ADK. You will know how to:
- Structure a simple, powerful ADK agent as a proper Python package.
- Write a detailed prompt to define your agent's logic and workflow.
- Provide your agent with tools like Google Search.
- Set up, test, and run your agent locally using the adk web interface.
- Deploy your agent to Cloud Run.
Let's get started.
Part 1: Setup and Configuration
This setup uses a standard package structure that allows the ADK tools to discover and run our agent without a main.py file.
Step 1.1: Prerequisites
- Python 3.11+
- Google Cloud CLI: Follow the official installation guide here.
- Google Cloud Account.
Step 1.2: Create Your Project Structure
Open your terminal. Create the following folder structure and virtual environment.
# Create the main project folder
mkdir trend-spotter && cd trend-spotter
# Create the Python package folder that will hold our code
mkdir trend_spotter
touch trend_spotter/__init__.py
touch trend_spotter/agent.py
touch trend_spotter/prompt.py
# Create the top-level configuration files
touch pyproject.toml requirements.txt
# Finally, create and activate a virtual environment
python3 -m venv venv && source venv/bin/activate
(On Windows, use python -m venv venv && .\venv\Scripts\activate)
Step 1.3: Install ADK
- Open requirements.txt and add our single dependency:
google-adk
Install it from your terminal:
pip install -r requirements.txt
Step 1.4: Configure Your Cloud Environment
These settings tell ADK how to securely connect to your Google Cloud account to use services like Vertex AI and Google Search.
- Set Environment Variables: In your terminal, run the following export commands. These tell ADK to use the Vertex AI platform in your specific Google Cloud project and region.
export GOOGLE_GENAI_USE_VERTEXAI=true
export GOOGLE_CLOUD_PROJECT=<your-gcp-project-id>
export GOOGLE_CLOUD_LOCATION=<your-gcp-project-location>
- Log In to Your Account: Run this one-time command. It will open a browser for you to sign in, allowing ADK to make authorized requests on your behalf.
gcloud auth application-default login
Part 2: Building Your Agent
Now we'll write the code and place it inside our trend_spotter package directory.
Step 2.1: Define the Agent's Brain (The Prompt)
The prompt contains all the instructions for our agent.
Note that we are guiding the LLM to specify the date range in the call to the GoogleSearch tool to make sure we are focusing on trends from the last week.
Open trend_spotter/prompt.py and add these instructions:
# trend_spotter/prompt.py
TREND_SPOTTER_PROMPT = """
You are a helpful AI assistant and expert tech analyst for a new podcast called "The Agent Factory". Your goal is to generate a highly relevant and verifiable report about the latest developments in AI agents that specifically impact developers.
**Your multi-step plan is as follows:**
**Step 1: Discover the Current Date.**
Your very first action must be to find the current date.
- **Action**: Use the `Google Search` tool with a query like "what is today's date".
- From the search result, identify the current year, month, and day.
**Step 2: Formulate and Execute Search Queries with Date Operators.**
Now, you must formulate your search queries by embedding the date range directly into the query string using Google's `after:YYYY-MM-DD` and `before:YYYY-MM-DD` operators. Calculate these dates to cover the last 7 days.
- You must perform at least three initial searches to cover trends, releases, and questions.
- **Example Query Format**: `"AI agent trends after:2025-06-01 before:2025-06-08"`
- After the initial searches, you may perform 1-2 additional, more targeted searches if a category is missing information. **Do not perform more than 5 searches in total.**
**Step 3: Analyze the Results and Create the Report.**
Read through all the text and links from your searches. Your primary filter is to **only select topics, tools, and questions that have a direct and significant impact on developers building AI agents.**
**Critical Rule for Sourcing:** For every trend, release, or question you identify, you must first pinpoint the **single best search result** that provides the evidence. You will then use the URL from that **exact search result** as the source link for that item. **If you cannot find a specific source link for an item, do not include that item in the report.**
Based on these rules, create a report:
1. The report **must begin with a header** specifying the date range used.
2. The body of the report must have exactly three sections.
3. For each item, you **must provide three pieces of information**: a 1-2 sentence explanation, the "Developer Impact" analysis, and the **verifiable source URL**.
The report format must be:
**🔥 Top 5 Trends for Agent Developers**
1. **[Trend 1 Name]**: [A 1-2 sentence explanation of this trend.] (Source: [URL])
* **Developer Impact**: [A 1-sentence explanation of why this matters to developers.]
2. ... (up to 5 total)
**🚀 Top 5 Releases for Agent Developers**
1. **[Release 1 Name]**: [A 1-2 sentence explanation of the tool, framework, or model.] (Source: [URL])
* **Developer Impact**: [A 1-sentence explanation of why this matters to developers.]
2. ... (up to 5 total)
**🤔 Top 5 Questions from Agent Developers**
1. **[Question 1 Topic]**: [A 1-2 sentence explanation of what developers are asking.] (Source: [URL])
* **Developer Impact**: [A 1-sentence explanation of why this matters to developers.]
2. ... (up to 5 total)
Begin your work now by executing your plan.
"""
Step 2.2: Assemble the Agent
The agent.py file connects our prompt and the search tool to a new ADK Agent.
Open trend_spotter/agent.py and add this code:
# trend_spotter/agent.py
from google.adk.agents import Agent
from google.adk.tools import google_search
from . import prompt
# Use the "latest" tag to always get the most recent stable version of the model.
MODEL = "gemini-2.5-pro-preview-05–06"
# This single agent will perform all the work.
trend_spotter_agent = Agent(
model=MODEL,
name="trend_spotter_agent",
description="An agent that finds and reports on AI agent trends.",
# The agent's entire logic comes from our detailed prompt.
instruction=prompt.TREND_SPOTTER_PROMPT,
# We give the agent a single tool: the ability to search Google.
tools=[google_search],
)
# We assign it to `root_agent` by convention for ADK to discover.
root_agent = trend_spotter_agent
Step 2.3: Making Your Agent Discoverable
To use the adk web command, we need to tell ADK where to find our agent. We do this in the pyproject.toml file.
Open pyproject.toml in your root directory and add the following configuration:
[project]
name = "trend_spotter"
version = "0.1.0"
# This section tells the ADK how to find our agent.
[tool.adk.agents]
trend_spotter = "trend_spotter.agent:root_agent"
Part 3: Running Your Agent
Now for the exciting part!
Step 3.1: Install your agent:
Run this command from your project's root directory. The -e . command installs your project in "editable" mode so the adk tool can find it.
pip install -e .
Step 3.2: Launch the web interface:
adk web
Open the URL that appears in your terminal. In the web interface, select "trend_spotter" from the dropdown menu. You can now chat with your agent! Ask it: "Generate a report on the latest AI agent news." This might take a few minutes, depending on the amount of searches you instruct the agent to perform in your prompt.
The response will look similar to this:
Okay, I will begin by finding the current date.
Okay, I have identified the current date as June 7, 2025.
Now, I will formulate and execute search queries to find information from the last 7 days (June 1, 2025, to June 7, 2025) about AI agent trends, releases, and questions relevant to developers.
Okay, I have analyzed the search results and will now generate the report on AI agent developments impacting developers for the period of June 1, 2025, to June 7, 2025.
Report: AI Agent Developments for Developers (June 1, 2025 - June 7, 2025)
🔥 Top 5 Trends for Agent Developers
Maturation of Agentic AI: Agentic AI, which involves AI systems that can autonomously handle complex tasks, is moving beyond hype and into practical application, with companies beginning to launch pilot projects. This trend signifies a shift towards more sophisticated AI that can streamline various stages of software development, testing, and maintenance.
Developer Impact: Developers will increasingly need to build, integrate, and manage these more autonomous AI agents, requiring skills in designing for complex, goal-oriented behaviors.
Rise of Multi-Agent Systems: There is a growing interest in systems where multiple AI agents collaborate to solve larger, more complex problems than a single agent could handle. This involves individual agents with specific goals and tools working together within a broader workflow.
Developer Impact: This trend requires developers to think about inter-agent communication protocols, task delegation, and overall system orchestration.
Emphasis on AI Agent Evaluation and Benchmarking: As AI agents become more capable and undertake more complex tasks, there's a corresponding growth in the need for robust evaluation methods and standardized benchmarks. These benchmarks aim to assess core competencies like planning, reasoning, and tool usage.
Developer Impact: Developers will need to leverage these evolving benchmarks to test, validate, and improve the reliability and performance of the agents they build.
Enhanced NLP and Personalization in Conversational AI: Conversational AI agents are advancing to provide more human-like interactions, including better understanding of natural language, emotional cues, and offering highly personalized user experiences.
Developer Impact: Developers creating conversational interfaces must focus on incorporating these advanced NLP and personalization techniques to build more engaging and effective AI agents.
Shift Towards AI-Native Development Infrastructure: The rapid generation of code by AI agents is prompting a re-evaluation of existing development platforms like GitHub and GitLab, which were primarily designed for human development speeds. This points towards a need for infrastructure that can better support AI-driven development rhythms.
Developer Impact: Developers should anticipate changes in their toolchains and workflows, potentially including new platforms designed to handle the increased volume and velocity of AI-generated code and the unique review processes required.
🚀 Top 5 Releases for Agent Developers
Embabel Agent Framework: Launched by Spring founder Rod Johnson, Embabel is a new JVM-based, type-safe framework for building AI-powered applications, particularly for integrating Large Language Models (LLMs) with Java applications using Goal-Oriented Action Planning (GOAP).
Developer Impact: Java developers now have a dedicated, high-level framework that emphasizes production-readiness, type safety, and advanced planning capabilities for creating sophisticated AI agents within the Spring ecosystem.
Digitate's ignioâ„¢ Agentic AI Platform Update: Digitate announced a significant update to its ignioâ„¢ platform, introducing a suite of purpose-built AI agents aimed at IT operations, SREs, and CIOs to accelerate the move towards autonomous enterprise and ticketless IT operations.
Developer Impact: Developers working on enterprise IT and business process automation can leverage these new agents to handle complex tasks more autonomously, improving efficiency and system resiliency.
Digital Twin Consortium's AI Agent Capabilities Periodic Table (AIA CPT): The DTC launched the AIA CPT, an industry-first standardized framework for evaluating AI agent systems based on their actual capabilities, designed to reduce market confusion.
Developer Impact: This framework provides developers with a clear, objective way to assess and compare different AI agent technologies and vendor offerings, aiding in technology selection and expectation setting.
Google's Agent Development Kit (mentioned with Agentspace): Alongside its Agentspace hub for managing AI agents, Google has noted the availability of a new Agent Development Kit designed to help developers build AI agents.
Developer Impact: Developers within the Google Cloud ecosystem can expect new and refined tools to streamline the creation and deployment of AI agents, fostering more sophisticated agent-based solutions.
MetaGPT Framework Highlighted: Although an existing open-source framework, MetaGPT continues to be recognized for its capability in allowing multi-agent systems to automate complex software engineering tasks by encoding Standard Operating Procedures (SOPs) into LLM prompts.
Developer Impact: Developers can utilize MetaGPT to create collaborative multi-agent systems for various development tasks, potentially improving efficiency in areas like game development, web development, and data analysis.
🤔 Top 5 Questions from Agent Developers
Determining When to Use AI Agents: Developers are actively discussing the appropriate use cases for AI agents, cautioning against over-engineering solutions with complex agents when simpler AI workflows or even manual intervention would be more efficient.
Developer Impact: This highlights the need for developers to critically evaluate task complexity and ROI before committing to building an AI agent, ensuring the chosen solution fits the problem.
Managing Repository Strategy in an AI World: There's ongoing debate about how to structure code repositories when AI agents are involved—whether smaller, focused repositories are better for AI comprehension or if larger, comprehensive ones provide necessary context.
Developer Impact: Developers need to consider how their repository strategy impacts AI agent performance and collaboration, potentially adapting practices to include AI-generated artifacts like prompts.
Addressing the Impact of AI on Team Dynamics: As AI tools create a potential "productivity divide" where some engineers significantly increase output, questions arise about how to maintain team cohesion, collaboration, and equitable workload distribution.
Developer Impact: This requires a conscious effort from development teams and managers to adapt team structures and processes to integrate AI assistance smoothly and support all team members.
Ensuring Architectural Consistency with Multiple AI Agents: A key concern is how to ensure that different AI agents, possibly working across various repositories or parts of a system, adhere to consistent architectural principles and design patterns.
Developer Impact: Developers may need to establish clearer architectural guidelines for AI agents or develop new mechanisms to enforce consistency when employing multiple autonomous agents.
Need for AI-Native Development Infrastructure: Developers are questioning whether current development platforms and their associated workflows (e.g., for code review) are adequate for the speed and volume of code that AI agents can produce.
Developer Impact: This points to an upcoming need for developers to adapt to, and possibly help shape, new tools and platforms specifically designed for an AI-assisted and AI-native development lifecycle.
Step 3.3: Debugging
The adk web interface is your best debugging tool. On the "Events" tab, you can see every step your agent takes, including which tools it calls and what the LLM is thinking. If the output isn't right, your first step should always be to adjust the instructions in prompt.py.
Part 4 - Deployment
The adk deploy cloud_run command deploys your agent code to Google Cloud Run.
Ensure you have authenticated with Google Cloud (gcloud auth login and gcloud config set project ) and setup your environment variables to deploy your agent to cloud run with one line command.
Step 4.1: Setup environment variables
Optional but recommended: Setting environment variables can make the deployment commands cleaner.
# Set your Google Cloud Project ID
export GOOGLE_CLOUD_PROJECT="your-gcp-project-id"
# Set your desired Google Cloud Location
export GOOGLE_CLOUD_LOCATION="us-central1" # Example location
# Set the path to your agent code directory
export AGENT_PATH="./trend_spotter" # Assuming capital_agent is in the current directory
# Set a name for your Cloud Run service (optional)
export SERVICE_NAME="trend-spotter-service"
# Set an application name (optional)
export APP_NAME="trend-spotter-app"
Step 4.2: Deployment to Cloud Run
adk deploy cloud_run \
- project=$GOOGLE_CLOUD_PROJECT \
- region=$GOOGLE_CLOUD_LOCATION \
- service_name=$SERVICE_NAME \
- app_name=$APP_NAME \
- with_ui \
$AGENT_PATH
(more options for Cloud run deployment can be found here)
Step 4.3: Testing your deployed agent
You can test your agent by simply navigating to the Cloud Run service URL provided after deployment in your web browser. (The URL should be similar to this: https://your-service-name-abc123xyz.a.run.app)
Part 5: Next Steps and Conclusion
Congratulations! You have successfully designed, built, tested and deployed your very first AI agent using the Agent Development Kit.
You've learned how to structure a proper agent package, how to write a detailed prompt to control an agent's logic, and how to run and interact with your agent using the adk web interface. We now have a working "researcher" for our AI agent podcast and you you now have a working foundation that you can expand upon. Try modifying the prompt to research a different topic, or explore adding new custom tools to give your agent more capabilities.
In our next post, we'll continue to build on this foundation and make our agent even more powerful by adding richer, more specialized tools.
When you're ready to dive deeper and explore all the powerful features the framework has to offer, the best place to go is the official Google Cloud ADK documentation.
Happy building!
Top comments (0)